Debian Codegraph @

test/integration/targets/setup_libxcrypt/tasks/main.yml

raw
1 - name: Gather facts
2 setup:
3 gather_subset: [min]
4
5 - name: Install libxcrypt on RedHat/CentOS/Fedora
6 when: ansible_facts.os_family == 'RedHat'
7 become: yes
8 package:
9 name: libxcrypt
10 state: present
11 notify: libxcrypt was installed
12
13 - name: Install libxcrypt on Debian/Ubuntu
14 when: ansible_facts.os_family == 'Debian'
15 become: yes
16 package:
17 name: libcrypt1
18 state: present
19 notify: libxcrypt was installed
20
21 - name: Install libxcrypt on macOS
22 when: ansible_facts.distribution == 'MacOSX'
23 block:
24 - name: MACOS | Find brew binary
25 command: which brew
26 register: brew_which
27
28 - name: MACOS | Get owner of brew binary
29 stat:
30 path: "{{ brew_which.stdout }}"
31 register: brew_stat
32
33 - name: MACOS | Install libxcrypt
34 command: brew install libxcrypt
35 notify: libxcrypt was installed
36 become: yes
37 become_user: "{{ brew_stat.stat.pw_name }}"
38 vars:
39 # Avoid using the current interpreter, which may be from a venv that the become user has no access to.
40 ansible_python_interpreter: "{{ lookup('env', 'ANSIBLE_TEST_PYTHON_INTERPRETER') }}"
41 environment:
42 HOMEBREW_NO_AUTO_UPDATE: True