Created
September 18, 2015 20:16
-
-
Save cmattoon/323d977c6c9cb7805366 to your computer and use it in GitHub Desktop.
Puppet file vs. URL
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
# Assume a file located at /etc/puppet/environments/development/modules/foo/files/bar/baz.txt | |
$file_contents = file('foo/bar/baz.txt', '/dev/null') | |
if $file_contents != '' { | |
file { '/tmp/baz.txt': | |
content => $file_contents | |
} | |
} | |
## OR... | |
$file_url = 'puppet:///modules/foo/bar/baz.txt' | |
file { '/tmp/baz.txt': | |
source => $file_url | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment