That works,  thanks!

On Thursday, March 2, 2023 at 12:33:32 PM UTC-5 Rowe, Walter P. (Fed) wrote:

> You need use the ansible_os_family fact as a key into your auditd_pkg 
> dictionary. 
>
> {{ auditd_pkg[ansible_os_family] }}
>
> Walter
> --
> Walter Rowe, Division Chief
> Infrastructure Services, OISM
> Mobile: 202.355.4123 <(202)%20355-4123>
>
> On Mar 2, 2023, at 11:57 AM, Kathy L <lyon...@gmail.com> wrote:
>
> 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 <class dict> and we were unable to convert 
> to list: * 
> How else can I list these variables without having specific os-related 
> files in each role?
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/c58a3df2-0639-47fd-85fd-801897604f4cn%40googlegroups.com
>  
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fc58a3df2-0639-47fd-85fd-801897604f4cn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C68d06190cc85493ff33d08db1b3f387c%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638133730561214803%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XeDLgivu3JfFz%2Bi%2FPqYZ6dhE0sYJFPT9LI2kcW2Dwcw%3D&reserved=0>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2a11a576-bdfb-417c-b2b0-5cc437101b39n%40googlegroups.com.

Reply via email to