Skip to content

Instantly share code, notes, and snippets.

@kmullin
Last active August 29, 2015 13:57
Show Gist options
  • Save kmullin/9419684 to your computer and use it in GitHub Desktop.
Save kmullin/9419684 to your computer and use it in GitHub Desktop.
Puppet Weirdness
number: 2014030603
:hierarchy:
- default
:yaml:
:datadir: .
node default {
$number = hiera('number')
validate_re($number, '^\d{10}$')
}
$ sudo bash puppet.sh
Info: Loading facts in /puppet/modules/puppetlabs-stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /puppet/modules/puppetlabs-stdlib/lib/facter/pe_version.rb
Info: Loading facts in /puppet/modules/puppetlabs-stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /puppet/modules/puppetlabs-stdlib/lib/facter/root_home.rb
Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up number in YAML backend
Debug: hiera(): Looking for data source default
Debug: hiera(): Found number in default
Error: validate_re(): 2014030603 does not match "^\\d{10}$" at /gist/init.pp:5 on node precise64.justin.tv
Error: validate_re(): 2014030603 does not match "^\\d{10}$" at /gist/init.pp:5 on node precise64.justin.tv
#!/bin/sh
puppet apply init.pp --verbose --debug --hiera_config=hiera.yaml --modulepath=/puppet/modules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment