ansible-logrotate
ansible-logrotate copied to clipboard
Add an option to skip logrotate installation
Some people run on weird systems without apt (like Gentoo), but still want to use configuration management tools. I can come up with PR that allows to skip logrotate installation. What do you think?
I'm not very familiar with Gentoo but it sounds like whatever other management tool you're using relies on or can use the /etc/logrotate configuration, is that correct? What would be the typical setup steps then? Sorry for the delayed reply, this didn't make it to my inbox for some reason.
This one fails:
- name: nickhammond.logrotate | Install logrotate
action: "{{ansible_pkg_mgr}} pkg=logrotate state=present"
In Gentoo ansible_pkg_mgr resolves to portage: http://docs.ansible.com/portage_module.html
Error: msg: unsupported parameter for module: pkg
I think we could change task to this:
- name: nickhammond.logrotate | Install logrotate
action: "{{ansible_pkg_mgr}} pkg=logrotate state=present"
when: logrotate_install_package
With default value of logrotate_install_package set to true. This way it would be backwards-compatible and usable by people whose package management module does not work like apt.
What do you think?
That makes sense to me, let me know if you still want to submit a PR or I can work on it too.
I had a need for this flag so I made PR #43.