If it’s worthwhile to create a listing utilizing Ansible, then you are able to do the next:
Create a Listing in Ansible
You have to the file
module, then to create a listing you merely specify the choice state=listing
:
- identify: Creates a listing
file:
path: /src/www
state: listing
Notice that with state=listing
, all of the fast subdirectories shall be created in the event that they don’t exist already.
Extending the file
module
- identify: Creates a listing
file:
path: /src/www
state: listing
proprietor: www-data
group: www-data
mode: 0775
Create the Directories Recursively
- identify: Creates listing
file:
path: /src/www
state: listing
proprietor: www-data
group: www-data
mode: 0775
recurse: sure
That is much like the recursive
argument used with mkdir -p