fix(tasks): include verify_vars.yaml as tasks file
The variable verification was included via include_vars, which is meant for variable files only. Additionally the first_found lookup had no paths defined, so it searched the files/ subdirectory and the role root instead of tasks/ and failed with "No file was found". Switching to include_tasks and adding the tasks path makes the verification run at all. The assertion itself was fully commented out and is now active, so a misconfigured entry fails early instead of being silently skipped by all four sudoers tasks. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+4
-2
@@ -14,13 +14,15 @@
|
||||
- vars
|
||||
|
||||
- name: Verify variables
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||
ansible.builtin.include_tasks: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_facts['distribution'] }}_verify_vars.yaml"
|
||||
- "{{ ansible_facts['os_family'] }}_verify_vars.yaml"
|
||||
- "verify_vars.yaml"
|
||||
- verify_vars.yaml
|
||||
paths:
|
||||
- tasks
|
||||
|
||||
- name: Install sudo
|
||||
ansible.builtin.package:
|
||||
|
||||
Reference in New Issue
Block a user