Skip to content

Commit 58fc667

Browse files
authored
Don't elevate when running tasks on localhost (#397)
Don't elevate when running tasks on localhost
1 parent a75748f commit 58fc667

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

roles/elasticsearch/tasks/elasticsearch-security.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
path: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/ca.crt"
7878
register: elasticsearch_check_temporary_ca
7979
delegate_to: localhost
80+
become: false
8081

8182
- name: Move temporary ca file on Ansible controler
8283
ansible.builtin.copy:
@@ -85,6 +86,7 @@
8586
mode: preserve
8687
when: elasticsearch_check_temporary_ca.stat.exists
8788
delegate_to: localhost
89+
become: false
8890
register: elasticsearch_move_ca_file
8991

9092
- name: Remove temporary ca file on Ansible controler
@@ -93,6 +95,7 @@
9395
state: absent
9496
when: elasticsearch_move_ca_file.changed
9597
delegate_to: localhost
98+
become: false
9699

97100
- name: Ensure elasticsearch certificate exists
98101
ansible.builtin.stat:
@@ -179,6 +182,7 @@
179182
- name: Backup elasticsearch cert on localhost then remove
180183
when: "'renew_es_cert' in ansible_run_tags or 'renew_ca' in ansible_run_tags or elasticsearch_cert_will_expire_soon | bool"
181184
delegate_to: localhost
185+
become: false
182186
tags:
183187
- renew_es_cert
184188
- renew_ca

0 commit comments

Comments
 (0)