refactor(cis): align normalization with main project activation gate pattern

This commit is contained in:
2026-02-21 02:56:39 +01:00
parent d9efb54bec
commit a4ca4c4ff4
3 changed files with 27 additions and 16 deletions

View File

@@ -1,4 +1,10 @@
---
- name: Build cis_cfg from defaults and user overrides
- name: Normalize CIS input
ansible.builtin.set_fact:
cis_cfg: "{{ cis_defaults | combine(cis | default({}), recursive=true) }}"
cis_enabled: "{{ cis is defined and (cis is mapping or cis | bool) }}"
cis_input: "{{ cis if cis is mapping else {} }}"
- name: Normalize CIS configuration
when: cis_enabled and cis_cfg is not defined
ansible.builtin.set_fact:
cis_cfg: "{{ cis_defaults | combine(cis_input, recursive=True) }}"