dyngroups: Always run all tasks
Adding the `always` tag to the tasks in `dyngroups.yml` ensures that hosts will get added to the appropriate groups dynamically, even when running a subset of tasks by targeting specific tags. Ansible will always run tasks with this tag when a tag selection is passed to `ansible-playbook`.no-vault-in-inventory
parent
1226f1f005
commit
60fa380e5d
|
@ -5,16 +5,20 @@
|
||||||
group_by:
|
group_by:
|
||||||
key: '{{ ansible_distribution }}'
|
key: '{{ ansible_distribution }}'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
tags: always
|
||||||
- name: group hosts by distribution+version
|
- name: group hosts by distribution+version
|
||||||
group_by:
|
group_by:
|
||||||
key: '{{ ansible_distribution }}{{ ansible_distribution_major_version }}'
|
key: '{{ ansible_distribution }}{{ ansible_distribution_major_version }}'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
tags: always
|
||||||
- name: group hosts by os family
|
- name: group hosts by os family
|
||||||
group_by:
|
group_by:
|
||||||
key: '{{ ansible_os_family }}'
|
key: '{{ ansible_os_family }}'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
tags: always
|
||||||
- name: group hosts by virtualization
|
- name: group hosts by virtualization
|
||||||
group_by:
|
group_by:
|
||||||
key: >-
|
key: >-
|
||||||
{{ ansible_virtualization_type }}-{{ ansible_virtualization_role }}
|
{{ ansible_virtualization_type }}-{{ ansible_virtualization_role }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
tags: always
|
||||||
|
|
Loading…
Reference in New Issue