mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2024-11-25 08:06:39 +00:00
27 lines
915 B
YAML
27 lines
915 B
YAML
- name: Add host to {{ patroni_cacert_ca_host_group }}
|
|
add_host:
|
|
groups: "{{ patroni_cacert_ca_host_group }}"
|
|
hostname: "{{ hostvars[item]['ansible_hostname'] }}"
|
|
ansible_host: "{{ hostvars[item]['ansible_host'] }}"
|
|
with_items:
|
|
- "{{ ansible_play_hosts[0] }}"
|
|
changed_when: false
|
|
when: groups[patroni_cacert_ca_host_group] is not defined
|
|
|
|
- name: Add all hosts to {{ patroni_cacert_clients_group }}
|
|
add_host:
|
|
groups: "{{ patroni_cacert_clients_group }}"
|
|
hostname: "{{ hostvars[item]['ansible_hostname'] }}"
|
|
ansible_host: "{{ hostvars[item]['ansible_host'] }}"
|
|
with_items:
|
|
- "{{ ansible_play_hosts }}"
|
|
changed_when: false
|
|
when: groups[patroni_cacert_clients_group] is not defined
|
|
|
|
- name: CA and certs | Include CA
|
|
include_tasks: ca.yaml
|
|
|
|
- name: CA and certs | Include Certificates
|
|
include_tasks: certs.yaml
|
|
loop: "{{ groups[patroni_cacert_clients_group] }}"
|