Ask Your Question

puppet Cannot use URLs of type 'http' as source for fileserving

asked 2016-11-28 21:12:18 -0600

weiping gravatar image

hello, everyone! I want to use other file-server instead of puppet build-in file-server which means I don't want to use "puppet:///" as file source. I tired rsync, which makes me have to modify pp files too much. So is there any other solution to fix this problem ?

here is my pp file

node '' {
    notify{"This is ${hostname}!Test message!":}
        owner => 'root',
        group => 'root',
        ensure => present,
        path => "/opt/puppet/files/test/test.txt",
        source => "",

error:puppet Cannot use URLs of type 'http' as source for fileserving

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-12-01 15:45:36 -0600

DarylW gravatar image

It isn't a 'file' resource, but you can use the archive module to source files (and decompress archives) from various remote locations, including http, https, ftp, s3, etc..

edit flag offensive delete link more

answered 2016-11-30 06:38:18 -0600

updated 2016-11-30 06:48:31 -0600

is there a reason you dont want to use the puppet fileserver? If its just wanting to use directories other than moduledire/files then you can edit $confdir/fileserver.conf - in there you can add an extra_files section to point to different directories.

the file resource historically has only supported puppet:// or file:// formats - looksl ike released in newer versions of puppet 4..)

if you want it on a completely different server I'd suggest unfortunately using exec with wget or curl ...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-11-28 21:12:18 -0600

Seen: 806 times

Last updated: Dec 01 '16