Skip to content

Instantly share code, notes, and snippets.

@ffrank
ffrank / manifest application
Last active January 2, 2016 15:59
puppet ssh_authorized_keys behavior is potentially confusing
Consider the current ssh_authrized_keys state and puppet manifest below.
Puppet will sync the key options away, although the manifest doesn't mention them at all.
That's because the 'options' property defaults to 'absent'.
This strikes me as unsound. There's two more sane ways I can imagine:
1. Forgo default values for all properties
2. Make default values special, so that properties use them only
when creating a new managed entity on the system
(i.e. the resource is changed from absent to a present state).
@ffrank
ffrank / stdout
Created November 9, 2013 18:06
Benchmark results of the puppet parser before and after fixing #7659
# long-ish manifest from a real code base in test.pp
# test2.pp was created by simply concatenating test.pp twice
$ wc /tmp/test*
11076 26918 371942 /tmp/test2.pp
5538 13459 185971 /tmp/test.pp
# On branch master
nothing to commit, working directory clean
$ for i in `seq 1 5` ; do time RUBYLIB=lib puppet doc -dv --color=no --mode rdoc /tmp/test.pp >/dev/null ; done