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

Fix ensure => absent with path => set. #134

Merged
merged 2 commits into from
Jan 23, 2014
Merged

Fix ensure => absent with path => set. #134

merged 2 commits into from
Jan 23, 2014

Conversation

apenney
Copy link

@apenney apenney commented Jan 21, 2014

The current code doesn't correctly account for an absent with a
path set, incorrectly trying to remove $name instead. Fixing this
raised the issue that fragments left with no ensure will fail when
absent is set as the fragdir is deleted.

As a workaround for this we check the ensure parameter from the
concat{} resource with getparam() and then pass that to the fragment
if no specific ensure was passed in. This effectively ensures
fragments inherit their parents ensure status.

Ashley Penney added 2 commits January 21, 2014 16:28
The current code doesn't correctly account for an absent with a
path set, incorrectly trying to remove $name instead.  Fixing this
raised the issue that fragments left with no ensure will fail when
absent is set as the fragdir is deleted.

As a workaround for this we check the `ensure` parameter from the
concat{} resource with getparam() and then pass that to the fragment
if no specific ensure was passed in.  This effectively ensures
fragments inherit their parents ensure status.
getparam() unfortunately only arrived in 4.x, so switch.
apenney pushed a commit that referenced this pull request Jan 23, 2014
Fix ensure => absent with path => set.
@apenney apenney merged commit b592726 into puppetlabs:master Jan 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants