minimal testing setup

1 view
Skip to first unread message

Bogdan Bivolaru

unread,
Oct 5, 2009, 5:36:26 AM10/5/09
to Puppet Users
Hello gals & guys,
I'm trying to make a simple site.pp manifest to verify that manifests
are applied to my nodes. I plan to start from that to develop more
complex scripts.

However I'm having trouble writing a manifest that initial manifest
and prove it works.
The problem with the example at http://reductivelabs.com/trac/puppet/wiki/InstallationGuide
# /etc/puppet/manifests/site.pp
file { "/etc/sudoers":
owner => root, group => root, mode => 440
}
is that there are no transaction changes to be made.

I tried to check that a certain package is installed, but again
nothing happens:
# /etc/puppet/manifests/site.pp
package {
ntp:
ensure => installed
}

Should I try some exec:
# /etc/puppet/manifests/site.pp
exec { "touchtest":
command => "/bin/touch /home/bogdanbiv/touchtest"
}

In other words, how do I say "Hello world!" in my puppet show?

Bogdan Bivolaru

unread,
Oct 5, 2009, 5:36:26 AM10/5/09
to Puppet Users

David Schmitt

unread,
Oct 5, 2009, 7:40:53 AM10/5/09
to puppet...@googlegroups.com
Bogdan Bivolaru wrote:
> Hello gals & guys,
> I'm trying to make a simple site.pp manifest to verify that manifests
> are applied to my nodes. I plan to start from that to develop more
> complex scripts.
>
> However I'm having trouble writing a manifest that initial manifest
> and prove it works.
> The problem with the example at http://reductivelabs.com/trac/puppet/wiki/InstallationGuide
> # /etc/puppet/manifests/site.pp
> file { "/etc/sudoers":
> owner => root, group => root, mode => 440
> }
> is that there are no transaction changes to be made.

For testing, always run puppetd on your client with --test. Add
--evaltrace to also show you resources that were evaluated but didn't
need to take action.


> In other words, how do I say "Hello world!" in my puppet show?

notify {
hello_world:
message => "Hello, World!"
}

Regards, DavidS

Reply all
Reply to author
Forward
0 new messages