This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/puppetdb.rb.bak b/puppetdb.rb | |
| index da36497..1a9a0b4 100644 | |
| --- a/puppetdb.rb.bak | |
| +++ b/puppetdb.rb | |
| @@ -7,6 +7,7 @@ class Puppet::Node::Facts::Puppetdb < Puppet::Indirector::REST | |
| include Puppet::Util::Puppetdb::CommandNames | |
| def save(request) | |
| + Puppet.warning("DEBUG: puppetdb save") | |
| facts = request.instance.dup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@centos-59-x64-vbox4210-nocm yum.repos.d]# /usr/bin/yum install --nogpgcheck puppetdb-1.5.2.61-1.el5 | |
| Loaded plugins: fastestmirror, security | |
| Loading mirror speeds from cached hostfile | |
| * base: mirrors.ukfast.co.uk | |
| * extras: mirrors.melbourne.co.uk | |
| * updates: mirrors.ukfast.co.uk | |
| Setting up Install Process | |
| Resolving Dependencies | |
| --> Running transaction check | |
| ---> Package puppetdb.noarch 0:1.5.2.61-1.el5 set to be updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@puppetdb1:/tmp# curl 'http://localhost:8080/v3/resources/Notify/tagtest' | |
| [ { | |
| "certname" : "puppetdb1.vm", | |
| "resource" : "6468ca9ce112862839744ddd035dba05e7ddfa5b", | |
| "title" : "tagtest", | |
| "parameters" : { | |
| "tag" : [ "a", "b" ] | |
| }, | |
| "type" : "Notify", | |
| "exported" : true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
| rvm use $ruby$gemset | |
| # Remove old vendor directory to ensure we have a clean slate | |
| if [ -d "vendor" ]; | |
| then | |
| rm -rf vendor | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ken@kb ~]# cat /tmp/foo.pp | |
| $debDir = "/some/path" | |
| define localPackage ($packageName = $title) { | |
| notify { $packageName: | |
| } | |
| } | |
| $locals = ['doxygen_1.8.4-1_i386', 'webmin_1.620_all'] | |
| localPackage { $locals : } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- !ruby/object:Puppet::Transaction::Report | |
| configuration_version: 1389123966 | |
| host: puppetdb1.vm | |
| time: 2014-01-07 19:45:58.891454 +00:00 | |
| environment: production | |
| report_format: 4 | |
| resource_statuses: | |
| Schedule[monthly]: !ruby/object:Puppet::Resource::Status | |
| resource: Schedule[monthly] | |
| file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@puppetdb1:/etc/apt# cat /var/lib/puppet/reports/puppetdb1.vm/201401072005.yaml | |
| --- !ruby/object:Puppet::Transaction::Report | |
| configuration_version: | |
| host: puppetdb1.vm | |
| time: 2014-01-07 20:05:33.370691 +00:00 | |
| environment: | |
| report_format: 4 | |
| resource_statuses: {} | |
| puppet_version: "3.3.2" | |
| kind: apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure("2") do |config| | |
| config.vm.define "centos-59-x64-vbox4210-nocm" do |v| | |
| v.vm.box = "centos-59-x64-vbox4210-nocm" | |
| v.vm.hostname = "centos-59-x64-vbox4210-nocm.vm" | |
| v.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box" | |
| end | |
| config.vm.define "centos-64-x64-vbox4210-nocm" do |v| | |
| v.vm.box = "centos-64-x64-vbox4210-nocm" | |
| v.vm.hostname = "centos-64-x64-vbox4210-nocm.vm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # lein clean && lein run services -c config.ini | |
| Compiling com.puppetlabs.puppetdb.core | |
| WARNING: String already refers to: class java.lang.String in namespace: schema.core, being replaced by: #'schema.core/String | |
| WARNING: Number already refers to: class java.lang.Number in namespace: schema.core, being replaced by: #'schema.core/Number | |
| java.lang.IllegalArgumentException: No implementation of method: :get-construct-fn of protocol: #'com.puppetlabs.puppetdb.schema/PredConstructFn found for class: schema.core.Predicate | |
| at clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:541) | |
| com.puppetlabs.puppetdb.schema$fn__2561$G__2556__2566.invoke (schema.clj:27) | |
| com.puppetlabs.puppetdb.schema/fn (schema.clj:183) | |
| com.puppetlabs.puppetdb.schema$fn__2561$G__2556__2566.invoke (schema.clj:27) | |
| com.puppetlabs.puppetdb.schema$convert_to_schema$fn__2639.invoke (schema.clj:195) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Now, lets start by looking at the existing perms, and running the file resource with selinux_ignore_defaults => true: | |
| [root@centos-64-x64-vbox4210-nocm plugins]# ls -lZ /usr/local/nagios/libexec/check_md_raid | |
| -rwxr-xr-x. root root system_u:object_r:nagios_services_plugin_exec_t:s0 /usr/local/nagios/libexec/check_md_raid | |
| [root@centos-64-x64-vbox4210-nocm plugins]# cat /tmp/foo.pp | |
| file { 'check_md_raid': | |
| ensure => present, | |
| content => 'foo', | |
| mode => '755', | |
| path => '/usr/local/nagios/libexec/check_md_raid', |