-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.yml
More file actions
140 lines (126 loc) · 4.35 KB
/
Copy pathmain.yml
File metadata and controls
140 lines (126 loc) · 4.35 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
- hosts: all
gather_facts: true
vars_files:
- default.config.yml
pre_tasks:
- name: Check for local options file
ansible.builtin.stat:
path: "{{ lookup('env', 'HOME') }}/.setup-options"
register: local_options_file
- name: Include local configuration
ansible.builtin.include_vars:
file: "{{ lookup('env', 'HOME') }}/.setup-options"
when: local_options_file.stat.exists
- name: Update package managers
block:
- name: Update homewbrew packages
community.general.homebrew:
update_homebrew: true
when: ansible_pkg_mgr == "homebrew"
- name: Get list of installed packages
block:
- name: Get installed homebew packages
ansible.builtin.import_tasks: tasks/homebrew_list.yml
when: ansible_pkg_mgr == "homebrew"
tasks:
- ansible.builtin.import_tasks: tasks/ansible-pull-cron.yml
when: setup_ansible_pull
- ansible.builtin.import_tasks: tasks/dotfiles.yml
when: dotfiles
- ansible.builtin.import_tasks: tasks/oh-my-zsh.yml
when: oh_my_zsh
- ansible.builtin.import_tasks: tasks/vscode.yml
when: vscode
- ansible.builtin.import_tasks: tasks/mac-app-store.yml
when: mac_app_store
- name: Manage sync tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_sync_tools | default(false) }}"
groupname: sync
formulae: "{{ sync_formulae }}"
casks: "{{ sync_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage misc apps
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_misc_apps | default(false) }}"
groupname: misc
formulae: "{{ misc_formulae }}"
casks: "{{ misc_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage entertainment apps
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_entertainment_apps | default(false) }}"
groupname: entertainment
formulae: "{{ entertainment_formulae }}"
casks: "{{ entertainment_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage media tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_media_tools | default(false) }}"
groupname: media
formulae: "{{ media_formulae }}"
casks: "{{ media_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage kube tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_kube_apps | default(false) }}"
groupname: kube
taps: "{{ kube_taps }}"
formulae: "{{ kube_formulae }}"
casks: "{{ kube_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage dev tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_dev_tools | default(false) }}"
groupname: dev
formulae: "{{ devtools_formulae }}"
casks: "{{ devtools_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage common cli tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_common_cli_tools | default(false) }}"
groupname: common cli
formulae: "{{ common_cli_formulae }}"
casks: "{{ common_cli_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage aws tools
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: "{{ install_aws_tools | default(false) }}"
groupname: aws
formulae: "{{ aws_formulae }}"
casks: "{{ aws_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true
- name: Manage other packages
ansible.builtin.import_tasks: tasks/homebrew_packages.yml
vars:
enabled: true
groupname: other
formulae: "{{ install_other_formulae }}"
casks: "{{ install_other_casks }}"
when:
- ansible_pkg_mgr == "homebrew"
ignore_errors: true