The role is updating /etc/group and /etc/gshadow system files from various 
sources, such as ldap and a central file which is now in Ansible. That's 
why I created a role and put all related data into it: "defaults", "files", 
"library" and "tasks" directories. Data in "defaults" is read by the 
main.yml task, no problem. But there are various files in "files" directory 
that should be chosen then read by the module located in "library".

On Thursday, June 4, 2015 at 3:16:23 PM UTC+2, Brian Coca wrote:
>
> Hi, it might be easier to use lookup plugins to pass the data to the 
> module, I really would need to know what the modules does and how it works 
> before I can tell you the best approach.
>
> On Thursday, June 4, 2015, <zorg...@gmail.com <javascript:>> wrote:
>
>> Hi Brian,
>>
>> I've written a Python module in a role using data that I'm going to 
>> change from time to time. That's why I wanted to separate the Python code 
>> from its data, I manually wrote it in a YAML file. I naively thought the 
>> "files" directory of the role would be the best place to keep it, but don't 
>> know how to access it from the running Python module.
>>
>> If it's not obvious, maybe I should keep data into the Python code of the 
>> module even if I don't feel it very clean (list of 80+ dictionaries)...
>>
>>
>>
>
> -- 
> Brian Coca
>
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3d00e8fb-acce-49a4-85f9-abaaccc49963%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to