mac-dev-playbook/main.yml
newtonne 2a0506bbcc Use absolute rather than relative path for config.yml
The relative path is relative to the files/ directory and so the include
breaks if that directory is deleted.

https://groups.google.com/forum/#!topic/ansible-project/MzSZLYhx5AY

Therefore seems more robust to switch to an absolute path making use of
`playbook_dir`.
2018-09-10 20:59:29 +01:00

44 lines
1,019 B
YAML

---
- hosts: all
connection: local
vars_files:
- default.config.yml
pre_tasks:
- include_vars: "{{ item }}"
with_fileglob:
- "{{ playbook_dir }}/config.yml"
tags: ['always']
roles:
- role: geerlingguy.homebrew
tags: ['homebrew']
- role: geerlingguy.dotfiles
when: configure_dotfiles
tags: ['dotfiles']
- role: geerlingguy.mas
when: mas_installed_apps
tags: ['mas']
tasks:
- include_tasks: tasks/ansible-setup.yml
- 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']
- 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) }}"