summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/setup_gnutar/tasks/main.yml
blob: b7d841cde60f161b5b234669e6a201c1c700f1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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