This file contains hidden or 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
| aj@junglist /tmp$ cat test.pp | |
| #!/usr/bin/env puppet | |
| class foo { | |
| import "blah.pp" | |
| } | |
| class bar { | |
| notify { "in bar": } | |
| } |
This file contains hidden or 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
| # | |
| # Set up our puppet environment | |
| # | |
| unless attrib?("puppet_env") | |
| hostname = attrib?("hostname") | |
| fqdn = attrib?("fqdn") | |
| if fqdn =~ /amazonaws.com$/ | |
| replace_attrib("puppet_env", "prod") | |
| else |
This file contains hidden or 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
| aj@junglist (branch: 0.24.x) ~/git/puppet$ puppetdoc -r providers | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine/variable.rb:6:in `summarize' | |
| /usr/local/lib/site_ruby/1.8/facter/util/loader.rb:72:in `inject' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine/variable.rb:6:in `each' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine/variable.rb:6:in `inject' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine/variable.rb:6:in `summarize' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine_collection.rb:36:in `summary' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine_collection.rb:35:in `each' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confine_collection.rb:35:in `summary' | |
| /usr/local/lib/site_ruby/1.8/puppet/provider/confiner.rb:18:in `suitable?' |
This file contains hidden or 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
| aj@junglist /tmp$ git clone git://github.com/site.git | |
| Initialize site/.git | |
| Initialized empty Git repository in /tmp/site/.git/ | |
| fatal: protocol error: expected sha/ref, got ' | |
| *********' | |
| No matching repositories found. | |
| *********' | |
| aj@junglist /tmp$ ls -la |
This file contains hidden or 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
| #!/usr/bin/env puppet | |
| exec { | |
| "git-mysiterepos": | |
| path => '/usr/bin:/bin:/usr/local/bin:$PATH', | |
| cwd => '/tmp', | |
| creates => '/tmp/feather/.git', | |
| command => 'git clone git://github.com/fujin/feather.git /tmp/feather'; | |
| "git-update-mysiterepos": | |
| require => Exec["git-mysiterepos"], |
This file contains hidden or 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
| upstream puppet { | |
| # adjust this to the number of mongrels you spawn | |
| server 127.0.0.1:18140; | |
| server 127.0.0.1:18141; | |
| } | |
| # day-to-day operations | |
| server { | |
| listen 8140; | |
| ssl on; |
This file contains hidden or 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
| aj@junglist /tmp$ cat test.pp | |
| #!/usr/bin/env puppet | |
| #$var = "" | |
| $var = [ "a", "b", "c" ] | |
| case $var { | |
| "": { | |
| notify { "empty string": } | |
| } |
This file contains hidden or 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
| irb(main):008:0> v = VhostUser.create(:username => "aj", :password => "non-crypt-password", :ssl => true, :mysql => true, :pgsql => true) | |
| ~ SELECT "id", "username" FROM "vhost_users" WHERE ("username" = 'aj') ORDER BY "id", "username" LIMIT 1 | |
| ~ SELECT "id", "username" FROM "vhost_users" WHERE ("username" = 'aj') ORDER BY "id", "username" LIMIT 1 | |
| ~ SELECT "id", "name", "vhost_user_id", "vhost_user_username" FROM "mysql_databases" WHERE ("vhost_user_id" IN (NULL)) AND ("vhost_user_username" IN ('aj')) ORDER BY "id" | |
| ~ SELECT COUNT(*) FROM "mysql_databases" WHERE ("vhost_user_id" IN (NULL)) AND ("vhost_user_username" IN ('aj')) | |
| ~ SELECT "id" FROM "mysql_databases" WHERE ("name" = 'aj') ORDER BY "id" LIMIT 1 | |
| ~ INSERT INTO "mysql_databases" ("vhost_user_username", "name") VALUES ('aj', 'aj') | |
| ~ SELECT "id", "username", "password", "mysql_database_id" FROM "mysql_database_users" WHERE ("mysql_database_id" IN (1)) ORDER BY "id" | |
| ~ SELECT "id" FROM "mysql_database_users" WHERE ("username" = 'aj') ORDER B |
This file contains hidden or 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
| irb(main):008:0> v = VhostUser.create(:username => "aj", :password => "non-crypt-password", :ssl => true, :mysql => true, :pgsql => true) | |
| ~ SELECT "id", "username" FROM "vhost_users" WHERE ("username" = 'aj') ORDER BY "id", "username" LIMIT 1 | |
| ~ SELECT "id", "username" FROM "vhost_users" WHERE ("username" = 'aj') ORDER BY "id", "username" LIMIT 1 | |
| ~ SELECT "id", "name", "vhost_user_id", "vhost_user_username" FROM "mysql_databases" WHERE ("vhost_user_id" IN (NULL)) AND ("vhost_user_username" IN ('aj')) ORDER BY "id" | |
| ~ SELECT COUNT(*) FROM "mysql_databases" WHERE ("vhost_user_id" IN (NULL)) AND ("vhost_user_username" IN ('aj')) | |
| ~ SELECT "id" FROM "mysql_databases" WHERE ("name" = 'aj') ORDER BY "id" LIMIT 1 | |
| ~ INSERT INTO "mysql_databases" ("vhost_user_username", "name") VALUES ('aj', 'aj') | |
| ~ SELECT "id", "username", "password", "mysql_database_id" FROM "mysql_database_users" WHERE ("mysql_database_id" IN (1)) ORDER BY "id" | |
| ~ SELECT "id" FROM "mysql_database_users" WHERE ("username" = 'aj') ORDER B |