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
peadmin@training:~$ mco rpc puppetral create type=user title=elmo ensure=present | |
Determining the amount of hosts matching filter for 2 seconds .... 1 | |
* [ ============================================================> ] 1 / 1 | |
training.puppetlabs.lan | |
Status: Resource was created | |
Resource: {"exported"=>false, | |
"title"=>"elmo", |
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
- Classes | |
- - parameterised | |
- - abbreviated_relationships | |
- - exercise_hidd | |
- Defined Resource Types | |
- - overview | |
- usage | |
- example | |
- module_structure | |
- exercise |
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
# modulepath is /etc/puppetlabs/puppet/modules | |
# helloworld/manifests/init.pp | |
class helloworld { | |
file { '/tmp/hello': | |
ensure => file, | |
source => "puppet:///modules/helloworld/hello", | |
} |
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
[root@centos6 lib]# puppet master --configprint libdir | |
/var/lib/puppet/lib | |
[root@centos6 lib]# tree . | |
. | |
├── hiera | |
│ ├── backend | |
│ │ └── puppet_backend.rb | |
│ └── scope.rb | |
└── puppet | |
└── parser |
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
# Generates facts of the version pkg_foo => 'version' | |
begin | |
require 'puppet' | |
pkgs = Puppet::Type.type(:package).instances | |
pkgs.each do |pkg| | |
Facter.add("pkg_#{pkg[:name]}") do | |
value = pkg.provider.properties[:ensure] | |
if value != :absent |
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
$forge_cname = dns_cname('forge.puppetlabs.com') | |
$dns_a = dns_a( $forge_cname ) | |
$dns_aaaa = dns_aaaa('forge.puppetlabs.com') | |
notify { "forge.puppetlabs.com is a cname for ${forge_cname} with IPs ${dns_a} & ${dns_aaaa}": } |
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
ini_setting { "puppet_pluginsync": | |
ensure => present, | |
path => '/etc/puppet/puppet.conf', | |
section => 'main', | |
setting => 'pluginsync', | |
value => 'true', | |
} |
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
[["rtyler/puppet", 9], | |
["wcooley/fail_unconfigured", 18], | |
["bobsh/puppetdb", 30], | |
["cloudsmith/demoapp", 51], | |
["gioppoluca/wso2am", 55], | |
["gioppoluca/wso2bam", 59], | |
["ngiger/elexis_cockpit", 60], | |
["gioppoluca/moodle", 60], | |
["reidmv/mcollective", 61], | |
["viirya/storm", 61], |
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
[["rtyler/puppet", 9], | |
["wcooley/fail_unconfigured", 18], | |
["bobsh/puppetdb", 30], | |
["cloudsmith/demoapp", 51], | |
["gioppoluca/wso2am", 55], | |
["gioppoluca/wso2bam", 59], | |
["ngiger/elexis_cockpit", 60], | |
["gioppoluca/moodle", 60], | |
["reidmv/mcollective", 61], | |
["viirya/storm", 61], |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# For the most part, this is a stock config from `vagrant init` | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
OlderNewer