search for: append_if_no_such_lines

Displaying 15 results from an estimated 15 matches for "append_if_no_such_lines".

Did you mean: append_if_no_such_line
2007 Aug 20
1
SimpleTextRecipes
I have copied the simple text snippets into a pp file and set a host to attempt to add lines, but regardless if the line is there or not, it still adds it... what am I doing wrong? in definitions/linetests.pp: define append_if_no_such_line($file, $line) { exec { "echo ''$line'' >> ''$file''": unless => "grep -qe
2010 Mar 24
1
problems with project property of User resource
Hi, I wanted to set the project property of a Solaris user after realizing the user. Have already created the project by adding a line to /etc/ project. The user is created in virtual::user class wich is inherited by the target class to be able to add the project property. The project of the user xxxx gets not set properly and remains default when I use the project property ! Had to fall back
2007 Feb 06
14
Unless in exec doesn''t seem to be honored on notify.
This was a fun one to track down... I was trying to use the append_if_no_such_line script from the wiki and it was working fine EXCEPT when I threw a notify at it. The notify appears to completely ignore both unless and onlyif within the exec for some reason. If I put the same test in the actual command line, it works fine. Example: unless => "/bin/grep -Fqe ''$line''
2007 Jan 14
0
file_splice Hack
Hi *! Here is a hack to emulate cfengines editfiles/Group behaviour. {{{ $splice_dir = "/var/local/puppet/splice" file { $splice_dir: ensure => directory, tag => "file_splice", } # Replace a section marked by # comment_char {BEGIN,END} pattern # with the given content # if checksum is set to "none", no resource is defined for the edited file define
2011 Apr 12
1
any better way to manage access control via /etc/passwd
We need to manage /etc/passwd where there would be one line at the very end of the file to restrict access to all users not explictly allowed: +::::::/sbin/nologin If using delete_lines and append_if_no_such_lines (similar to this one at http://www.debian-administration.org/articles/528) to manage access control, each time a few new users got appended to /etc/passwd file, the above line would be deleted and appended, for many times, while it only needs to be done once. Any better way to manage this file in...
2010 Mar 22
3
custom type/provider load error
Hi .*, with the first puppet run on a freshly installed system all custom types and providers a synced. As you can see from the output for some reason puppet tries to load the providers before the types and therefore the custom provider loads throw an error. It looks like the load happens alphabetically ordered, such that providers are loaded before the types... Anyway the puppet run afterwards
2011 Jun 17
5
ssh_authorized_key and NIS user
Hi, I have this resource definition: ssh_authorized_key { "nagios@login2": key => [REDACTED] user => "nagios", type => "ssh-dss", require => Service[''nis''], } This nagios user comes from NIS, yp.conf and nsswitch.conf are handled by puppet and configured before the key. I still get an "User does not
2007 Jan 09
3
Can i manage part of a file ..
Can I use puppet to ensure that a file includes certain text but not be required to maintain the entire file? For example, I would like /etc/modprobe.conf to contain the following lines but the file will also contain lines that are system dependent. --------------------------------------------------------------------------------------- # Disable IPV6 alias net-pf-10 off alias ipv6 off
2007 Jan 17
16
Cron jobs not removed when deleted from Manifest
I''m not sure if this has been posted previously, but I couldn''t find any information on it. I added a cron job via the cron type and it installed properly. Next, I removed the cron type from the manifest. The result was that, while the entry was no longer in the yaml file, the cron entry was not removed! Is this a bug, or the way that it is supposed to function? Thank you,
2007 Jun 20
1
How to handle package conflicts between classes ..
what is the best way to handle package conflicts between classes? for example, below, i have the following two classes defined and both include a "package { "perl-LDAP" }", so when used separately they work as expected but when i need to assign both classes to a node i get a conflict. error: "Duplicate definition: Package[perl-LDAP] is already defined" thanks
2007 Aug 23
24
Type development for the rest of us
Since I had my type development epiphany a couple of days ago, I''ve decided to write down my understanding of developing simple types, at http://reductivelabs.com/trac/puppet/wiki/PracticalTypes. I''d appreciate comments from people who already know how to develop types as to correctness, and also comments from people who are new to type development about whether it''s a
2007 Sep 30
3
managing FreeBSD services
Hi, I''d like to hear opinions from FreeBSD users. I''ve wrote a freebsd service provider, which is available as Ticket #837. http://reductivelabs.com/trac/puppet/ticket/837 This hack extends init service provider, by adding enable method. With freebsd.rb, you can enable services like other service providers do. service { foo: ensure => running, enable => true, ...
2006 Nov 16
7
Negating or removing classes
I have a situation where I''d like to perform some actions when a node is removed from a class. I have a few (homegrown) services that install ssh keys in authorized_keys and it''s possible that a node may have the service enabled and disabled during it''s lifetime. When disabled I''d like to clean up the ssh keys for security reasons. This brings up the broader
2007 Apr 09
11
Issues with Puppet on FreeBSD / Creating a Recipe
Hi, I am running an environment with 15 FreeBSD servers on which I want to maintain ports, rc.conf settings, and assorted configuration in /usr/local/etc/. Looked around the existing Puppet docs, I got a puppetmaster and a test client to work and install a package as specified in the site manifest. This is very basic but awesome! I want to create a puppet FreeBSD HowTo that addresses a
2007 Jan 23
20
"Found a bug" message when purging services
I attempted the following: resources { service: purge => true, noop => true } service { sshd: ensure => running; iptables ensure => running; } And got the following message: notice: Starting configuration run err: Found a bug: uninitialized constant Parse notice: Finished configuration run in 0.47 seconds When I remove the ''resources'' line, everything works