On 14/12/10 17:07, psyber wrote:
On 12/14/2010 7:33 AM, Tim Watts wrote:
########################
Question 2

Related:

In a simple case as per documentation:

class syslog {
file { "/etc/syslog-ng/syslog-ng.conf":
path => "/etc/syslog-ng/syslog-ng.conf",
ensure => file,
mode => 644,
owner => root,
group => root,
notify => Service[syslog],
source => "puppet:///files/etc/syslog-ng/syslog-ng.conf"
}
}

is there no variable for the first instance of
"/etc/syslog-ng/syslog-ng.conf"
???

Mentioning a string 3 times or more strikes me as unnecessarily
verbose and likely to lead to typos.

Hi, and thanks for the reply...

Yeah your a perl guy,

Yep!

 I do the same thing, it's force of habit. The
example doesn't do a great job of highlighting that that string is
actually 3 completely different things so why not use 3 different names?

class syslog {
file { "syslog":
path => "/etc/syslog-ng/syslog-ng.conf",
ensure => file,
mode => 644,
owner => root,
group => root,
notify => Service[syslog],
source => "puppet:///files/base_syslog.conf"
}
}

OK - I did work out that the "path" is optional if the file block "name"
is the same,

I'm not in agreement with the abbreviated source line though - I like my files to be in the same basic tree as the target so I can find stuff and naming is fully deterministic - force of habit but I like that habit(!).

I presume, if I really wanted to, I could implement a new "file" module with a slightly different name to follow my preferred logic? I like the puppet "outer skeleton" but I'm not digging the file handling...

Have to learn ruby though...

Cheers

tim


--
Tim Watts
Personal Email

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to