-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
ensure => 'absent' on nginx::resource::server leaves file behind #1103
Comments
I'm curious, if you remove the server resource rather than set That said, I agree with your assessment of what's happening and your proposed fix seems reasonable. Can you test #1104 and see if that works as you suggested? |
ps - PRs also welcomed if that's something you're interested in / comfortable with. |
Ensure absent on concat resource for server resource with ensure => absent (#1103)
Closed via #1104 |
I'm not 100% sure, but also with The code doesn't really do a lot to remove locations, does it? |
@bittner I think you're right that puppet-nginx/manifests/resource/location.pp Lines 246 to 249 in 5f0ed59
servers if you set ensure => absent as there will no longer be any concat::fragments added to the config_file
I don't think setting |
Ensure absent on concat resource for server resource with ensure => absent (voxpupuli#1103)
Ensure absent on concat resource for server resource with ensure => absent (voxpupuli#1103)
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce
Create a server with something like:
Then mark it absent:
What are you seeing
The locations are removed from the server, and the sites-enabled symlink is removed, but the emptied server definition still lives in sites-available. (As the locations are removed, it's kind-of useless; you couldn't "just" re-symlink it anyway.)
What behaviour did you expect instead
I'd expect the server definition file to be removed from sites-available as well.
Additional information
$ensure
value to the concat_file definition at https://github.com/voxpupuli/puppet-nginx/blob/v0.7.0/manifests/resource/server.pp#L304 - that way the entire file will be absent, rather than just the locations within it.file {}
to clean up after a server definition is removed.The text was updated successfully, but these errors were encountered: