Have ansible manage the contents of a directory (including subdirectories)

59 views
Skip to first unread message

Mark Raider

unread,
Mar 26, 2015, 10:59:16 AM3/26/15
to ansible...@googlegroups.com
I am having difficulty figuring out how to have ansible manage the content of a directory, including subdirectories.

For example.. 

if I have the following

example_top_level_dir/
      -> subdir1
      -> subdir2

And I remove the subdir2 from Ansible...I want that reflected on the remote machine...Is there something similar to puppet's "purge" where I can basically "sync" a reference directory in Ansible on a remote machine?

Mark Raider

unread,
Mar 26, 2015, 11:10:54 AM3/26/15
to ansible...@googlegroups.com
Also should have included this in the initial post....I would prefer to not have to use the synchronize module as that requires rsync on both machines.
Reply all
Reply to author
Forward
0 new messages