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
############################################### | |
# A Puppet Devlopment Environment in 3 Flavors | |
############################################### | |
############################################ | |
############## * VIM * ################### | |
############################################ | |
# Use your favorite vim plugin tool. The rest of this gist assumes pathogen. | |
# https://github.com/tpope/vim-pathogen |
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
class az { | |
# This defined type is only for installing local rpm packages. Use puppet package type to remove. | |
# Required parameters are rpm_name (can be found by running rpm -qp <package>) & rpm_path | |
# I was going to wrap zypper with --download only option, but keeping it simple. | |
# options can be changed to whatever is sane. --noscripts at a minimum for this case. | |
define rpm_noscripts ( | |
$rpm_name, | |
$rpm_path, | |
$ensure = 'installed', |
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
$tests = [ | |
"hello", | |
undef, | |
44, | |
"{3 => 4}", | |
"world!" | |
] | |
string_test { $tests: } |
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
$tests = [ | |
undef, # this is NOT a hash | |
'foobar', # this string is NOT a hash | |
### these are all the same as far as puppet is concerned | |
#{a => b}, # | |
#{"a" => "b"}, # | |
{'a' => 'b'}, # | |
################ | |
#{:a => :b}, this is not parseable | |
"{:a => :b}",# this is NOT a hash |
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
Jeremys-MacBook-Pro:seteam-vagrant-stack jeremy$ vagrant plugin list | |
oscar (0.3.1) | |
vagrant-multiprovider-snap (0.0.5) | |
vagrant-windows (1.2.1) | |
Jeremys-MacBook-Pro:seteam-vagrant-stack jeremy$ vagrant up master | |
Bringing machine 'master' up with 'virtualbox' provider... | |
[master] Importing base box 'centos-64-x64-vbox4210-nocm'... | |
[master] Matching MAC address for NAT networking... |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<!--[if lt IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7 lang-en" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lang-en" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie10 lt-ie9 lang-en" lang="en"> <![endif]--> | |
<!--[if IE 9]> <html class="no-js lt-ie10 lang-en" lang="en"> <![endif]--> | |
<!--[if gt IE 9]><!--> <html class="no-js lang-en" lang="en"> <!--<![endif]--> |
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
#!/opt/puppet/bin/ruby | |
# | |
# = Synopsis | |
# | |
# Collect and display facts about the system. | |
# | |
# = Usage | |
# | |
# facter [-d|--debug] [-h|--help] [-p|--puppet] [-v|--version] [-y|--yaml] [-j|--json] [--external-dir DIR] [--no-external-dir] [fact] [fact] [...] | |
# |
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
yum -y install http://yum.theforeman.org/releases/1.1/el6/x86_64/foreman-release.rpm | |
puppet resource yumrepo puppetlabs-dependencies baseurl="http://yum.puppetlabs.com/el/6/dependencies/x86_64" enabled='1' gpgcheck='1' gpgkey='http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs' | |
yum -y install foreman-installer | |
#might have to fiddle with domainname, fqdn, hostname, etc | |
foreman-installer |
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
metadata :name => "windowsrun", | |
:description => "Run command a windows server", | |
:author => "Andreas Zuber <[email protected]>", | |
:license => "GPLv2", | |
:version => "0.1", | |
:url => "www.news.com", | |
:timeout => 60 | |
action "run", :description => "Runs a command windows" do | |
display :always |
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
module MCollective | |
module Agent | |
class Windowsrun<RPC::Agent | |
#test of windows run | |
action "run" do | |
name = request[:name] | |
month = request[:birthmonth] | |
day = request[:birthday] | |
command = "name.bat ${name} ${month} ${day}" |
OlderNewer