mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-21 19:33:03 +00:00
Merge pull request #45 from generoi/tags
Add ansible tags for the commonly ran tasks
This commit is contained in:
commit
58e256cb62
2 changed files with 14 additions and 3 deletions
|
@ -23,6 +23,12 @@ This is a work in progress, and is mostly a means for me to document my current
|
|||
|
||||
> Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case.
|
||||
|
||||
### Running a specific set of tagged tasks
|
||||
|
||||
You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas` and `osx`.
|
||||
|
||||
ansible-playook main.yml -i inventory -K --tags "dotfiles,homebrew"
|
||||
|
||||
## Overriding Defaults
|
||||
|
||||
Not everyone's development environment and preferred software configuration is the same.
|
||||
|
|
11
main.yml
11
main.yml
|
@ -9,12 +9,16 @@
|
|||
- include_vars: "{{ item }}"
|
||||
with_fileglob:
|
||||
- ../config.yml
|
||||
tags: ['always']
|
||||
|
||||
roles:
|
||||
- geerlingguy.homebrew
|
||||
- geerlingguy.dotfiles
|
||||
- name: geerlingguy.mas
|
||||
- role: geerlingguy.homebrew
|
||||
tags: ['homebrew']
|
||||
- role: geerlingguy.dotfiles
|
||||
tags: ['dotfiles']
|
||||
- role: geerlingguy.mas
|
||||
when: mas_installed_apps
|
||||
tags: ['mas']
|
||||
|
||||
tasks:
|
||||
- include: tasks/ansible-setup.yml
|
||||
|
@ -27,6 +31,7 @@
|
|||
|
||||
- include: tasks/osx.yml
|
||||
when: configure_osx
|
||||
tags: ['osx']
|
||||
|
||||
- name: Run configured post-provision ansible task files.
|
||||
include: "{{ outer_item }}"
|
||||
|
|
Loading…
Reference in a new issue