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@puppet1 manifests]# hiera masterconfig | |
{"keepalive"=>6, "backup"=>["puppet-lvsfe2.spence.org.uk.local", "192.168.0.128"], "vip"=>"192.168.0.40", "servers"=>[["puppetha1.spence.org.local", "192.168.0.122"], ["puppetha2.spence.org.uk.local", "192.168.0.124"]], "port"=>539, "primary"=>["puppet-lvsfe1.spence.org.uk.local", "192.168.0.126"]} |
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@puppet1 type]# puppet apply -e "sshkey { 'myhost': ensure => present, host_aliases => ['ddb7.domain.tld', 'db7', ['1.2.3.4', '2001:0db8:85a3::8a2e:0370:7334']], key => 'AAAAB3NzaC1yc2EAAAABIwAAAQEAutSQCltTybWVT6DpYOcSxJkJwl+aM9SscXlhEc3aKTqO+/bIvghCKB04iP98yfjD0S1+K/XSEuIciznhDaE+WFpOQoFyNoSeRQlkweDUX5TjbvQDQHIaecpEB9BxedSDnLKvqdLYDXmj9Jwt/UJ2d49SNblD87QOmZ/5r2wDv8wNRWBMjVdAV6mj8bHWtZEwaZ/7foqIMYOEA0EBQ5pwSyUq9XxHhlJd980HHKA8LuZTo/zdQhlo9ut006sZtFkjtkvhretHwedMdh8NIFi7VOQVvHE0JTniIianKruPyglMjbvVf7m/lISmmC8j4ovbSocZ/CJ0/9D/r1qQP6uekw==', type => 'rsa',}" | |
notice: /Stage[main]//Sshkey[myhost]/host_aliases: host_aliases changed ['ddb7.domain.tld', 'db7', '1.2.3.4', '2001:0db8:85a3::8a2e:0370:7334'] to 'ddb7.domain.tld db7 1.2.3.4 2001:0db8:85a3::8a2e:0370:7334' | |
notice: Finished catalog run in 0.46 seconds | |
[root@puppet1 type]# puppet apply -e "sshkey { 'myhost': ensure => present, host_aliases => ['ddb7.domain.tld', 'db7', ['1.2.3.4', '2001:0db8:85a3::8a2e:0370:7334']], key => 'AAAAB3NzaC1yc2EAAAABIwAAAQEAu |
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@puppet1 facter]# mkdir /tmp | |
mkdir: cannot create directory `/tmp': File exists | |
[root@puppet1 facter]# mkdir /tmp/moo | |
[root@puppet1 facter]# chmod 644 /tmp/moo | |
[root@puppet1 facter]# su - fids | |
[fids@puppet1 ~]$ cd /tmp/moo | |
-bash: cd: /tmp/moo: Permission denied | |
[fids@puppet1 ~]$ |
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@centos62 ~]# cat tomcat.pp | |
$apache_tomcat_log = "/var/log/tomcat" | |
$apache_tomcat_log_mount = "/usr/local/tomcat/logs" | |
class apache_tomcat::log { | |
file { $apache_tomcat_log_mount: | |
ensure => 'link', | |
force => true, | |
target => $apache_tomcat_log, | |
# require => Class["apache_tomcat::config"] |
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
--- | |
:backends: - yaml | |
:logger: console | |
:hierarchy: - %{fqdn} | |
- %{environment} | |
- common | |
:yaml: | |
:datadir: /etc/puppetlabs/hieradata |
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@demomaster ~]# cat noop.pp | |
notify { 'test': | |
noop => false, | |
} | |
file { '/tmp/tard': | |
content => 'poo', | |
noop => false, | |
} | |
[root@demomaster ~]# puppet apply noop.pp --noop |
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 Arch Version Repository Size | |
===================================================================================================================================================================================== | |
Removing: | |
rsyslog i686 5.8.10-2.17.amzn1 installed 2.0 M | |
Removing for dependencies: | |
cloud-init noarch 0.5.15-66.amzn1 installed 218 k | |
cronie i686 |
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
database { 'foo': | |
ensure => $ensure, | |
charset => $charset, | |
provider => 'mysql', | |
require => Class['mysql::server'], | |
} | |
database { 'bar': | |
ensure => $ensure, | |
charset => $charset, |
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@chris modules]# puppet apply -e 'notify{"moo":}' | |
notice: Finished catalog run in 0.05 seconds | |
[root@chris modules]# mv augeasfacter /tmp | |
[root@chris modules]# puppet apply -e 'notify{"moo":}' | |
notice: moo | |
notice: /Stage[main]//Notify[moo]/message: defined 'message' as 'moo' | |
notice: Finished catalog run in 0.05 seconds |
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 Puppet::Parser::Functions | |
newfunction(:base64, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| | |
ENDHEREDOC | |
require 'base64' | |
raise Puppet::ParseError, ("base64(): Wrong number of arguments (#{args.length}; must be = 2)") unless args.length == 2 | |
actions = ['encode','decode'] |
OlderNewer