pogosoftware.nexus3_oss

Ansible Role: Nexus 3 OSS

This role sets up and configures Nexus Repository Manager OSS version 3.x.

You can update all configuration options by running the role again, except for settings related to blobstores, which cannot be changed once set in Nexus.

Table of Contents

Note: Links in the Table of Contents won't work on the Ansible Galaxy site. View it on GitHub

History / Credits

This role originated from the ansible-nexus3-oss repository by @savoirfairelinux after they stopped maintaining it. We appreciate the original authors for their contributions.

Requirements

  • A recent version of Ansible.
  • Compatible operating system (tested with CentOS 8, Ubuntu Bionic (18.04), and Debian Buster).
  • Rsync installed on the target machine.
  • jmespath library installed on the host running the playbook.
  • Java 8 (mandatory).
  • Optional: Apache HTTPD, if you want to set up an SSL reverse proxy.

Role Variables

General variables

You can configure these variables in your YAML playbook:

    nexus_version: ''
    nexus_timezone: 'UTC'
    nexus_download_url: "http://download.sonatype.com/nexus/3"

The default behavior installs the latest version of Nexus. You can specify a version by changing nexus_version.

Nexus directories

The following directories can be set:

    nexus_installation_dir: '/opt'
    nexus_data_dir: '/var/nexus'
    nexus_tmp_dir: '/tmp/nexus'  # Temporary files directory

Ports and IP

Configure the listening port and IP address:

    nexus_default_port: 8081
    nexus_application_host: '0.0.0.0'  # Change to '127.0.0.1' if using a reverse proxy
    nexus_default_context_path: '/'

User settings

You can specify the Nexus OS user and group:

    nexus_os_group: 'nexus'
    nexus_os_user: 'nexus'

Admin Password

Set the admin password for Nexus:

    nexus_admin_password: 'changeme'

It's recommended to encrypt passwords using Ansible Vault.

Dependencies

Roles needed for the setup include:

Example Playbook

Here's an example playbook to set up Nexus:

---
- name: Install Nexus
  hosts: nexus
  become: yes

  vars:
    nexus_timezone: 'Canada/Eastern'
    nexus_admin_password: 'securepassword'
    
  roles:
    - geerlingguy.java
    - geerlingguy.apache
    - ansible-thoteam.nexus3-oss

Development and Contribution

Contributions are welcome! You can fork the repository, create a branch, and submit a pull request for bug fixes, new features, or documentation improvements.

License

This role is licensed under GNU GPLv3.

Author Information

See: Thoteam GitHub

Informazioni sul progetto

Nexus Repository Manager 3.x (Sonatype)

Installa
ansible-galaxy install pogosoftware.nexus3_oss
Licenza
gpl-3.0
Download
140
Proprietario