Check Multiple Directory Exists in File Module with state as directory

356 views
Skip to first unread message

dinesh kumar

unread,
Jul 23, 2015, 1:06:36 PM7/23/15
to Ansible Project
Hi i am trying to verify/create multiple folder exists in remote. What i've now is

- file: path="{{download_location}}" state=directory
- file: path="{{applications_location}}" state=directory

Is there any way to check muliple folder exists?

or is this preferred mkdir -p dir1 dir2 ... ?

Brian Coca

unread,
Jul 23, 2015, 1:06:55 PM7/23/15
to Ansible Project
- file: path="{{item}}" state=directory
with_items:
> --
> 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 post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4d23d450-5132-429b-b5bb-99b05a8a05a7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages