Skip to content

Instantly share code, notes, and snippets.

View zipkid's full-sized avatar
💭
Eating 🍪

Stefan Goethals zipkid

💭
Eating 🍪
View GitHub Profile
@zipkid
zipkid / Rakefile
Created June 8, 2012 08:03
Rakefile to perform puppet syntax and lint check
# Rakefile
require 'rubygems'
desc "Run puppet-lint."
task :lint do |t, args|
begin
require 'puppet-lint'
rescue LoadError
fail "Cannot load puppet-lint, please install gem : # gem install puppet-lint"
end
environments:
- production:
environment: production
modulepath: /etc/puppet/modules:/etc/puppet-modules
manifest: $manifestdir/site.pp
- testing:
environment: testing
modulepath: /etc/puppet/modules:/etc/puppet-environment/testing
manifest: $manifestdir/site.pp
@zipkid
zipkid / hieradata.yaml
Created June 6, 2012 14:55
Using hiera as node classifier.
:hierarchy:
- Nodes/%{fqdn}
- Domain/%{domain}
- %{environment}
- common
:backends:
- yaml
- puppet
@zipkid
zipkid / default.html.ep
Created May 31, 2012 19:43
content_for ...?
<!doctype html><html>
<head>
<title><%= title %></title>
<%= base_tag %>
%= content_for 'jsheader'
</head>
<body>
<ul>
<li><%= link_to index => begin %><%=l 'Index' %><% end %></li>
<li><%= link_to login => begin %><%=l 'Login' %><% end %></li>
:hierarchy:
- Perimeter/%{perimeter}
- DC/%{datacenter}
- OS/%{operatingsystem}
- common
- ${environment}
:backends:
- yaml
- puppet
@zipkid
zipkid / commandline
Created May 31, 2012 08:30
puppet audited resource report
[root@pm1 puppet]# puppet agent -t
info: Retrieving plugin
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Caching catalog for pm1.lan.super-visions.com
info: Applying configuration version '1338452803'
@zipkid
zipkid / gist:2841626
Created May 31, 2012 07:19
Rake - puppet-lint problem (OS X)
android18:puppet-modules zipkid$ rake lint
(in /Volumes/Source/Eclipse-workspace/Super-Visions/puppet-modules)
rake aborted!
Cannot load puppet-lint, please install gem : # gem install puppet-lint
/Volumes/Source/Eclipse-workspace/Super-Visions/puppet-modules/Rakefile:7
(See full trace by running task with --trace)
android18:puppet-modules zipkid$ cat Rakefile
# Rakefile
desc "Run puppet-lint."
task :lint do |t, args|
@zipkid
zipkid / hiera.yaml
Created May 29, 2012 13:45
Hiera default data in puppet modules
:hierarchy:
- Nodes/%{fqdn}
- common
:backends:
- yaml
- puppet
:yaml:
:datadir: '/etc/puppet/hieradata'
@zipkid
zipkid / init.pp
Created May 21, 2012 13:12
Chaining resources - locking / ordering
class ntp
{
# http://docs.puppetlabs.com/guides/language_guide.html#chaining-resources
# anchor is in https://github.com/puppetlabs/puppetlabs-stdlib
anchor { 'ntp::start': }->
class { 'ntp::package': }->
class { 'ntp::config': }~>
class { 'ntp::service': }->
@zipkid
zipkid / welcome.md
Created April 20, 2012 21:52
Drift intro

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.