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

if $purge_config_dir=true, force-manage config_dir #426

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

unki
Copy link

@unki unki commented Feb 13, 2020

if $config_dir - e.g. /etc/prometheus - contains sub-directories and $purge_config_dir=true, then Puppet issues warnings about not being able to remove these sub-directories (see output below).

I've added the force-parameter to the file-resource - by keep using the value for $purge_config_dir for it.

Warning: /Stage[main]/Prometheus::Install/File[/etc/prometheus/console_libraries]: Could not back up file of type directory
Notice: /Stage[main]/Prometheus::Install/File[/etc/prometheus/console_libraries]: Not removing directory; use 'force' to override
Notice: /Stage[main]/Prometheus::Install/File[/etc/prometheus/console_libraries]/ensure: removed
Warning: /Stage[main]/Prometheus::Install/File[/etc/prometheus/consoles]: Could not back up file of type directory
Notice: /Stage[main]/Prometheus::Install/File[/etc/prometheus/consoles]: Not removing directory; use 'force' to override
Notice: /Stage[main]/Prometheus::Install/File[/etc/prometheus/consoles]/ensure: removed

@unki unki closed this Feb 18, 2020
@unki unki reopened this Feb 18, 2020
@unki
Copy link
Author

unki commented Feb 18, 2020

afaics the failing test is not related to my changes.

image

@baurmatt
Copy link
Contributor

Makes sense, thank you! :) Could you please extend the rspec tests as well? :)

@unki
Copy link
Author

unki commented Feb 27, 2020

Makes sense, thank you! :) Could you please extend the rspec tests as well? :)

Thx for considering it. Test has been extended.

@baurmatt baurmatt merged commit a79dae2 into voxpupuli:master Feb 27, 2020
@baurmatt
Copy link
Contributor

Thanks for your contribution! :)

Rovanion pushed a commit to Rovanion/puppet-prometheus that referenced this pull request May 5, 2021
if $purge_config_dir=true, force-manage config_dir
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants