Created
October 21, 2013 03:50
-
-
Save darKoram/7078413 to your computer and use it in GitHub Desktop.
--start-at-task does not work with group-by groups, at least not for group-by ansible_os_family If hosts is one dynamically generated by group-by, --start-at-task="common | Task1" will skip all tasks.
if hosts is changed to something in hosts file, start-at-task works.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# roles/common/tasks/main.yml | |
- name: Task1 | |
command: echo task1 | |
- name: Task2 | |
command: echo task2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
tasks: | |
- group_by: key={{ ansible_os_family }} | |
- hosts: group_defined_in_hosts_file | |
#- hosts: RedHat | |
gather_facts: False | |
vars_files: | |
- "vars/{{ansible_os_family}}.yml" | |
roles: | |
- common |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment