|
1 | 1 | --- |
2 | | - |
3 | 2 | - name: Ensure beats certificate exists |
4 | 3 | ansible.builtin.stat: |
5 | 4 | path: "/etc/beats/certs/{{ inventory_hostname }}-beats.crt" |
|
53 | 52 | state: absent |
54 | 53 | when: beats_move_cert_directory.changed |
55 | 54 |
|
56 | | -- name: Backup beats certs on elasticstack_ca host then remove |
| 55 | +- name: Backup beats certs on elasticstack_ca_host then remove |
57 | 56 | when: "'renew_beats_cert' in ansible_run_tags or 'renew_ca' in ansible_run_tags or beats_cert_will_expire_soon | bool" |
58 | | - delegate_to: "{{ elasticstack_ca }}" |
| 57 | + delegate_to: "{{ elasticstack_ca_host }}" |
59 | 58 | tags: |
60 | 59 | - renew_ca |
61 | 60 | - renew_beats_cert |
|
134 | 133 | --pass {{ beats_tls_key_passphrase }} |
135 | 134 | --pem |
136 | 135 | --out {{ elasticstack_ca_dir }}/{{ ansible_hostname }}-beats.zip |
137 | | - delegate_to: "{{ elasticstack_ca }}" |
| 136 | + delegate_to: "{{ elasticstack_ca_host }}" |
138 | 137 | args: |
139 | 138 | creates: "{{ elasticstack_ca_dir }}/{{ ansible_hostname }}-beats.zip" |
140 | 139 | tags: |
|
147 | 146 | src: "{{ elasticstack_ca_dir }}/{{ ansible_hostname }}-beats.zip" |
148 | 147 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-beats.zip" |
149 | 148 | flat: yes |
150 | | - delegate_to: "{{ elasticstack_ca }}" |
| 149 | + delegate_to: "{{ elasticstack_ca_host }}" |
151 | 150 | tags: |
152 | 151 | - certificates |
153 | 152 | - renew_ca |
|
204 | 203 | src: "{{ elasticstack_ca_dir }}/ca.crt" |
205 | 204 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/ca.crt" |
206 | 205 | flat: yes |
207 | | - delegate_to: "{{ elasticstack_ca }}" |
| 206 | + delegate_to: "{{ elasticstack_ca_host }}" |
208 | 207 | tags: |
209 | 208 | - certificates |
210 | 209 | - renew_ca |
|
234 | 233 | register: beats_writer_password |
235 | 234 | changed_when: false |
236 | 235 | no_log: "{{ elasticstack_no_log }}" |
237 | | - delegate_to: "{{ elasticstack_ca }}" |
| 236 | + delegate_to: "{{ elasticstack_ca_host }}" |
0 commit comments