I can think of a couple of ways - there are probably more

One way would be by having both playbooks include a vars file which has the 
list of mounts in it:

http://docs.ansible.com/ansible/include_vars_module.html

or you could add the list of mounts to a group variable and have it apply 
to both playbooks by having both playbooks work against that group of hosts

See 
http://docs.ansible.com/ansible/playbooks_best_practices.html#group-and-host-variables
 
for more about group vars.

Hope this helps,

Jon




On Monday, July 11, 2016 at 8:21:12 AM UTC+1, Frank Thommen wrote:
>
> Hi, 
>
> I'm currently evaluating ansible as a candidate for our future CM tool. 
>   I'm stuck with the issue, that we have "blocks" of resources (e.g. a 
> list of around 30 NFS mounts) which we'd like to be able to switch on 
> and off w/o repeating the complete resources in two playbooks.  How can 
> we have two playbooks, one mounting the mounts, the other unmounting 
> them w/o having to duplicate the whole list in both playbooks? 
>
> I'm sure there is a way, I just dont seem to be able to find the 
> appropriate documentation page. 
>
> Any pointer is appreciated 
> frank 
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d22afed3-6f07-412e-9cc5-03dd5c019c5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to