Question
Here my directory structure :
- classes
-- test.pp
- site.pp
Now the content of test.pp is :
class test{
file { '/puppet/test/dir' :
ensure => directory,
}
}
And my site.pp is as follows :
import 'classes/*.pp'
node 'nodename'{
include test
}
The output of puppet agent --no-daemonize --onetime --verbose is showing this :
Output is saying that the puppet finished catalog thing but even then the folder is not created. What is my mistake?
Solution
Do you use Vagrant and test it there? My first thoughts would be 'nodename' is not the same as the hostname. Second, maybe you'll need to create
file{ ['/puppet/test/', '/puppet/test/dir/']:
ensure=>directory
}
Guessing a little.
Copy/pasted as per request :)
OTHER TIPS
Is this a client or the puppet master? Looks like you are missing the colon.
class test{
file { '/puppet/test/dir':
ensure => directory,
}
and rather than doing a puppet agent -t
do puppet apply site.pp
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow