This file contains 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
highlight DiffAdd term=reverse cterm=bold ctermbg=green ctermfg=white | |
highlight DiffChange term=reverse cterm=bold ctermbg=cyan ctermfg=black | |
highlight DiffText term=reverse cterm=bold ctermbg=gray ctermfg=black | |
highlight DiffDelete term=reverse cterm=bold ctermbg=red ctermfg=black | |
highlight SpellBad term=reverse cterm=bold ctermbg=red ctermfg=white | |
highlight SpellCap term=reverse cterm=bold ctermbg=cyan ctermfg=black | |
highlight SpellRare term=reverse cterm=bold ctermbg=gray ctermfg=black |
This file contains 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
# I am managed in <%= @__scope__.source.namespace %> line <%= @__scope__.source.line %> | |
actual | |
contents | |
... |
This file contains 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
# /tmp/mgmt/testgraph-from-puppet | |
--- | |
graph: fflaptop.local | |
comment: generated from puppet catalog for fflaptop.local | |
resources: | |
file: | |
- name: "/tmp/__FILE__" | |
path: "/tmp/__FILE__" | |
state: exists | |
content: accepted |
This file contains 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
package main | |
import ( | |
"fmt" | |
"gopkg.in/fsnotify.v1" | |
"os" | |
) | |
var watcher *fsnotify.Watcher |
This file contains 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
--- | |
graph: mygraph | |
comment: hello world example | |
resources: | |
file: | |
- name: dir1 | |
path: "/tmp/removeme/" | |
state: exists | |
- name: dir2 | |
path: "/tmp/removeme2/" |
This file contains 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
ffrank@fflaptop:~/git/mgmt$ make clean build | |
Building: mgmt, version: 0.0.3-26-gab73261... | |
time go build -ldflags "-X main.program=mgmt -X main.version=0.0.3-26-gab73261" -o mgmt; | |
# _/home/ffrank/git/mgmt | |
./main.go:226: cannot use run (type func(*cli.Context) error) as type func(*cli.Context) in field value | |
real 0m0.972s | |
user 0m1.412s | |
sys 0m0.080s | |
Makefile:69: recipe for target 'mgmt' failed |
This file contains 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
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). |
This file contains 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
# 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 |
This file contains 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
$ git show HEAD | |
commit 5d996babd607b35ffa77d151ea94acc9c15edd77 | |
Author: Melissa Stone <melissa@puppetlabs.com> | |
Date: Mon Jan 6 14:17:38 2014 -0800 | |
(packaging) Update PUPPETVERSION to 3.4.2 | |
... | |
puppy@geras:~/puppet-3.4.2$ bundle show puppet | |
/home/puppy/puppet-3.4.2 |
This file contains 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
ffrank@geras:~/git/puppet$ bundle exec puppet apply -e 'notify { "it works": }' --trace | |
Already evaluated rest at /home/ffrank/gems/gems/facter-2.3.0/lib/facter/ec2.rb:21, reevaluating anyways | |
Already evaluated rest at /home/ffrank/gems/gems/facter-2.3.0/lib/facter/ec2.rb:38, reevaluating anyways | |
Already evaluated rest at /home/ffrank/gems/gems/facter-2.3.0/lib/facter/gce.rb:4, reevaluating anyways | |
Error: Could not parse for environment production: not symbol at line 1 on node geras.fritz.box | |
/home/ffrank/git/puppet/lib/puppet/parser/parser_support.rb:172:in `rescue in parse' | |
/home/ffrank/git/puppet/lib/puppet/parser/parser_support.rb:163:in `parse' | |
/home/ffrank/git/puppet/lib/puppet/node/environment.rb:557:in `perform_initial_import' | |
/home/ffrank/git/puppet/lib/puppet/node/environment.rb:287:in `known_resource_types' | |
/home/ffrank/git/puppet/lib/puppet/resource/type_collection_helper.rb:5:in `known_resource_types' |