Is there a (simple) way to have puppet use a file available on the internet for the Source property of a File?
eg:
file { "/home/text.txt":
source => [
"http://www.example.com/text.txt",
]
}
Is there a (simple) way to have puppet use a file available on the internet for the Source property of a File?
eg:
file { "/home/text.txt":
source => [
"http://www.example.com/text.txt",
]
}
I'm writing an updated answer to notify future readers that now the File resource indeed implements the HTTP source.
From the docs:
So you can use the construct as you wrote it:
It's been requested as a feature for years... But you'd end up needing a custom function for this... or to use
curl
orwget
. See Puppet Forge.What's in text.txt?
It's not possible out of the box right now:
I ended up using
define
I found on the internet: