diff options
Diffstat (limited to 'test/integration/targets/setup_gnutar')
-rw-r--r-- | test/integration/targets/setup_gnutar/handlers/main.yml | 6 | ||||
-rw-r--r-- | test/integration/targets/setup_gnutar/tasks/main.yml | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/setup_gnutar/handlers/main.yml b/test/integration/targets/setup_gnutar/handlers/main.yml new file mode 100644 index 00000000..d3fa7c27 --- /dev/null +++ b/test/integration/targets/setup_gnutar/handlers/main.yml @@ -0,0 +1,6 @@ +- name: uninstall gnu-tar + command: brew uninstall gnu-tar + become: yes + become_user: "{{ brew_stat.stat.pw_name }}" + environment: + HOMEBREW_NO_AUTO_UPDATE: True diff --git a/test/integration/targets/setup_gnutar/tasks/main.yml b/test/integration/targets/setup_gnutar/tasks/main.yml new file mode 100644 index 00000000..b7d841cd --- /dev/null +++ b/test/integration/targets/setup_gnutar/tasks/main.yml @@ -0,0 +1,18 @@ +- when: ansible_facts.distribution == 'MacOSX' + block: + - name: MACOS | Find brew binary + command: which brew + register: brew_which + + - name: MACOS | Get owner of brew binary + stat: + path: "{{ brew_which.stdout }}" + register: brew_stat + + - command: brew install gnu-tar + become: yes + become_user: "{{ brew_stat.stat.pw_name }}" + environment: + HOMEBREW_NO_AUTO_UPDATE: True + notify: + - uninstall gnu-tar |