Adding the relationship metaparameter#9
Open
mlehner616 wants to merge 5 commits into
Open
Conversation
Puppet ordering is not deterministic thus requiring us to explicitly set the relationship between resources. In this case, we need the curl command to "require" the file already be created before downloading contents into it. It will still work without this because it frankly doesn't matter if the file resource is called before or after the curl command is run.
Author
|
We should be able to merge #8 now. 👍 |
Owner
There was a problem hiding this comment.
This will be a duplicate resource error when ensure=absent, due to the code block below.
Author
There was a problem hiding this comment.
Ah missed that, thanks. So how about we move the new file resource at line 33 inside the else?
Like this:
...
} else {
file { $name:
owner => $owner,
group => $group,
mode => $mode,
}
$real_source = "https://${s3_domain}/${source}"
...
}Moving file resource inside the else to remove the duplicate declaration when ```ensure => absent``` is used
Author
|
Updated. Also wondered if I should add sensible default values for owner, group, and mode since these are not technically required for a file resource. |
Author
|
Any chance of getting this merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To avoid weird race conditions or other weird behavior, I added the require metaparameter to require that the file be created before curl is executed.