Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to skip logrotate installation #5

Open
bobrik opened this issue Mar 17, 2015 · 4 comments
Open

Add an option to skip logrotate installation #5

bobrik opened this issue Mar 17, 2015 · 4 comments

Comments

@bobrik
Copy link

bobrik commented Mar 17, 2015

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?

@nickhammond
Copy link
Owner

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.

@bobrik
Copy link
Author

bobrik commented Apr 30, 2015

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?

@nickhammond
Copy link
Owner

That makes sense to me, let me know if you still want to submit a PR or I can work on it too.

@rcuza
Copy link

rcuza commented Oct 18, 2018

I had a need for this flag so I made PR #43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants