forked from geerlingguy/mac-dev-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
75 lines (63 loc) · 2.09 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
---
- hosts: all
connection: local
vars_files:
- default.config.yml
pre_tasks:
- include_vars: "{{ item }}"
with_fileglob:
- "{{ playbook_dir }}/config.yml"
tags: ['always']
- debug: var=mas_installed_apps
roles:
- role: geerlingguy.homebrew
when: configure_homebrew
tags: ['homebrew']
- role: geerlingguy.dotfiles
when: configure_dotfiles
tags: ['dotfiles']
- role: visual-studio-code-extensions
users:
- username: "{{ansible_user_id}}"
visual_studio_code_extensions: "{{ visual_studio_code_extensions }}"
when: configure_visual_studio_code_extensions
- role: geerlingguy.mas
when:
- mas_installed_apps
- configure_mas
tags: ['mas']
tasks:
- include_tasks: tasks/ansible-setup.yml
- include_tasks: tasks/preferences.yml
when: configure_prefs
- include_tasks: tasks/sudoers.yml
when: configure_sudoers
- include_tasks: tasks/terminal.yml
when: configure_terminal
- include_tasks: tasks/osx.yml
when: configure_osx
tags: ['osx']
- include_tasks: tasks/extra-packages.yml
tags: ['extra-packages']
- include_tasks: tasks/repositories.yml
when: configure_repositories
- include_tasks: tasks/npm.yml
when: configure_npm
- name: Remove all unwanted items from dock
shell: dockutil --remove "{{ item }}"
ignore_errors: true
with_items: "{{ dock_items_to_remove }}"
when: configure_dock_items
- name: Check if items in dock exist
shell: dockutil --find '{{ item.name }}' || dockutil --add '{{ item.path }}'
with_items: "{{ dock_items_to_persist }}"
when: configure_dock_items
- name: Run configured post-provision ansible task files.
include_tasks: "{{ outer_item }}"
loop_control:
loop_var: outer_item
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
- name: Fix order
shell: dockutil --move '{{ item.name }}' --position {{ item.pos }}
with_items: "{{ dock_items_to_persist }}"
when: configure_dock_items