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

Create directories task fails when vault_install_hashi_repo is true #329

Open
bagratte opened this issue May 11, 2023 · 0 comments · May be fixed by #330
Open

Create directories task fails when vault_install_hashi_repo is true #329

bagratte opened this issue May 11, 2023 · 0 comments · May be fixed by #330

Comments

@bagratte
Copy link

- name: Install Vault
  hosts: vault
  gather_facts: true
  any_errors_fatal: true
  become: true
  roles:
    - role: ansible-community.ansible-vault
      vault_install_hashi_repo: true
      vault_version: 1.13.2-1
$ ansible-playbook ...
...
TASK [ansible-community.ansible-vault : Create directories] ************************************************************
failed: [vault] (item={'path': '/etc/vault.d', 'mode': '0550'}) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": {"mode": "0550", "path": "/etc/vault.d"}, "mode": "0755", "msg": "chgrp failed: failed to look up group vault", "owner": "vault", "path": "/etc/vault.d", "size": 4096, "state": "directory", "uid": 998}
failed: [vault] (item={'path': '/usr/local/lib/vault/plugins', 'mode': '0550'}) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": {"mode": "0550", "path": "/usr/local/lib/vault/plugins"}, "mode": "0755", "msg": "chgrp failed: failed to look up group vault", "owner": "vault", "path": "/usr/local/lib/vault/plugins", "size": 4096, "state": "directory", "uid": 998}
failed: [vault] (item={'path': '/opt/vault/data', 'mode': '0750'}) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": {"mode": "0750", "path": "/opt/vault/data"}, "mode": "0755", "msg": "chgrp failed: failed to look up group vault", "owner": "vault", "path": "/opt/vault/data", "size": 4096, "state": "directory", "uid": 998}
failed: [vault] (item={'path': '/var/log/vault', 'mode': '0750'}) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": {"mode": "0750", "path": "/var/log/vault"}, "mode": "0755", "msg": "chgrp failed: failed to look up group vault", "owner": "vault", "path": "/var/log/vault", "size": 4096, "state": "directory", "uid": 998}
failed: [vault] (item={'path': '/var/run/vault', 'mode': '0750'}) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": {"mode": "0750", "path": "/var/run/vault"}, "mode": "0755", "msg": "chgrp failed: failed to look up group vault", "owner": "vault", "path": "/var/run/vault", "size": 40, "state": "directory", "uid": 998}

NO MORE HOSTS LEFT *****************************************************************************************************

PLAY RECAP *************************************************************************************************************
vault                      : ok=7    changed=0    unreachable=0    failed=1    skipped=14   rescued=0    ignored=0

Workaraound:

---
- name: Install Vault
  hosts: vault
  gather_facts: true
  any_errors_fatal: true
  become: true
  roles:
    - role: ansible-community.ansible-vault
      vault_install_hashi_repo: true
      vault_version: 1.13.2-1
      vault_group: bin
@bagratte bagratte linked a pull request May 11, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant