Skip to content

Commit

Permalink
common: ensure download on controller does not required root priv
Browse files Browse the repository at this point in the history
  • Loading branch information
rpelisse committed Sep 27, 2023
1 parent 3ecadf9 commit 05a2817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/amq_streams_common/tasks/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
quiet: True
fail_msg: "Cannot install Red Hat Enterprise Application AMQ Streams without RHN service accounts credentials. Verify rhn_username and rhn_password are defined or set amq_streams_offline_install"


- name: "Determine current working directory to set as download target - if not specified."
ansible.builtin.set_fact:
amq_streams_common_download_dir: "{{ lookup('env', 'pwd') | default('.') }}"
Expand All @@ -30,6 +29,7 @@
owner: "{{ amq_streams_common_download_user | default(omit) }}"
group: "{{ amq_streams_common_download_group | default(omit) }}"
register: download_dir
become: "{{ amq_streams_common_download_become | default('no') }}"
delegate_to: localhost

- name: "Verify that download directory exist."
Expand All @@ -54,5 +54,6 @@
group: "{{ amq_streams_common_download_group | default(omit) }}"
mode: 0644
delegate_to: localhost
become: "{{ amq_streams_common_download_become | default('no') }}"
when:
- not download_target_file.stat.exists

0 comments on commit 05a2817

Please sign in to comment.