N
N
nano_e_t_42016-01-14 05:18:16
Puppet
nano_e_t_4, 2016-01-14 05:18:16

How to specify a file name?

Puppet guru, tell me plz, I faced such a dilemma:
Error 400 on SERVER: Files must be fully qualified at /etc/puppet/modules/ferm/manifests/extend.pp:6 on node slave.i-free.local
code:
define ferm::extend {
include ferm,
file { "/etc/ferm/ferm.d/${name}":
content => file( "puppet:///modules/ferm/${name}" )
}
}
node :
node 'slave.i-free.local' {
ferm::extend{"server": }
}
Google hasn't answered yet :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
demsi, 2017-05-25
@demsi

Puppet has files and there are templates. They must lie in clearly defined places.
Templates should be in modules/module_name/templates
Files should be in modules/module_name/files
That is, in your case. You need to create a modules/ferm/files folder , and create your ${name} file in it . That is, the full path to the modules/ferm/files/${name}
file. You can use it like this:

file { "/etc/ferm/ferm.d/${name}":
    source  => "puppet:///modules/ferm/${name}"
}

As you can see, there is no files folder in the path. This introduces some confusion. I had problems with this too.
You can read more in the docs https://docs.puppet.com/puppet/4.10/modules_fundam...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question