-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.yml
90 lines (84 loc) · 2.28 KB
/
main.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
- hosts: all
connection: local
gather_facts: true # should be true if not it fails
roles:
- role: elliotweiser.osx-command-line-tools
when: ansible_facts['distribution'] == "MacOSX"
# Ensure installing Homebrew Packages
- hosts: all
serial: 1
connection: local
gather_facts: false
tasks:
- name: Print the brew packages to be installed
ansible.builtin.debug:
msg: Brew Package {{ homebrew_installed_packages }} will be installed
when: homebrew_installed_packages is defined
tags: ['brew']
- name: Install Homebrew Packages
import_role:
name: geerlingguy.mac.homebrew
vars:
# set variable for cask empty to separate the brew and cask installation
homebrew_cask_apps: []
homebrew_cask_uninstalled_apps: []
tags: ['brew']
# Ensure installing Homebrew Cask Packages - cask sometimes takes too much to wait when I only want to apply brew pkg changes only
- hosts: all
serial: 1
connection: local
gather_facts: false
tasks:
- name: Print the brew packages to be installed
ansible.builtin.debug:
msg: Brew Cask Package {{ homebrew_cask_apps }} will be installed
tags: ['cask']
- name: Install Homebrew Cask Packages
import_role:
name: geerlingguy.mac.homebrew
vars:
homebrew_installed_packages: [] # set homebrew_installed_packages empty to separate the brew and cask installation
tags: ['cask']
# Ensure other package installation such as, NPM, PIP, and so on
- hosts: all
serial: 1
connection: local
gather_facts: false
roles:
- role: geerlingguy.mac.mas
when: mas_installed_apps or mas_installed_app_ids
tags: ['mas']
- role: npm
tags: ["npm"]
- role: pip
tags: ["pip"]
# `gcloud` goal specific task
- hosts: gcloud
serial: 1
connection: local
gather_facts: false
roles:
- role: gcloud-components
tags: [components]
# envp
- hosts: envp
serial: 1
connection: local
gather_facts: false
roles:
- role: envp
tags: ["envp"]
# zsh
- hosts: default
serial: 1
connection: local
gather_facts: false
module_defaults:
ansible.builtin.get_url:
validate_certs: false
roles:
- role: starship
tags: ["starship", "zsh"]
- role: zsh
tags: ["zsh"]