Tag Info

Hot answers tagged

2

This question is old, but I wandered across it looking for something else, and wanted to add an alternate answer for consideration. It doesn't use puppet: Since we're wanting to trigger on an RPM install/update why not use an RPM trigger? It leverages the very system used to do the install, extending it properly in a manner for which it was designed. ...


2

The better way of doing this is by making use of ensure_resource function from puppetlabs stdlib It takes a resource type, title, and a list of attributes that describe a resource as parameters. say you have test case to only create the resource if it does not already exist- ensure_resource('package', 'test-pkg', {'ensure' => 'present'})


2

You could always use $hostname or $certname to handle the exception: file { "/var/username": mode => 440, ensure => $hostname ? { 'oddballserver' => link, default => directory, }, target => $hostname ? { 'oddballserver' => '/data/username', } That's untested, but based on logic I use for a variety of things in our ...


2

You can use a require => Exec[] and daisy chain the exec to require the config change(s). If the Exec fails (exit status != 0) the subsequent tasks that require it should fail as well. I do something similar to execute ssh-keygen then set special permissions on .ssh when creating new users. Example: # Ensure the .ssh directory exists for each user ...


1

First, the two expressions you list are not stricly equivalent. /files/etc/pam.d/*/*/argument[../argument = 'nullok'] selects argument nodes 2 levels under /files/etc/pam.d that have an argument sibling node (or themselves) with a value set to nullok, whereas /files/etc/pam.d/*/*/argument[. = 'nullok'] selects argument nodes 2 levels under ...


1

I've put it in the user's (user that runs Puppet) home (%HOMEPATH%). This should be one of the paths RubyGems looks for the gemrc file.


1

For exported resources to function properly you need to set up PuppetDB. They won't work without PuppetDB. Also, you often need two puppet runs for resources to get applied. What happens behind the scenes is: puppet agent requests catalog from master master compiles catalog (fetching exported resources from PuppetDB, and storing newly found exported ...


1

You can try and put your file in a transitional state of existence prior to execution. The final state would be ensure => absent This is cutting age material at the time of writing. Your mileage may vary.


1

you can add in your 'exec' require => File["/root/setup_app_keys.sh"], refreshonly => true, so it will only run again if you change the script or you can add in your 'file', after last run ensure => purged,


1

In pursuit of a couple other issues, I determined that this issue was caused by some of the leftover configuration bits in the cinder.conf above. Specifically I removed all iscsi references, and moved the Gluster bits out into a separate section, resulting in: [DEFAULT] rabbit_host=192.168.2.1 use_syslog=False api_paste_config=/etc/cinder/api-paste.ini ...



Only top voted, non community-wiki answers of a minimum length are eligible