|
9 | 9 | - name: "Download command line tools dmg"
|
10 | 10 | ansible.builtin.get_url:
|
11 | 11 | url: https://artifactory.ccdc.cam.ac.uk/artifactory/ccdc-3rdparty-macos-xcode-installers/Command_Line_Tools_for_Xcode_12.4.dmg
|
12 |
| - dest: /Users/vagrant/Downloads/Command_Line_Tools_for_Xcode_12.4.dmg |
| 12 | + dest: "{{ ansible_env.HOME }}/Downloads/Command_Line_Tools_for_Xcode_12.4.dmg" |
13 | 13 | mode: 0755
|
14 | 14 | url_username: "{{ ansible_deployment_artifactory_user }}"
|
15 | 15 | headers:
|
|
18 | 18 |
|
19 | 19 | - name: Create temporary download directory for command line tools
|
20 | 20 | ansible.builtin.file:
|
21 |
| - path: /Users/vagrant/Downloads/clt |
| 21 | + path: "{{ ansible_env.HOME }}/Downloads/clt" |
22 | 22 | state: directory
|
23 | 23 | mode: '0755'
|
24 | 24 | when: clt_pkg_info.rc != 0
|
25 | 25 |
|
26 | 26 | - name: "Mount command line tools dmg" # noqa: no-changed-when
|
27 |
| - ansible.builtin.command: hdiutil attach /Users/vagrant/Downloads/Command_Line_Tools_for_Xcode_12.4.dmg -nobrowse -mountpoint /Users/vagrant/Downloads/clt |
| 27 | + ansible.builtin.command: hdiutil attach "{{ ansible_env.HOME }}/Downloads/Command_Line_Tools_for_Xcode_12.4.dmg" -nobrowse -mountpoint "{{ ansible_env.HOME }}/Downloads/clt" |
28 | 28 | when: clt_pkg_info.rc != 0
|
29 | 29 |
|
30 | 30 | - name: Install command line tools package # noqa: no-changed-when
|
31 |
| - ansible.builtin.command: installer -pkg "/Users/vagrant/Downloads/clt/Command Line Tools.pkg" -target / |
| 31 | + ansible.builtin.command: installer -pkg "{{ ansible_env.HOME }}/Downloads/clt/Command Line Tools.pkg" -target / |
32 | 32 | when: clt_pkg_info.rc != 0
|
33 | 33 | become: true
|
34 | 34 |
|
|
37 | 37 | when: clt_pkg_info.rc != 0
|
38 | 38 |
|
39 | 39 | - name: "Unmount command line tools dmg" # noqa: no-changed-when
|
40 |
| - ansible.builtin.command: hdiutil detach /Users/vagrant/Downloads/clt |
| 40 | + ansible.builtin.command: hdiutil detach "{{ ansible_env.HOME }}/Downloads/clt" |
41 | 41 | when: clt_pkg_info.rc != 0
|
42 | 42 |
|
43 | 43 | - name: "Remove command line tools dmg mountpoint"
|
44 | 44 | ansible.builtin.file:
|
45 |
| - path: /Users/vagrant/Downloads/clt |
| 45 | + path: "{{ ansible_env.HOME }}/Downloads/clt" |
46 | 46 | state: absent
|
47 | 47 |
|
48 | 48 | - name: Install homebrew
|
|
0 commit comments