{"id":16780558,"url":"https://github.com/monolithprojects/ansible-nexus_config","last_synced_at":"2026-02-02T19:35:20.927Z","repository":{"id":115679385,"uuid":"435039761","full_name":"MonolithProjects/ansible-nexus_config","owner":"MonolithProjects","description":"This Ansible Role will configure Sonatype Nexus Repository Manager","archived":false,"fork":false,"pushed_at":"2021-12-10T12:25:55.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T06:45:17.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MonolithProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["monolithprojects"]}},"created_at":"2021-12-05T00:30:34.000Z","updated_at":"2021-12-10T12:25:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e13c2e64-d379-4d6a-9ca0-6fa1f7756594","html_url":"https://github.com/MonolithProjects/ansible-nexus_config","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Fansible-nexus_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Fansible-nexus_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Fansible-nexus_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MonolithProjects%2Fansible-nexus_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MonolithProjects","download_url":"https://codeload.github.com/MonolithProjects/ansible-nexus_config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243925990,"owners_count":20369914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:35:24.793Z","updated_at":"2026-02-02T19:35:15.896Z","avatar_url":"https://github.com/MonolithProjects.png","language":"Jinja","funding_links":["https://github.com/sponsors/monolithprojects"],"categories":[],"sub_categories":[],"readme":"# Sonatype Nexus Repository Manager configuration\n## DEPRECATED - Please use https://github.com/lablabs/ansible-role-nexus_config\n\n[![Galaxy Quality](https://img.shields.io/ansible/quality/57180?style=flat\u0026logo=ansible)](https://galaxy.ansible.com/monolithprojects/nexus_config)\n[![Role version](https://img.shields.io/github/v/release/MonolithProjects/ansible-nexus_config)](https://galaxy.ansible.com/monolithprojects/nexus_config)\n[![Role downloads](https://img.shields.io/ansible/role/d/57180)](https://galaxy.ansible.com/monolithprojects/nexus_config)\n\u003c!-- [![GitHub Actions](https://github.com/MonolithProjects/ansible-nexus_config/workflows/molecule%20test/badge.svg?branch=master)](https://github.com/MonolithProjects/ansible-nexus_config/actions) --\u003e\n[![License](https://img.shields.io/github/license/MonolithProjects/ansible-nexus_config)](https://github.com/MonolithProjects/ansible-nexus_config/blob/main/LICENSE)\n\nThis Ansible role will configure Sonatype Nexus Repository Manager using the Rest API.\nCurrently this role is just an MVP. It supports:\n\n- [x] Initial admin password setup\n- [x] Users creation\n- [x] Users update\n- [x] Users deletion\n- [x] Blob storage (file) creation\n- [x] Blob storage (file) update\n- [x] Blob storage (file) deletion\n- [x] Blob storage (AWS S3) creation\n- [x] Blob storage (AWS S3) update\n- [x] Blob storage (AWS S3) deletion\n- [ ] Blob storage (Azure) creation\n- [ ] Blob storage (Azure) update\n- [ ] Blob storage (Azure) deletion\n- [x] Repositories (Maven) creation\n- [x] Repositories (Maven) update\n- [x] Repositories (Maven) deletion\n- [ ] Roles creation\n- [ ] Roles update\n- [ ] Roles detetion\n- TBD ...\n\n## Requirements\n\nAnsible \u003e= 2.10\n\n## Tested on:\n\n- Nexus repository Manager 3.37.0-01\n- Fedora 35\n\n## Role Variables\n\nThis is a copy of `defaults/main.yml`\n\n```yaml\n---\n\n# Administrator user name\nadmin_username: admin\n\n# Initial Nexus admin password\ninitial_admin_password: admin123\n\n# Admin password which will be set during the initial setup.\nadmin_password: \"{{ lookup('env', 'ADMIN_PASSWORD') }}\"\n\n# Nexus API port\napi_port: 8081\n\n# Nexus endpoint protocol\napi_protocol: http\n\n# Hide sensitive Ansible error logs (may contain passwords)\nhide_sensitive_logs: true\n\n# Anonymous access\nanonymous_access: true\n\nusers: []\n  # - id: joan                    # User ID\n  #   first_name: Joan            # User's first name\n  #   last_name: Doe              # User's last name\n  #   email: joan@example.org     # Email\n  #   password: nbusr123          # Password ( do not push it to git :) )\n  #   status: active              # Status of the user. You can set active/disabled or deleted to delete the user.\n  #   source: default             # Source\n  #   roles:                      # List of the assigned roles\n  #     - nx-admin\n  # - id: joe\n  #   first_name: Joe\n  #   last_name: Doe\n  #   email: joe@example.org\n  #   password: \"{{ lookup('env', 'JOE_PASSWORD') }}\"\n  #   status: disabled\n  #   source: default\n  #   roles:\n  #     - nx-anonymous\n\nstores: []\n  # - name: file_blob             # Blob Store name\n  #   type: file                  # Blob Store type (file, s3)\n  #   soft_quota: 0               # Blob Store quota\n  #   path: /tmp/blobs\n  #   status: active              # Blob Store status (active, deleted)\n  # - name: s3_blog\n  #   type: s3\n  #   soft_quota: 0\n  #   prefix: \"\"\n  #   region: default\n  #   expiration_days: -1\n  #   status: active\n\nrepositories: []\n  # - name: maven_repo_hosted\n  #   online: true                                  # Repository state (true, false, deleted)\n  #   type: maven                                   # Repository type (Currently supported: maven)\n  #   kind: hosted                                  # Repository kind (hosted, proxy)\n  #   blob_store: default                           # Blob storeage\n  #   strict_content_type_validation: false         # Strict Content Type Validation\n  #   version_policy: MIXED                         # Version Policy (MIXED, RELEASE, SNAPSHOT)\n  #   layout_policy: STRICT                         # Layout Policy (STRICT, PERMISSIVE)\n  #   content: INLINE                               # Content Disposition (INLINE)\n\n  # - name: maven_repo_proxy\n  #   online: true\n  #   type: maven\n  #   kind: proxy\n  #   blob_store: default\n  #   strict_content_type_validation: false\n  #   remote_url: https://maven.example.org/repo    # Remote repository url\n  #   maximum_artifacts_age: -1                     # Maximum component age\n  #   maximum_metadata_age: 1440                    # Maximum metadata age\n  #   negative_cache: true                          # Not found cache\n  #   not_found_cache_ttl: 1440                     # Not found cache TTL\n  #   http_client:\n  #     blocked: false\n  #     auto_block: true\n  #     connection:\n  #       retries: 0\n  #       user_agent_suffix: \"\"\n  #       timeout: 60\n  #       enable_circular_redirects: false\n  #       enable_cookies: false\n  #       user_trust_store: false\n  #     authentication:                               # Remote repo authentication\n  #       type: username                              # Authetication type (username, ntlm)\n  #       username: joe\n  #       password: nbusr123\n  #       ntlm_host:\n  #       ntlm_domain:\n  #       preemptive: false\n  #   routing_rule: null\n  #   version_policy: MIXED\n  #   layout_policy: STRICT\n  #   content: INLINE\n\n  # - name: maven_repo_group\n  #   online: true\n  #   type: maven\n  #   kind: group\n  #   blob_store: default\n  #   strict_content_type_validation: false\n  #   group:\n  #     - maven-releases\n  #     - maven-snapshots\n\n```\n\n## Example Playbook\n\nIn this example the playbook will create two additional Nexus users and one additional Blob Storage.\n\n```yaml\n---\n- name: Configure Nexus\n  hosts: all\n  user: ansible\n  become: yes\n  vars:\n    config:\n      users:\n        - id: joan\n          first_name: Joan\n          last_name: Doe\n          email: joan@example.org\n          password: \"{{ lookup('env', 'JOAN_PASSWORD') }}\"\n          status: active\n          source: default\n          roles:\n            - nx-admin\n        - id: joe\n          first_name: Joe\n          last_name: Doe\n          email: joe@example.org\n          password: nbusr123\n          status: disabled\n          source: default\n          roles:\n            - nx-anonymous\n      stores:\n        - name: file_blob\n          type: file\n          soft_quota: 0\n          path: /mydata/blobs\n          status: active\n  roles:\n    - role: monolithprojects.nexus_config\n```\n\n## License\n\nMIT\n\n## Author Information\n\nCreated in 2021 by Michal Muransky\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonolithprojects%2Fansible-nexus_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonolithprojects%2Fansible-nexus_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonolithprojects%2Fansible-nexus_config/lists"}