-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlab3.yaml
63 lines (59 loc) · 1.78 KB
/
lab3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
- name: lab3
hosts: "{{ local }}"
ignore_unreachable: true
roles:
- geerlingguy.mac.homebrew
- geerlingguy.mac.mas
become: true
vars:
homebrew_cask_apps:
- processing
- arduino-ide
homebrew_installed_packages:
- tmux
#- node
- mas
#- fontforge
homebrew_cask_accept_external_apps: true
homebrew_cask_appdir: /Applications
install_homebrew_if_missing: true
homebrew_upgrade_all_packages: false
mas_installed_apps:
- { id: 421131143, name: "MPlayerX" }
- { id: 571213070, name: "DaVinci Resolve" }
mas_upgrade_all_apps: false
pre_tasks:
#- name: Ensuring macOS is the latest version
# command: softwareupdate -l
# register: macos_update_check
- name: Ensuring Homebrew is Installed
stat:
path: /usr/local/bin/brew
register: homebrew_check
- name: Fail if Homebrew is not installed and install_homebrew_if_missing is false
fail:
msg: Homebrew is missing...Install from http://brew.sh
when:
- not homebrew_check.stat.exists
- not install_homebrew_if_missing
- name: Installing Homebrew
shell: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
when:
- not homebrew_check.stat.exists
- install_homebrew_if_missing
tasks:
- name: Updating Homebrew
homebrew:
update_homebrew: false
when: homebrew_check.stat.exists
- name: Upgrading Homebrew Packages
homebrew:
upgrade_all: "{{ upgrade_homebrew_packages }}"
register: result
- name: Update macOS
command: softwareupdate -i
when: macos_update_check
- name: shutdown hosts
community.general.shutdown:
tags: never,shutdown