mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-26 21:45:20 +02:00
Added another group_names validation
This commit is contained in:
parent
5adce08aea
commit
dc0bb555c1
@ -21,6 +21,14 @@
|
|||||||
applications: "{{ defaults_applications | merge_with_defaults(applications | default({}, true)) }}"
|
applications: "{{ defaults_applications | merge_with_defaults(applications | default({}, true)) }}"
|
||||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
|
- name: "Sanity check: all group_names must exist in applications"
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- item in applications
|
||||||
|
fail_msg: "Group '{{ item }}' has no entry in 'applications'"
|
||||||
|
success_msg: "Group '{{ item }}' is defined in 'applications'"
|
||||||
|
loop: "{{ group_names }}"
|
||||||
|
|
||||||
- name: Merge current play applications
|
- name: Merge current play applications
|
||||||
set_fact:
|
set_fact:
|
||||||
current_play_applications: >-
|
current_play_applications: >-
|
||||||
|
@ -218,7 +218,7 @@ class TestVariableDefinitions(unittest.TestCase):
|
|||||||
if var in (
|
if var in (
|
||||||
'lookup', 'role_name', 'domains', 'item', 'host_type',
|
'lookup', 'role_name', 'domains', 'item', 'host_type',
|
||||||
'inventory_hostname', 'role_path', 'playbook_dir',
|
'inventory_hostname', 'role_path', 'playbook_dir',
|
||||||
'ansible_become_password', 'inventory_dir', 'ansible_memtotal_mb', 'omit'
|
'ansible_become_password', 'inventory_dir', 'ansible_memtotal_mb', 'omit', 'group_names'
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user