-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.yml
48 lines (45 loc) · 1.5 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
---
- name: Configure macOS
hosts: machines
vars_files:
- default.config.yml
pre_tasks:
- name: "Verifying playbook requirements"
tags: ["always"]
block:
- name: Verify Ansible version.
assert:
that: "ansible_version.full is version_compare('2.13.0', '>=')"
msg: "You must update Ansible to at least 2.13.0 to use this version of macOS-ansible."
- name: Verify target system is running macOS.
assert:
that: "ansible_distribution == 'MacOSX'"
msg: "The target system is not running macOS."
- name: Verify macOS version.
assert:
that: "ansible_distribution_version is version_compare('12', '>=')"
msg: "The target system must be running macOS 12 (Monterey) or higher to use this version of macOS-ansible."
- name: Include playbook configuration.
include_vars: "{{ item }}"
with_fileglob:
- "{{ playbook_dir }}/config.yml"
tags: ["always"]
roles:
- role: elliotweiser.osx-command-line-tools
- role: geerlingguy.mac.homebrew
tags: ["homebrew"]
- role: shell
tags: [shell]
- role: geerlingguy.dotfiles
when: configure_dotfiles
tags: ["dotfiles"]
- role: node
tags: [node]
- role: geerlingguy.mac.mas
when: mas_installed_apps or mas_installed_app_ids
tags: ["mas"]
- role: settings
tags: [settings]
- role: projects
when: projects|count > 0
tags: [projects]