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
== Static hiera_config == | |
[root@master puppet]# grep hiera puppet.conf | |
hiera_config = /etc/puppetlabs/puppet/environments/dev/hiera.yaml | |
[root@master environments]# puppet apply --environment=dev dev/modules/testmod/tests/init.pp | |
Notice: Compiled catalog for master.puppetlabs.vm in environment dev in 0.10 seconds | |
Notice: My param in PE 3.2 is Dev is so much more better than production, friend. | |
Notice: /Stage[main]/Testmod/Notify[My param in PE 3.2 is Dev is so much more better than production, friend.]/message: defined 'message' as 'My param in PE 3.2 is Dev is so much more better than production, friend.' | |
Notice: Finished catalog run in 0.19 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
##################################################################### | |
# ALL IN ONE INSTALL | |
#-------------------------------------------------------------------- | |
# Global Answers | |
# These answers are always needed. | |
# Y or N — Whether to install. Answer files must set this to "Y". | |
q_install=y |
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
##################################################################### | |
# COMPILE-ONLY MASTER INSTALL | |
#-------------------------------------------------------------------- | |
# Global Answers | |
# These answers are always needed. | |
# Y or N — Whether to install. Answer files must set this to Y. | |
q_install=y |
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
##################################################################### | |
# PUPPET AGENT INSTALL | |
#-------------------------------------------------------------------- | |
# Global Answers | |
# These answers are always needed. | |
# Y or N — Whether to install. Answer files must set this to "Y". | |
q_install=y |
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
#! /bin/sh | |
if (( $# != 1 )); then | |
echo "Call this script with the name of the environment" | |
echo "Example: ${0} production" | |
exit 1 | |
fi | |
ENVROOT='/etc/puppetlabs/puppet/environments' | |
GITDIR="${ENVROOT}/${1}/.git" |
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
:cachedir: /var/cache/r10k | |
:sources: | |
infra: | |
basedir: /etc/puppetlabs/puppet/environments | |
prefix: false | |
remote: https://github.com/gsarjeant/puppet-master-of-masters | |
:purgedirs: | |
- /etc/puppetlabs/puppet/environments |
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
node default { | |
if $::server_role { | |
include $::server_role | |
} | |
} |
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
#! /bin/sh | |
# If we don't have a HEAD, then this is the first commit and we can't do any of this | |
git show > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then exit 0; fi | |
EXITCODE=0 | |
for file in `git diff-index --cached --diff-filter=AM --name-only HEAD` | |
do | |
echo "Validating ${file}..." |
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
require 'spec_helper' | |
describe('test', :type => :class) do | |
describe 'when called with no parameters' do | |
it { | |
should compile | |
should contain_file('/tmp/test').with({ |
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 test { | |
file { '/tmp/test': | |
ensure => file, | |
owner => root, | |
group => root, | |
} | |
} |
OlderNewer