On Monday, March 31, 2014 1:53:19 PM UTC-7, Francisco Reyes wrote: > > On Monday, March 31, 2014 4:32:36 PM UTC-4, Adam Morris wrote: >> >> What you want to do here is.... >> .... >> 2) Add the .ssh directory >> > > What module should I use for that? > Tried calling mkdir from the shell command, which fails when the folder > already exists. >
You might want to look into the command module rather than shell (a bit safer but also a bit more limited) and the creates= argument to it... But yes, you use the file module to create directories as well as files. It's worth looking through the whole modules documentation index every now and again to see what is in there, and what has been added. I hope that this helps, Adam -- 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/e6ea40ff-a747-4c32-96ed-521a18cf90d8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
