In our playbooks, we used to load one OS-specific vars file for all our roles. Now we’d like to move the variables into each role. A method I had to do this before does not seem to be working. For our auditd role, in the vars/main.yml file I have this:
auditd_pkg:
CentOS: audit
Rocky: audit
Debian: auditd
Ubuntu: auditd
But it gives me this error:
argument ‘package’ is of type and we were unable to convert to list:
How else can I list these variables without having specific os-related files in each role?