-
Notifications
You must be signed in to change notification settings - Fork 80
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
Setting ensure => absent deletes /etc when used as configdir #59
Comments
Hi, The configdir part is indeed fully removed since i assumed people would select a reasonable subdir and not something like /etc :-) I'm thinking of a sensible solution for this and hopefully get it in a next release. |
Hi Richard I get the comment about choosing a safe configdir but this was on a node /etc was chosen as configdir to match hosts where the package had been Kind regards,
|
Hi Julian, If I may, let me propose you this way to manage old installation. ensure => absent,
# others parameters
before => Class['logstashforwarder'], and add the new installation with the logstashforwarder module. This can clean your old installation and install the new one, and that will prevent from future manual installation. |
Many thanks for the replies. modules/logstashforwarder/manifests/config.pp: Maybe neither the force nor recurse are necessary if the package installation should attempt to purge the configdir. Or perhaps give the user control over whether to force removal with a more forgiving default. |
I am deploying logstash-forwarder to a number of nodes but wanted to exclude the logstash master.
I have done this through Hiera and the following settings:
classes:
logstashforwarder::servers:
logstashforwarder::package_url: http://packages.elasticsearch.org/logstashforwar
der/debian/pool/main/l/logstashforwarder/logstash-forwarder_0.4.0_amd64.deb
logstashforwarder::configdir: /etc
logstashforwarder::ssl_ca: /etc/pki/tls/certs/logstash-forwarder.crt
When the logstash master is set to exclude the forwarder with,
logstashforwarder::ensure: absent
Running,
puppet agent --test
notice: /Stage[main]/Logstashforwarder::Config/File[/etc]/ensure: removed
And /etc is no more. Package removal scripts typically take a more forgiving approach to directories that have other data in them.
The text was updated successfully, but these errors were encountered: