diff --git a/test/integration/targets/iso_extract/aliases b/test/integration/targets/iso_extract/aliases index 25e3fdece4..4485d76162 100644 --- a/test/integration/targets/iso_extract/aliases +++ b/test/integration/targets/iso_extract/aliases @@ -1,2 +1 @@ posix/ci/group1 -skip/osx diff --git a/test/integration/targets/iso_extract/tasks/7zip.yml b/test/integration/targets/iso_extract/tasks/7zip.yml index e176111d8b..bdf2625dc7 100644 --- a/test/integration/targets/iso_extract/tasks/7zip.yml +++ b/test/integration/targets/iso_extract/tasks/7zip.yml @@ -53,17 +53,24 @@ become: yes when: ansible_distribution in ['Ubuntu'] -# FIXME: The homebrew module no longer seems to work -# "Error: Running Homebrew as root is extremely dangerous." +- name: Find brew binary + command: which brew + register: brew_which + when: ansible_distribution in ['MacOSX'] + +- name: Get owner of brew binary + stat: + path: "{{ brew_which.stdout }}" + register: brew_stat + when: ansible_distribution in ['MacOSX'] + - name: Install 7zip package if we are on MacOSX -# macports: -# name: p7zip -# state: installed -# update_cache: yes homebrew: name: p7zip state: present - update_homebrew: yes + update_homebrew: no + become: yes + become_user: "{{ brew_stat.stat.pw_name }}" when: ansible_distribution in ['MacOSX'] - name: Install 7zip package if we are on FreeBSD