Merge pull request #45 from generoi/tags
Add ansible tags for the commonly ran tasks
This commit is contained in:
commit
58e256cb62
@ -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.
|
> 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
|
## Overriding Defaults
|
||||||
|
|
||||||
Not everyone's development environment and preferred software configuration is the same.
|
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 }}"
|
- include_vars: "{{ item }}"
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- ../config.yml
|
- ../config.yml
|
||||||
|
tags: ['always']
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- geerlingguy.homebrew
|
- role: geerlingguy.homebrew
|
||||||
- geerlingguy.dotfiles
|
tags: ['homebrew']
|
||||||
- name: geerlingguy.mas
|
- role: geerlingguy.dotfiles
|
||||||
|
tags: ['dotfiles']
|
||||||
|
- role: geerlingguy.mas
|
||||||
when: mas_installed_apps
|
when: mas_installed_apps
|
||||||
|
tags: ['mas']
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: tasks/ansible-setup.yml
|
- include: tasks/ansible-setup.yml
|
||||||
@ -27,6 +31,7 @@
|
|||||||
|
|
||||||
- include: tasks/osx.yml
|
- include: tasks/osx.yml
|
||||||
when: configure_osx
|
when: configure_osx
|
||||||
|
tags: ['osx']
|
||||||
|
|
||||||
- name: Run configured post-provision ansible task files.
|
- name: Run configured post-provision ansible task files.
|
||||||
include: "{{ outer_item }}"
|
include: "{{ outer_item }}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user