|
108 | 108 | state: absent |
109 | 109 | when: logstash_move_cert_zip_file_ca_host.changed |
110 | 110 |
|
111 | | -- name: Backup logstash cert on Ansible controler then remove |
| 111 | +- name: Backup logstash cert on Ansible controller then remove |
112 | 112 | when: "'renew_logstash_cert' in ansible_run_tags or 'renew_ca' in ansible_run_tags" |
113 | 113 | delegate_to: localhost |
114 | 114 | tags: |
115 | 115 | - renew_ca |
116 | 116 | - renew_logstash_cert |
117 | 117 | - never |
118 | 118 | block: |
119 | | - - name: Check the existance of cert on Ansible controler |
| 119 | + - name: Check the existance of cert on Ansible controller |
120 | 120 | ansible.builtin.stat: |
121 | 121 | path: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.p12" |
122 | | - register: logstash_check_temporary_cert_ansible_controler |
| 122 | + register: logstash_check_temporary_cert_ansible_controller |
123 | 123 |
|
124 | | - - name: Move temporary cert file on Ansible controler |
| 124 | + - name: Move temporary cert file on Ansible controller |
125 | 125 | ansible.builtin.copy: |
126 | 126 | src: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.p12" |
127 | 127 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.p12_{{ ansible_date_time.iso8601_micro }}" |
128 | 128 | mode: preserve |
129 | | - when: logstash_check_temporary_cert_ansible_controler.stat.exists |
130 | | - register: logstash_move_cert_file_ansible_controler |
| 129 | + when: logstash_check_temporary_cert_ansible_controller.stat.exists |
| 130 | + register: logstash_move_cert_file_ansible_controller |
131 | 131 |
|
132 | | - - name: Remove temporary cert file on Ansible controler |
| 132 | + - name: Remove temporary cert file on Ansible controller |
133 | 133 | ansible.builtin.file: |
134 | 134 | path: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.p12" |
135 | 135 | state: absent |
136 | | - when: logstash_move_cert_file_ansible_controler.changed |
| 136 | + when: logstash_move_cert_file_ansible_controller.changed |
137 | 137 |
|
138 | | - - name: Check the existance of cert zip file on Ansible controler |
| 138 | + - name: Check the existance of cert zip file on Ansible controller |
139 | 139 | ansible.builtin.stat: |
140 | 140 | path: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.zip" |
141 | | - register: logstash_check_temporary_cert_zip_ansible_controler |
| 141 | + register: logstash_check_temporary_cert_zip_ansible_controller |
142 | 142 |
|
143 | | - - name: Move temporary cert zip file on Ansible controler |
| 143 | + - name: Move temporary cert zip file on Ansible controller |
144 | 144 | ansible.builtin.copy: |
145 | 145 | src: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.zip" |
146 | 146 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.zip_{{ ansible_date_time.iso8601_micro }}" |
147 | 147 | mode: preserve |
148 | | - when: logstash_check_temporary_cert_zip_ansible_controler.stat.exists |
149 | | - register: logstash_move_cert_zip_ansible_controler |
| 148 | + when: logstash_check_temporary_cert_zip_ansible_controller.stat.exists |
| 149 | + register: logstash_move_cert_zip_ansible_controller |
150 | 150 |
|
151 | | - - name: Remove temporary cert zip file on Ansible controler |
| 151 | + - name: Remove temporary cert zip file on Ansible controller |
152 | 152 | ansible.builtin.file: |
153 | 153 | path: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.zip" |
154 | 154 | state: absent |
155 | | - when: logstash_move_cert_zip_ansible_controler.changed |
| 155 | + when: logstash_move_cert_zip_ansible_controller.changed |
156 | 156 |
|
157 | 157 | - name: Create individual certificates for Logstash |
158 | 158 | ansible.builtin.command: > |
|
174 | 174 | - renew_ca |
175 | 175 | - renew_logstash_cert |
176 | 176 |
|
177 | | -- name: Fetch certificate from ca host to Ansible controler |
| 177 | +- name: Fetch certificate from ca host to Ansible controller |
178 | 178 | ansible.builtin.fetch: |
179 | 179 | src: "{{ elasticstack_ca_dir }}/{{ ansible_hostname }}-ls.p12" |
180 | 180 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.p12" |
|
244 | 244 | - renew_ca |
245 | 245 | - renew_logstash_cert |
246 | 246 |
|
247 | | -- name: Fetch PEM certificate from ca host to Ansible controler |
| 247 | +- name: Fetch PEM certificate from ca host to Ansible controller |
248 | 248 | ansible.builtin.fetch: |
249 | 249 | src: "{{ elasticstack_ca_dir }}/{{ ansible_hostname }}-ls.zip" |
250 | 250 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ ansible_hostname }}-ls.zip" |
|
324 | 324 | - renew_ca |
325 | 325 | - renew_logstash_cert |
326 | 326 |
|
327 | | -- name: Fetch ca certificate from ca host to Ansible controler |
| 327 | +- name: Fetch ca certificate from ca host to Ansible controller |
328 | 328 | ansible.builtin.fetch: |
329 | 329 | src: "{{ elasticstack_ca_dir }}/ca.crt" |
330 | 330 | dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/ca.crt" |
|
0 commit comments