similar to: Definition specialization

Displaying 20 results from an estimated 7000 matches similar to: "Definition specialization"

2007 Mar 07
8
Writing definitions to support changing defaults
What is the right way to write definition so that defaults can be overriden? $puppetdir = "puppet://$server/files" define remotefile($source, $owner = "root", $group = "root", $mode = 0644, $backup = false, $recurse = false) { file { $name: mode => $mode, owner => $owner, group => $group, backup => $backup,
2007 Mar 01
8
upgrading puppet?
How are people upgrading puppet itself on their hosts that run puppetd? Can puppet be used to upgrade to a new puppet package via gem, rpm or some other package provider? How do you handle restarting? Just hoping theres a better way than "ssh and a for loop" or having to have another configuration management system installed.
2007 Jan 10
3
Newbie question on file source
Hi, Please correct me if I''m wrong but it seems to me that in the case of a remote file source the path must contain the plain filename after the module and paths with directory elements are not supported. What I wanted is the following: +++++ fileserver.conf +++++ [system] path /services/puppet/common/ allow * +++++ site.pp +++++++++++++ file {
2007 Jan 25
4
Conditional exec
I am trying to write a definition that downloads and extracts a tar file if the destination directory does not exist. The tar file won''t change and does not need to be download and extracted if it changes. The definition I am using now is: define remote_tar($source, $directory) { remotefile { "/tmp/$name.tgz": source => $source, } exec {
2007 Jan 29
1
Run command when file changes
I am writing a definition that installs a crontab. I would like it to run the command only when the downloaded file changes. I am using "subscribe" but it doesn''t seem to do the job. The exec command is run every time. define crontab($host = $hostname) { $path = "/tmp/$name.$host.cron" remotefile { $path: source =>
2007 Sep 24
3
conceptual problem deploying git repos to a puppetmaster
So before I start I should be upfront and disclose that I''m using external_nodes, so in keeping with that I''m trying as hard as possible to keep all the actually ''specific'' data in the node config files (currently just yaml)and have nothing specific in modules especially. So I have this definition: (credit goes to DavidS for the inspiration) define git::repo (
2007 May 26
13
munin module: manage clients and server''s config
Hello all. Probably this question has already been posed in the context of another software, but I am unable to find it. I would like to implement a module which should manage munin-clients as well as the munin-server. Here is what I am thinking about implementing: - There are two classes: munin::client and munin::server - munin::clients'' configuration will be managed automatically.
2007 Nov 18
20
Testing modules
There''s definitely enough complexity in some of the modules out there to warrant solid test coverage, especially if people start extending a module to support more distributions and OSes, while trying to keep the existing support working. That''s even before you start thinking about functions, facts, and native types. They''re *really* in need of solid testing, being all
2007 Feb 15
4
Component/type defaults for 0.22.x
Has the component/type defaults syntax changed for 0.22.x? I have a component: <snip> define remotefile($owner=root, $group=root, $mode, $source, $backup=false, $recurse=false, $groupname="default") { file { $name: mode => $mode, owner => $owner, group => $group, backup => $backup,
2006 Nov 06
2
problem with remotefile definition
Hi, I''m exploring Puppet and have hit a rather weird problem. The puppetmaster server is running CentOS4, fully updated, with puppet installed from the dlutter RPM repo, version 0.20.0-1.el4. I tried adding the remotefile function definition from http://reductivelabs.com/projects/puppet/documentation/installation.html in /etc/puppet/manifests/utils/remotefile.pp but when I start
2007 Feb 25
6
Wildcard expansion in remote files or recursion?
Hi all, [Please CC me in replies, I am not subscribed to this list.] First of all, thanks for puppet! It is a very nice tool and I''m in the (slow) process of using it to manage my new Xen-based virtual server farm with it. Most of the "simple" tasks worked well so far, and I may be able to add a few recipies to the Wiki when I find time to do so. However, is there any way
2007 Feb 14
9
managing multiple files
How can I express the following in puppet? $http_conf = "/etc/http/conf/httpd.conf" $vhosts_conf = "/etc/http/conf/vhosts.conf" @files = ("$httpd_conf", "$vhosts_conf") foreach f (@files) { file { "$f": owner => root, group => root, mode => 664, source => "puppet://$server/apache/$f", }
2007 Jan 15
5
file type not autorequiring parent directories.
If I use the ''file'' type to sync a file where the parent directory doesn''t exist the sync fails. According to the puppet docs "Puppet will autorequire any parent directories that are being managed". Am i missing something? Example: file { "/tmp/dhcp/dhcpd.include": source => "/tmp/dhcpd.include", } In
2007 Feb 11
2
tighten up class?
The following works fine but is there some way to make it more succinct? Thanks, Kent class obsd_etc_static { file { "/etc/mygate": owner => root, group => wheel, mode => 644, backup => main, source => "puppet://example.com/obsd_static/mygate" } file { "/etc/rc.conf": owner => root, group => wheel,
2006 Dec 21
7
Overriding types?
"Service and class definitions are scoped just as variable assignments are." But what about types? Here''s an example: class solserver inherits server { remotefile { "/etc/shadow": mode => 400, group => staff, source => "solall/etc/shadow.server" } Is it possible to just override the "/etc/shadow" definition for
2007 May 25
18
services do not get restarted
Hello List, We are using puppet to manage a growing number of Debian Etch based servers (currently 70). Since upgrading to 0.22.4 we encountered a problem when services do not restarted on puppets request. For example the Nagios remote plugin executor daemon (nrpe). It''s running daemonized and its confiugration is located in /etc/nagios/nrpe.cfg. This file is managed through puppet
2006 Oct 19
8
puppet 0.20.0: updated language syntax doesn''t work?
Hi, I just upgraded to puppet 0.20.0 today after a short time playing with 0.19.3. The docs say to use the uppercase form for types but that seems to break for me. When I updated the remotefile function to use the new way, the puppet clients complain about objects not being found. For example: ----- OLD WAY (works, just with deprecations) ----- define remotefile (...) { file { $name :
2007 Jun 29
5
Installing a file only if a package is available
Hi, is there a way to make sure a file is installed only if a certain package is installed on the client? e.g. I want to distribute the client key for NX via puppet. However I only want to install these files if package ''freenx'' is installed on the client. I tried adding ''require => package["freenx"]'' but then puppetd complains it
2007 May 23
12
Odd ssh authorized_keys problem
Hi all, I''ve just implemented a [crude] manifest to apply a set authorized_keys file to the root account of a puppet client. class rootssh_test { file { "/root/.ssh/authorized_keys": owner => root, group => root, mode => 0600, content => template("rootssh_test") } } The template has two ssh id_rsa lines in. When the client applies
2007 Mar 01
7
Local puppet
I''m trying to scale up Puppet and am wondering if I can use Puppet in an odd way. I''m looking to use Puppet as an authoritative source for all the configuration done to a cluster. That includes fstab''s, modprobe.conf, etc. This reduces duplication. I''m using SystemImager on a cluster and would like to run Puppet during the install, so when the node reboots, it