dimmaryanto93.sonatype_nexus_oss_registry
dimmaryanto93.sonatype_nexus_oss_registry
This repository is used to configure the registry on Sonatype Nexus OSS using the REST API for various services such as:
- Docker
- Maven
- NPM
- And more
Ansible - User Guide
Here are the preparations you need to do:
Create a new user on your server. It's recommended to use a very strong password or a password generator.
adduser <username>Grant the user sudo privileges without a password using
visudo.username ALL=(ALL) NOPASSWD:ALLAuthenticate using a private key for SSH login. Generate an SSH key on your local machine and then use
ssh-copy-id user@your-ip-serverto copy the public key to your server.
Requirements
To use this role, you need to install the following packages/collections:
You can install them using:
ansible-galaxy collection install ansible.posix community.general
Alternatively, you can use a requirement.yaml file and install it with:
ansible-galaxy collection install -r requirement.yaml
The format of the requirement.yaml file should be like this:
---
collections:
- community.general
- ansible.posix
Role Variables
There are several variables you can use to set up Sonatype Nexus OSS, including:
| Variable name | Example value | Description |
|---|
Dependencies
None
Example Playbook
It's helpful to include an example of how to use your role, for example, with variables passed in as parameters:
- hosts: servers
vars:
nexus_admin_user: admin
nexus_admin_password: admin123
nexus_default_host: 'localhost'
nexus_default_port: '8081'
nexus_registry_docker_enabled: true
docker_registry_hosted_name: 'docker-registry'
docker_registry_hosted_port: '8087'
docker_registry_group_name: 'docker-public-group'
docker_registry_group_port: '8086'
nexus_registry_docker_repositories: []
roles:
- dimmaryanto93.sonatype_nexus_oss_registry
License
MIT
Install sonatype nexus-oss for linux
ansible-galaxy install dimmaryanto93.sonatype_nexus_oss_registry