More Related Content Similar to 20150613 self-puppet v4-avoiding_dragons Similar to 20150613 self-puppet v4-avoiding_dragons(20) More from garrett honeycutt More from garrett honeycutt(17) 20150613 self-puppet v4-avoiding_dragons3. puppet-agent package from PC1
augeas (1.3.0) ruby (2.1.6)
cfacter (0.4.1) ruby-augeas (0.5.0)
facter (2.4.4) ruby-selinux
(2.0.94)
hiera (2.0.1) ruby-shadow (2.3.3)
marionette-collective (2.8.2) ruby-stomp (1.3.3)
openssl (1.0.0r) rubygem-deep-merge
(1.0.0)
puppet (4.1.0) rubygem-net-ssh (2.1.4)
virt-what (1.1.4)
19. $ facter os --yaml
---
os:
name: CentOS
family: RedHat
release:
major: '7'
minor: '1'
full: 7.1.1503
20. class foo (
$bar = true,
) {
if is_string($bar) == true {
$bar_real = str2bool($bar)
} else {
$bar_real = $bar
}
validate_bool($bar_real)
}
30. class foo (
$bar = true,
) {
if is_string($bar) == true {
$bar_real = str2bool($bar)
} else {
$bar_real = $bar
}
validate_bool($bar_real)
}
31. class foo (
Boolean $bar = true,
) {
# Remove all this code!
#
# if is_string($bar) == true {
# $bar_real = str2bool($bar)
# } else {
# $bar_real = $bar
# }
# validate_bool($bar_real)
}
37. common nscd rsyslog
dnsclient nsswitch selinux
facter ntp ssh
hosts pam
sysklogd
inittab papertrail timezone
localization puppet types
nfs redhat utils
nrpe rpcbind vim
40. # .travis.yml
env:
matrix:
- PUPPET_GEM_VERSION="~> 3.1"
- PUPPET_GEM_VERSION="~> 3.2"
- PUPPET_GEM_VERSION="~> 3.3"
- PUPPET_GEM_VERSION="~> 3.4"
- PUPPET_GEM_VERSION="~> 3.5"
- PUPPET_GEM_VERSION="~> 3.6"
- PUPPET_GEM_VERSION="~> 3.7"
- PUPPET_GEM_VERSION="~> 3.8"
- PUPPET_GEM_VERSION="~> 3" PARSER="future"
- PUPPET_GEM_VERSION="~> 4.0"
- PUPPET_GEM_VERSION="~> 4.1"
- PUPPET_GEM_VERSION="~> 4"
41. # .travis.yml
---
language: ruby
rvm:
- 2.1.0
sudo: false
env:
matrix:
- PUPPET_GEM_VERSION="~> 3" PARSER="future"
- PUPPET_GEM_VERSION="~> 4"
script: 'bundle exec metadata-json-lint metadata.json && bundle
exec rake validate && bundle exec rake lint && SPEC_OPTS="--
format documentation" bundle exec rake spec'
matrix:
fast_finish: true
notifications:
email: false
52. expected Puppet::Error with
message matching /^true is
not a string/, got
#<Puppet::Error: Evaluation
Error: Error while
evaluating a Function Call,
true is not a string. It
looks to be a TrueClass
53. Got rid of '^' in regex so it was not
being as explicit.