Skip to content

Instantly share code, notes, and snippets.

@kylog
kylog / pup-922
Last active August 29, 2015 13:56
pup-922: puppet resource service on f19
# bare 'puppet resource service' includes puppet
[root@giqq27pzkdfys5e ~]# puppet resource service | grep -A3 puppet
service { 'puppet.service':
ensure => 'running',
enable => 'false',
}
# the puppet service can be queried and controlled by name
[root@giqq27pzkdfys5e ~]# puppet resource service puppet
service { 'puppet':
https://jenkins.puppetlabs.com/view/Puppet%20FOSS/view/Master/job/Puppet-Package-Acceptance-master/
Jobs started failing with build 447 on Feb 15 11:48 PM
447 - cfdcf76ffb78f6956e9374d9e7b754f0bbf4d444 - bad
448 - cfdcf76ffb78f6956e9374d9e7b754f0bbf4d444 - bad
449 - 06d5f532567618381db1900409ed291d1723e881 - okay
450 - f102a1f678396e8c5df8724da9eba9c893c25f76 - bad (build had other failures as well, unrelated)
451 - 51e93d769829807c4cfdaa90aba5450f5350ecd0 - bad (build had other failures as well, unrelated)
452 - c21322851f55a0e830600d154e4fb2a4026035c6 - bad
# cat pup1210.pp
user { 'iterationsuser':
ensure => 'present',
comment => 'Iterations Test User',
gid => '20',
home => '/Users/iterationsuser',
iterations => '25641',
password => 'b876573f7c16c2e6ff541b7b41e4749daff39da335c76f0348ad8820aab8aa0ce1eb2e8b11c8b0fd801025e601832c3040a25ea1dc0cc532496919d8c601da71c4780d056a7c1fe0cc073ee70b1c9bead9282feaaa3dcdb8bd981150535f918b096adcdf258ef0f7b56379568e2ca53c98ce9cdd80dc8e8babb4a94132a6cdd7',
#salt => 'ae4752864f88f934365109b5ac4e65cf1d0ac8a13b778e5e1a2354e54c320b31',
@kylog
kylog / Merge conflicts
Created April 21, 2014 18:29
Trial merge from puppet/master to pe-puppet/3.3.x
Auto-merging spec/unit/util/autoload_spec.rb
CONFLICT (content): Merge conflict in spec/unit/util/autoload_spec.rb
Auto-merging spec/unit/settings_spec.rb
Auto-merging spec/unit/settings/config_file_spec.rb
CONFLICT (content): Merge conflict in spec/unit/settings/config_file_spec.rb
Auto-merging spec/unit/reports/http_spec.rb
Removing spec/unit/pops/binder/hiera2/yaml_backend_spec.rb
Removing spec/unit/pops/binder/hiera2/config_spec.rb
Removing spec/unit/pops/binder/hiera2/bindings_provider_spec.rb
Auto-merging spec/unit/node/environment_spec.rb
@kylog
kylog / gist:11157847
Last active August 29, 2015 14:00
Setting up a sandbox for puppet -> pe-puppet merges
# set up the sandbox so that:
# origin == puppetlabs/pe-puppet
# and add remote so that:
# puppet == puppetlabs/puppet
git clone https://github.com/puppetlabs/pe-puppet
cd pe-puppet
git remote add puppet https://github.com/puppetlabs/puppet
git fetch puppet
@kylog
kylog / gist:ce296c77e495faef41d3
Created June 13, 2014 23:25
facter install fun
* Install repositories on target machines...
Fetching: http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
and saving to repo-configs/el-6-x86_64/puppetlabs-release-el-6.noarch.rpm
Fetching: http://builds.puppetlabs.lan/facter/e17acc7f18218c80a335993b4d681e986d80f2c6/repo_configs/rpm//pl-facter-e17acc7f18218c80a335993b4d681e986d80f2c6-el-6-x86_64.repo
and saving to repo-configs/el-6-x86_64/pl-facter-e17acc7f18218c80a335993b4d681e986d80f2c6-el-6-x86_64.repo
kdf8dkaetev59u0 (rhel-6-latest-64-1) $ rm -rf /root/*.repo; rm -rf /root/*.rpm
localhost $ scp repo-configs/el-6-x86_64/puppetlabs-release-el-6.noarch.rpm rhel-6-latest-64-1:/root
localhost $ scp repo-configs/el-6-x86_64/pl-facter-e17acc7f18218c80a335993b4d681e986d80f2c6-el-6-x86_64.repo rhel-6-latest-64-1:/root
@kylog
kylog / gist:d98dfc7e709c0878ac93
Last active August 29, 2015 14:02
vcloud one liners
listvm() { curl --url http://vcloud.delivery.puppetlabs.net/vm 2> /dev/null | ruby -e 'require "json"; JSON.parse(STDIN.read).each { |vm| puts vm }' }
getvm() { curl -d --url http://vcloud.delivery.puppetlabs.net/vm/$1 2> /dev/null | ruby -e 'require "json"; resp = JSON.parse(STDIN.read); puts resp["'$1'"]["hostname"]'}
sshvm() { ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa-acceptance root@$1 "${@:2}" }
rmvm() { curl -X DELETE --url http://vcloud.delivery.puppetlabs.net/vm/$1 }
@kylog
kylog / gist:7cff4f2eac5683de32d9
Last active August 29, 2015 14:02
FreeBSD installs for native facter
# these packages are new enough
pkg install git
pkg install cmake
pkg install boost-libs
# build/install yaml-cpp b/c the one provided by 'pkg' is too old
pkg install wget
wget https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
tar xzvf https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
cd yaml-cpp
@kylog
kylog / fedora20
Last active August 29, 2015 14:03
facter vs cfacter execution times
bash-4.2# time facter > /dev/null
real 0m0.307s
user 0m0.230s
sys 0m0.010s
bash-4.2# time cfacter > /dev/null
real 0m0.028s
user 0m0.000s
@kylog
kylog / gist:6db27a581f656413ccab
Last active August 29, 2015 14:04
Solaris 11 installs
pkg install git
pkg install runtime/ruby-18
gem install json