Skip to content

Instantly share code, notes, and snippets.

@darKoram
Created October 21, 2013 03:50
Show Gist options
  • Save darKoram/7078413 to your computer and use it in GitHub Desktop.
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.
---
# roles/common/tasks/main.yml
- name: Task1
command: echo task1
- name: Task2
command: echo task2
- 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