Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcoca/ansible-tidy
tidy role
https://github.com/bcoca/ansible-tidy
Last synced: 12 days ago
JSON representation
tidy role
- Host: GitHub
- URL: https://github.com/bcoca/ansible-tidy
- Owner: bcoca
- Created: 2016-03-03T15:07:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T23:21:31.000Z (almost 8 years ago)
- Last Synced: 2024-10-24T11:45:41.082Z (2 months ago)
- Size: 2.93 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tidy
====A role to 'tidy up' a directory, feed it a path and a list of files that should be there and it will remove all the files that should not be there.
Role Variables
--------------###Required
* tidy_path: the path to the directory to 'tidy up', i.e `/etc/apache2/conf.d`
* tidy_expected: list of files that 'should be there', i.e `['vhost1.conf', 'vhost2.conf']`###Optional
* tidy_handler: A handler that will execute if files are deleted, it could use the `tidy_removed` var that cointains the deleted file list (`default: tidy_show`, prints the list to screen)
###Registered
* tidy_existing: list of files that existed in path, (default: [])
* tidy_removed: list of files removed, (default: [])Dependencies
------------N/A
Example Playbook
----------------Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: webservers
roles:
- { role: briancoca.tidy, tidy_path: /etc/apache2/conf.d, tidy_expected: ['vhost1.conf', 'vhost2.conf'], tidy_handler: mailme}License
-------GPLv3