V
V
Victor2014-03-20 20:41:12
Puppet
Victor, 2014-03-20 20:41:12

How to access a file in puppet manifest if it's not in a module?

I am writing a manifest (just a .pp file), is it possible to create a configs directory in the same folder and reference its files from the manifest?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2014-03-21
@opium

puppet's dock details how to refer to files

D
Dan Ivanov, 2014-03-22
@ptchol

"According to the correct", the files must be added either to the files directory or to the templates directory (if it is supposed to be a template).
And address him like that.

file { '/etc/motd' :
    ensure  => present,
    source  => 'puppet:///files/motd.conf'
}

The files directory must be at the same level as the manifests / modules / templates directories

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question