feat: remove become from role
Some checks failed
test / Linting (push) Failing after 29s
test / Molecule tests (default, debian11) (push) Has been skipped
test / Molecule tests (default, debian12) (push) Has been skipped
test / Molecule tests (default, ubuntu2004) (push) Has been skipped
test / Molecule tests (default, ubuntu2204) (push) Has been skipped
test / Molecule tests (with_custom_config, debian11) (push) Has been skipped
test / Molecule tests (with_custom_config, debian12) (push) Has been skipped
test / Molecule tests (with_custom_config, ubuntu2004) (push) Has been skipped
test / Molecule tests (with_custom_config, ubuntu2204) (push) Has been skipped
Some checks failed
test / Linting (push) Failing after 29s
test / Molecule tests (default, debian11) (push) Has been skipped
test / Molecule tests (default, debian12) (push) Has been skipped
test / Molecule tests (default, ubuntu2004) (push) Has been skipped
test / Molecule tests (default, ubuntu2204) (push) Has been skipped
test / Molecule tests (with_custom_config, debian11) (push) Has been skipped
test / Molecule tests (with_custom_config, debian12) (push) Has been skipped
test / Molecule tests (with_custom_config, ubuntu2004) (push) Has been skipped
test / Molecule tests (with_custom_config, ubuntu2204) (push) Has been skipped
This commit is contained in:
parent
ed2c223727
commit
9660328ec7
@ -3,20 +3,17 @@
|
|||||||
- name: "Reload service file"
|
- name: "Reload service file"
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
become: true
|
|
||||||
listen: "systemctl-daemon-reload"
|
listen: "systemctl-daemon-reload"
|
||||||
|
|
||||||
- name: "Enable vault-certs service"
|
- name: "Enable vault-certs service"
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: vault-certs
|
name: vault-certs
|
||||||
enabled: true
|
enabled: true
|
||||||
become: true
|
|
||||||
listen: "systemctl-enable-vault-certs"
|
listen: "systemctl-enable-vault-certs"
|
||||||
|
|
||||||
- name: "Start vault-certs service"
|
- name: "Start vault-certs service"
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: vault-certs
|
name: vault-certs
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
|
||||||
listen: "systemctl-restart-vault-certs"
|
listen: "systemctl-restart-vault-certs"
|
||||||
when: renew_vault_certificates_start_service
|
when: renew_vault_certificates_start_service
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.renew_vault_certificates"
|
- name: "Include ednxzu.renew_vault_certificates"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Create group vault"
|
- name: "Create group vault"
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: "vault"
|
name: "vault"
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create user vault"
|
- name: "Create user vault"
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
@ -14,4 +14,3 @@
|
|||||||
group: "vault"
|
group: "vault"
|
||||||
shell: /bin/false
|
shell: /bin/false
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /etc/consul-template.d/vault"
|
- name: "Test: directory /etc/consul-template.d/vault"
|
||||||
block:
|
block:
|
||||||
@ -19,7 +20,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
||||||
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify directory /etc/consul-template.d/vault"
|
- name: "Verify directory /etc/consul-template.d/vault"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -60,7 +60,6 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
||||||
register: slurp_etc_consul_template_d_vault_templates
|
register: slurp_etc_consul_template_d_vault_templates
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
||||||
vars:
|
vars:
|
||||||
@ -109,9 +108,8 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/vault-certs.service"
|
src: "/etc/systemd/system/vault-certs.service"
|
||||||
register: slurp_etc_systemd_system_vault_certs_service
|
register: slurp_etc_systemd_system_vault_certs_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service vault"
|
- name: "Verify service vault-certs"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.renew_vault_certificates"
|
- name: "Include ednxzu.renew_vault_certificates"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Create group vault"
|
- name: "Create group vault"
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: "vault"
|
name: "vault"
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create user vault"
|
- name: "Create user vault"
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
@ -14,4 +14,3 @@
|
|||||||
group: "vault"
|
group: "vault"
|
||||||
shell: /bin/false
|
shell: /bin/false
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /etc/consul-template.d/vault"
|
- name: "Test: directory /etc/consul-template.d/vault"
|
||||||
block:
|
block:
|
||||||
@ -19,7 +20,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
||||||
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify directory /etc/consul-template.d/vault"
|
- name: "Verify directory /etc/consul-template.d/vault"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -60,7 +60,6 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
||||||
register: slurp_etc_consul_template_d_vault_templates
|
register: slurp_etc_consul_template_d_vault_templates
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
||||||
vars:
|
vars:
|
||||||
@ -109,9 +108,8 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/vault-certs.service"
|
src: "/etc/systemd/system/vault-certs.service"
|
||||||
register: slurp_etc_systemd_system_vault_certs_service
|
register: slurp_etc_systemd_system_vault_certs_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service vault"
|
- name: "Verify service vault-certs"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.renew_vault_certificates"
|
- name: "Include ednxzu.renew_vault_certificates"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Create group vault"
|
- name: "Create group vault"
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: "vault"
|
name: "vault"
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create user vault"
|
- name: "Create user vault"
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
@ -14,4 +14,3 @@
|
|||||||
group: "vault"
|
group: "vault"
|
||||||
shell: /bin/false
|
shell: /bin/false
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /etc/consul-template.d/vault"
|
- name: "Test: directory /etc/consul-template.d/vault"
|
||||||
block:
|
block:
|
||||||
@ -19,7 +20,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
||||||
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify directory /etc/consul-template.d/vault"
|
- name: "Verify directory /etc/consul-template.d/vault"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -60,7 +60,6 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
||||||
register: slurp_etc_consul_template_d_vault_templates
|
register: slurp_etc_consul_template_d_vault_templates
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
||||||
vars:
|
vars:
|
||||||
@ -109,9 +108,8 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/vault-certs.service"
|
src: "/etc/systemd/system/vault-certs.service"
|
||||||
register: slurp_etc_systemd_system_vault_certs_service
|
register: slurp_etc_systemd_system_vault_certs_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service vault"
|
- name: "Verify service vault-certs"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.renew_vault_certificates"
|
- name: "Include ednxzu.renew_vault_certificates"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
hosts: all
|
hosts: all
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Create group vault"
|
- name: "Create group vault"
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: "vault"
|
name: "vault"
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create user vault"
|
- name: "Create user vault"
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
@ -14,4 +14,4 @@
|
|||||||
group: "vault"
|
group: "vault"
|
||||||
shell: /bin/false
|
shell: /bin/false
|
||||||
state: present
|
state: present
|
||||||
become: true
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
- name: Verify
|
- name: Verify
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test: directory /etc/consul-template.d/vault"
|
- name: "Test: directory /etc/consul-template.d/vault"
|
||||||
block:
|
block:
|
||||||
@ -19,7 +20,6 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
src: "/etc/consul-template.d/vault/vault_config.hcl"
|
||||||
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
register: slurp_etc_consul_template_d_vault_vault_config_hcl
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify directory /etc/consul-template.d/vault"
|
- name: "Verify directory /etc/consul-template.d/vault"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@ -60,7 +60,6 @@
|
|||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
loop: "{{ find_etc_consul_template_d_vault_templates.files }}"
|
||||||
register: slurp_etc_consul_template_d_vault_templates
|
register: slurp_etc_consul_template_d_vault_templates
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
- name: "Verify file /etc/consul-template.d/vault/templates/vault_cert.pem.tpl"
|
||||||
vars:
|
vars:
|
||||||
@ -109,9 +108,8 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "/etc/systemd/system/vault-certs.service"
|
src: "/etc/systemd/system/vault-certs.service"
|
||||||
register: slurp_etc_systemd_system_vault_certs_service
|
register: slurp_etc_systemd_system_vault_certs_service
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Verify service vault"
|
- name: "Verify service vault-certs"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
- stat_etc_systemd_system_vault_certs_service.stat.exists
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
# task/configure file for renew_vault_certificates
|
# task/configure file for renew_vault_certificates
|
||||||
- name: "Configure files for vault certificate renewal"
|
- name: "Configure files for vault certificate renewal"
|
||||||
become: true
|
|
||||||
notify:
|
notify:
|
||||||
- "systemctl-enable-vault-certs"
|
- "systemctl-enable-vault-certs"
|
||||||
- "systemctl-restart-vault-certs"
|
- "systemctl-restart-vault-certs"
|
||||||
@ -37,6 +36,5 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: true
|
|
||||||
notify:
|
notify:
|
||||||
- "systemctl-daemon-reload"
|
- "systemctl-daemon-reload"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
owner: "{{ renew_vault_certificates_vault_user }}"
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
||||||
group: "{{ renew_vault_certificates_vault_group }}"
|
group: "{{ renew_vault_certificates_vault_group }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Create directory templates directory in {{ renew_vault_certificates_config_dir }}"
|
- name: "Create directory templates directory in {{ renew_vault_certificates_config_dir }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -16,7 +15,6 @@
|
|||||||
owner: "{{ renew_vault_certificates_vault_user }}"
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
||||||
group: "{{ renew_vault_certificates_vault_group }}"
|
group: "{{ renew_vault_certificates_vault_group }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Ensure certificate/key directory(ies) exist(s)"
|
- name: "Ensure certificate/key directory(ies) exist(s)"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -25,7 +23,6 @@
|
|||||||
owner: "{{ renew_vault_certificates_vault_user }}"
|
owner: "{{ renew_vault_certificates_vault_user }}"
|
||||||
group: "{{ renew_vault_certificates_vault_group }}"
|
group: "{{ renew_vault_certificates_vault_group }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
|
||||||
loop:
|
loop:
|
||||||
- "{{ renew_vault_certificates_cert_dest }}"
|
- "{{ renew_vault_certificates_cert_dest }}"
|
||||||
- "{{ renew_vault_certificates_key_dest }}"
|
- "{{ renew_vault_certificates_key_dest }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user