renew_nomad_certificates/tasks/configure.yml
Bertrand Lanson 38717dcd80
All checks were successful
test / Linting (push) Successful in 41s
test / Molecule tests (default, debian11) (push) Successful in 1m8s
test / Molecule tests (default, debian12) (push) Successful in 1m13s
test / Molecule tests (default, ubuntu2004) (push) Successful in 1m23s
test / Molecule tests (default, ubuntu2204) (push) Successful in 1m25s
test / Molecule tests (with_custom_config, debian11) (push) Successful in 1m16s
test / Molecule tests (with_custom_config, debian12) (push) Successful in 1m11s
test / Molecule tests (with_custom_config, ubuntu2204) (push) Successful in 1m21s
test / Molecule tests (with_custom_config, ubuntu2004) (push) Successful in 1m45s
feat: remove become from role
2023-12-03 18:20:08 +01:00

49 lines
1.8 KiB
YAML

---
# task/configure file for renew_nomad_certificates
- name: "Configure files for nomad certificate renewal"
notify:
- "systemctl-enable-nomad-certs"
- "systemctl-restart-nomad-certs"
block:
- name: "Copy nomad_config.hcl template"
ansible.builtin.template:
src: nomad_config.hcl.j2
dest: "{{ renew_nomad_certificates_config_dir }}/nomad_config.hcl"
owner: "{{ renew_nomad_certificates_nomad_user }}"
group: "{{ renew_nomad_certificates_nomad_group }}"
mode: '0600'
- name: "Copy nomad_ca.pem.tpl template"
ansible.builtin.template:
src: nomad_ca.pem.tpl.j2
dest: "{{ renew_nomad_certificates_config_dir }}/templates/nomad_ca.pem.tpl"
owner: "{{ renew_nomad_certificates_nomad_user }}"
group: "{{ renew_nomad_certificates_nomad_group }}"
mode: '0600'
- name: "Copy nomad_cert.pem.tpl template"
ansible.builtin.template:
src: nomad_cert.pem.tpl.j2
dest: "{{ renew_nomad_certificates_config_dir }}/templates/nomad_cert.pem.tpl"
owner: "{{ renew_nomad_certificates_nomad_user }}"
group: "{{ renew_nomad_certificates_nomad_group }}"
mode: '0600'
- name: "Copy nomad_cert.key.tpl template"
ansible.builtin.template:
src: nomad_key.pem.tpl.j2
dest: "{{ renew_nomad_certificates_config_dir }}/templates/nomad_key.pem.tpl"
owner: "{{ renew_nomad_certificates_nomad_user }}"
group: "{{ renew_nomad_certificates_nomad_group }}"
mode: '0600'
- name: "Configure nomad-certs systemd service"
ansible.builtin.template:
src: nomad-certs.service.j2
dest: /etc/systemd/system/nomad-certs.service
owner: root
group: root
mode: '0644'
notify:
- "systemctl-daemon-reload"