mirror of
https://gitea.0xace.cc/ansible-galaxy/consul.git
synced 2024-11-24 22:36:38 +00:00
27 lines
908 B
YAML
27 lines
908 B
YAML
- name: Add host to {{ consul_cacert_ca_host_group }}
|
|
add_host:
|
|
groups: "{{ consul_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[consul_cacert_ca_host_group] is not defined
|
|
|
|
- name: Add all hosts to {{ consul_cacert_clients_group }}
|
|
add_host:
|
|
groups: "{{ consul_cacert_clients_group }}"
|
|
hostname: "{{ hostvars[item]['ansible_hostname'] }}"
|
|
ansible_host: "{{ hostvars[item]['ansible_host'] }}"
|
|
with_items:
|
|
- "{{ ansible_play_hosts }}"
|
|
changed_when: false
|
|
when: groups[consul_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[consul_cacert_clients_group] }}"
|