Hello there Andrew
I have a feeling i had a spurious control character, because i did a
test module:
class test
{
if (skip_test != "true")
{
file
{ "/var/baz/":
ensure => directory,
}
file
{ "/var/baz/foo":
path => "/var/baz/foo",
source => "puppet:///test/foo",
require => file["/var/baz"],
}
file
{ "/var/baz/bar":
path => "/var/baz/bar",
source => "puppet:///test/bar",
require => file["/var/baz"],
}
}
}
which consistently worked, so i revisited my real module, which was
giving errors it could not find (based on the above) File["/var/baz"]
even though my code said ... the same. I retyped the line (believing
in gremlins, ferries, malicious spirits and invisible control
characters) and things stopped failing.
my code, which is still very much in development (for those who want
to weep):
class bigbrother
{
if (skip_bigbrother != "true")
{
user
{ "bb":
name => "bb",
uid => "920",
gid => "920",
comment => "Big Brother",
home => "/var/bb/bb",
shell => "/bin/sh",
}
file
{ "/var/bb":
ensure => directory,
}
file
{ "/var/bb/bbc1.9e-btf":
path => "/var/bb/bbc1.9e-btf",
owner => bb,
group => bb,
mode => 775,
recurse => true,
source => "puppet:///bigbrother/bbc1.9e-
btf_generic",
require => [ file["/var/bb"], user["bb"] ],
ignore => ".svn"
}
file
{ "/var/bb/bb":
ensure => "/var/bb/bbc1.9e-btf",
require => file["/var/bb/bbc1.9e-btf"],
}
## edit the bb-hosts file
bb-hosts
{ puppet:
ipaddress => $ipaddress,
fqdn => $fqdn,
require => file["/var/bb/bb"],
}
## choose by OS for specific
case $operatingsystem
{
## or centos
redhat:
{
file
# { "/var/bb/bbc1.9e-btf_linux/etc":
{ "/var/bb/bbc1.9e-btf/etc":
# path => "/var/bb/bbc1.9e-btf/etc",
owner => bb,
group => bb,
mode => 775,
# recurse => true,
source =>
[
"puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbdef.sh",
"puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbsys.local",
"puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbsys.sh",
],
require => file["/var/bb/bbc1.9e-btf"],
ignore => ".svn",
}
#
# file
# { "/var/bb/bbc1.9e-btf_linux/bin":
## path => "/var/bb/bbc1.9e-btf/bin",
# owner => bb,
# group => bb,
# mode => 775,
## recurse => true,
# source =>
# [
#
"puppet:///bigbrother/bbc1.9e-btf_linux/bin/bb",
#
"puppet:///bigbrother/bbc1.9e-btf_linux/bin/bbrun",
#
"puppet:///bigbrother/bbc1.9e-btf_linux/bin/getipaddr",
#
"puppet:///bigbrother/bbc1.9e-btf_linux/bin/tcp_wrapper.sh",
#
"puppet:///bigbrother/bbc1.9e-btf_linux/bin/touchtime",
# ],
## require => file["/var/bb/bbc1.9e_btf"],
# }
#
# file
# { "/var/bb/bbc1.9e-btf_linux/init":
# path => "/etc/rc.d/init.d/bigbrother-
client-local",
# owner => root,
# group => root,
# mode => 700,
# source =>
"puppet:///bigbrother/bbc1.9e-
btf_linux/init/bigbrother-client-local",
# # require => [
file["/var/bb/bbc1.9e-btf_linux/
etc"], file["/var/bb/bbc1.9e-btf_linux/bin"], ],
# }
#
# exec
# { "/sbin/chkconfig bigbrother-client-local on":
# cwd => "/",
## require =>
file["/var/bb/bbc1.9e-btf_linux/init"],
# }
#
}
}
}
}
define bb-hosts($ipaddress, $fqdn)
{
file
{ "/var/bb/bb/etc/bb-hosts":
path => "/var/bb/bb/etc/bb-hosts",
owner => bb,
group => bb,
mode => 664,
content => template("bigbrother/bb-hosts.erb"),
notify => Service[bigbrother-client-local],
}
service
{ bigbrother-client-local:
ensure => running,
}
}
But like i said, all the commented in stuff is starting to work.
cheers
chakkerz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---