Skip to content

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

Merged
apenney merged 2 commits into
puppetlabs:masterfrom
apenney:fix-absent
Jan 23, 2014
Merged

Fix ensure => absent with path => set.#134
apenney merged 2 commits into
puppetlabs:masterfrom
apenney:fix-absent

Conversation

@apenney

@apenney apenney commented Jan 21, 2014

Copy link
Copy Markdown

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