Initial Commit
Stole Gary's puppet_repository and modified it for general general consumption. Upped the version of r10k to newest (1.4.1) Ripped out the hiera examples just left defaults.yaml Tweaked environment.conf
This commit is contained in:
commit
4e2a2b81cf
16
Puppetfile
Normal file
16
Puppetfile
Normal file
@ -0,0 +1,16 @@
|
||||
forge "http://forge.puppetlabs.com"
|
||||
|
||||
# Modules from the Puppet Forge
|
||||
mod "puppetlabs/apache"
|
||||
mod "puppetlabs/ntp"
|
||||
|
||||
# Modules from Github using various references
|
||||
# Further examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
|
||||
mod 'notifyme',
|
||||
:git => 'git://github.com/glarizza/puppet-notifyme',
|
||||
:ref => '50c01703b2e3e352520a9a2271ea4947fe17a51f'
|
||||
|
||||
mod 'profiles',
|
||||
:git => 'git://github.com/glarizza/puppet-profiles',
|
||||
:ref => '3611ae4253ff01762f9bda1d93620edf8f9a3b22'
|
||||
|
21
configure_r10k.pp
Normal file
21
configure_r10k.pp
Normal file
@ -0,0 +1,21 @@
|
||||
###### ######
|
||||
## Configure R10k ##
|
||||
###### ######
|
||||
|
||||
## This manifest requires the zack/R10k module and will attempt to
|
||||
## configure R10k according to my blog post on directory environments.
|
||||
## Beware! (and good luck!)
|
||||
|
||||
class { 'r10k':
|
||||
version => '1.4.1',
|
||||
sources => {
|
||||
'puppet' => {
|
||||
#Edit remote to be your own control_repo
|
||||
'remote' => 'https://github.com/npwalker/control_repo.git',
|
||||
'basedir' => "${::settings::confdir}/environments",
|
||||
'prefix' => false,
|
||||
}
|
||||
},
|
||||
purgedirs => ["${::settings::confdir}/environments"],
|
||||
manage_modulepath => false,
|
||||
}
|
8
environment.conf
Normal file
8
environment.conf
Normal file
@ -0,0 +1,8 @@
|
||||
modulepath = modules:$basemodulepath
|
||||
config_version = '/usr/bin/git --git-dir $confdir/environments/$environment/.git rev-parse HEAD'
|
||||
|
||||
# Environment timeout should be set to unlimited. When set to zero it is less performant.
|
||||
# When code is deployed the admin API of puppetserver should be used to force a refresh of code from disk.
|
||||
# https://docs.puppetlabs.com/puppetserver/1.0/release_notes.html#new-feature-admin-api-for-refreshing-environments
|
||||
# https://docs.puppetlabs.com/puppet/3.7/reference/environments_configuring.html#environmenttimeout
|
||||
environment_timeout = 0
|
14
hiera.yaml
Normal file
14
hiera.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
:backends:
|
||||
- yaml
|
||||
:hierarchy:
|
||||
- "%{clientcert}"
|
||||
- "%{application_tier}"
|
||||
- defaults
|
||||
|
||||
:yaml:
|
||||
# datadir is empty here, so hiera uses its defaults:
|
||||
# - /var/lib/hiera on *nix
|
||||
# - %CommonAppData%\PuppetLabs\hiera\var on Windows
|
||||
# When specifying a datadir, make sure the directory exists.
|
||||
:datadir: "/etc/puppetlabs/puppet/environments/%{environment}/hieradata"
|
2
hieradata/defaults.yaml
Normal file
2
hieradata/defaults.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
message: "This node is using common data"
|
44
manifests/site.pp
Normal file
44
manifests/site.pp
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
## site.pp ##
|
||||
|
||||
# This file (/etc/puppetlabs/puppet/manifests/site.pp) is the main entry point
|
||||
# used when an agent connects to a master and asks for an updated configuration.
|
||||
#
|
||||
# Global objects like filebuckets and resource defaults should go in this file,
|
||||
# as should the default node definition. (The default node can be omitted
|
||||
# if you use the console and don't define any other nodes in site.pp. See
|
||||
# http://docs.puppetlabs.com/guides/language_guide.html#nodes for more on
|
||||
# node definitions.)
|
||||
|
||||
## Active Configurations ##
|
||||
|
||||
# PRIMARY FILEBUCKET
|
||||
# This configures puppet agent and puppet inspect to back up file contents when
|
||||
# they run. The Puppet Enterprise console needs this to display file contents
|
||||
# and differences.
|
||||
|
||||
# Define filebucket 'main':
|
||||
filebucket { 'main':
|
||||
#server should point to one master that will be the file bucket
|
||||
server => 'changeme',
|
||||
path => false,
|
||||
}
|
||||
|
||||
# Make filebucket 'main' the default backup location for all File resources:
|
||||
File { backup => 'main' }
|
||||
|
||||
# DEFAULT NODE
|
||||
# Node definitions in this file are merged with node data from the console. See
|
||||
# http://docs.puppetlabs.com/guides/language_guide.html#nodes for more on
|
||||
# node definitions.
|
||||
|
||||
# The default node definition matches any node lacking a more specific node
|
||||
# definition. If there are no other nodes in this file, classes declared here
|
||||
# will be included in every node's catalog, *in addition* to any classes
|
||||
# specified in the console for that node.
|
||||
|
||||
node default {
|
||||
# This is where you can declare classes for all nodes.
|
||||
# Example:
|
||||
# class { 'my_class': }
|
||||
}
|
Loading…
Reference in New Issue
Block a user