Skip to content

Commit

Permalink
Disable become for tasks delegated to localhost
Browse files Browse the repository at this point in the history
This fixes an issue where "~" in "zookeeper_local_download_directory" is
expanded to the home directory of the privileged remote user.
  • Loading branch information
atj committed Apr 4, 2024
1 parent ec3cbaa commit 8da98e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
state: directory
delegate_to: localhost
run_once: true
vars:
ansible_become: false

- name: Download ZooKeeper archive
ansible.builtin.get_url:
Expand All @@ -81,8 +83,10 @@
checksum: "{{ zookeeper_download_checksum | d(omit) }}"
mode: "0644"
delegate_to: localhost
ignore_errors: "{{ ansible_check_mode }}"
run_once: true
ignore_errors: "{{ ansible_check_mode }}"
vars:
ansible_become: false

- name: Copy ZooKeeper archive to hosts
ansible.builtin.copy:
Expand Down

0 comments on commit 8da98e6

Please sign in to comment.