File tree Expand file tree Collapse file tree 5 files changed +23
-2
lines changed
Expand file tree Collapse file tree 5 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 11[defaults]
22host_key_checking = False
33roles_path = ~/.ansible/roles:./roles
4+ callback_result_format = yaml
Original file line number Diff line number Diff line change 33 hosts : quadlet
44 gather_facts : true
55 roles :
6- - check_subuid_subgid
7- - check_hostname
6+ - checks
Original file line number Diff line number Diff line change 5050 - python3-psycopg2
5151 - python3-requests
5252 roles :
53+ - role : checks
5354 - role : certificates
5455 when : " certificate_source == 'default'"
5556 - role : certificate_checks
Original file line number Diff line number Diff line change 1+ - name : Check role block
2+ block :
3+ - name : Execute check role
4+ ansible.builtin.include_role :
5+ name : " {{ item }}"
6+ rescue :
7+ - name : Record check result
8+ ansible.builtin.set_fact :
9+ checks_results : " {{ (checks_results | default([])) + [ansible_failed_result] }}"
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Execute checks
3+ ansible.builtin.include_tasks : execute_check.yml
4+ loop :
5+ - check_hostname
6+
7+ - name : Report status of checks
8+ ansible.builtin.fail :
9+ msg : " {{ checks_results }}"
10+ when :
11+ - checks_results|default([])|length > 0
You can’t perform that action at this time.
0 commit comments