Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources are not get updated or deleted based on code/variables changes. #288

Closed
5obol opened this issue Apr 30, 2020 · 1 comment
Closed

Comments

@5obol
Copy link

5obol commented Apr 30, 2020

Play:

---
- name: Nexus
  hosts: nexus
  vars:
    nexus_version: '3.22.0-02'
    nexus_version_running: '3.22.0-02'
    nexus_roles:
      - id: Developpers-ansible1 # maps to the LDAP group
        name: developers-ansible1-edited
        description: All developers edited
        privileges:
          - nx-search-read
        roles: []
    nexus_blobstores:
      - name: company-artifacts-updated
        path: /var/nexus/blobs/company-artifacts
    nexus_repos_maven_hosted:
      - name: company-project-updated-2
        version_policy: mixed
        write_policy: allow
        blob_store: company-artifacts-updated
    nexus_local_users:
      - username: jenkins-ansible1 # used as key to update
        first_name: Jenkins-ansible1-edited-2
        last_name: CIEdited
        state: present # default value if ommited, use 'absent' to remove user
        email: [email protected]
        password: "s3cr3t"
        roles:
          - Developpers-ansible1 # role ID here
  roles:
    - { role: nexus3-oss }

Issues description/clarification:
Issue with updating of the resources:

  • When we change repository name, it just creates new one. Without touching old one.
    Expected behaviour: either re-create or change in-place if possible.
  • When we update values for User it doesn't reflect at all. Nothing happens.
    The same update behaviour for roles.
    Issue with deleting of the resources:
    When we fully delete values - nothing happens.
    Expected behaviour: resources get deleted. It applies (this issue) to roles/users/repositories.
@zeitounator
Copy link
Member

Hi and thanks for your interest.

  • Removing objects with state: absent is only supported for user for time being. No plan or schedule to add this feature at the moment. You have to remove roles and repositories manually until I get the time to work on that or someone proposes a PR I have time to review and merge.
  • Repository name as well as format, type and storage blobstore is immutable in Nexus and therefore cannot be changed (see GUI). Only deletion / (re) creation is possible and contents are lost. The only identifier available being the name, there is no way to implement something to recreate in place.
  • There is an open bug about updating users and roles. Basically, only changes in privileges and roles are reflected. I did not get time to work on this and no PR was proposed yet.

I just created an enhancement ticket regarding state: absent so that it does vanish (#289). You can follow the other one for updates on roles and users. I hope to get some time soon.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants