Skip to content

Commit b482e4a

Browse files
committed
Initial commit
0 parents  commit b482e4a

File tree

9 files changed

+97
-0
lines changed

9 files changed

+97
-0
lines changed

Puppetfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Installs the acme/ohmyzsh module from the Puppet Forge
2+
mod 'acme/ohmyzsh', '0.1.2'
3+
4+
# Installs the puppetlabs/vcsrepo module from its GitHub repository
5+
mod 'vcsrepo',
6+
:git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo'

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# `classroom-control-vf`
2+
3+
This is the classroom control repository for the Virtual Fundamentals class.
4+
5+
## Usage
6+
7+
Small site modules should be developed in the `site` directory. This is appended
8+
to the `$modulepath` by the `environment.conf` file so that Puppet can use modules
9+
from this directory.
10+
11+
Adding modules to the `Puppetfile` will manage them in the standard `modules`
12+
directory using r10k.

environment.conf

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modulepath = site:modules:$basemodulepath

hieradata/common.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
message: This message came from the common hiera datasource.
3+

manifests/site.pp

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## site.pp ##
2+
3+
# This file (/etc/puppetlabs/puppet/manifests/site.pp) is the main entry point
4+
# used when an agent connects to a master and asks for an updated configuration.
5+
#
6+
# Global objects like filebuckets and resource defaults should go in this file,
7+
# as should the default node definition. (The default node can be omitted
8+
# if you use the console and don't define any other nodes in site.pp. See
9+
# http://docs.puppetlabs.com/guides/language_guide.html#nodes for more on
10+
# node definitions.)
11+
12+
## Active Configurations ##
13+
14+
# PRIMARY FILEBUCKET
15+
# This configures puppet agent and puppet inspect to back up file contents when
16+
# they run. The Puppet Enterprise console needs this to display file contents
17+
# and differences.
18+
19+
# Define filebucket 'main':
20+
filebucket { 'main':
21+
server => 'puppetfactory.puppetlabs.vm',
22+
path => false,
23+
}
24+
25+
# Make filebucket 'main' the default backup location for all File resources:
26+
File { backup => 'main' }
27+
28+
# DEFAULT NODE
29+
# Node definitions in this file are merged with node data from the console. See
30+
# http://docs.puppetlabs.com/guides/language_guide.html#nodes for more on
31+
# node definitions.
32+
33+
# The default node definition matches any node lacking a more specific node
34+
# definition. If there are no other nodes in this file, classes declared here
35+
# will be included in every node's catalog, *in addition* to any classes
36+
# specified in the console for that node.
37+
38+
node default {
39+
# This is where you can declare classes for all nodes.
40+
# Example:
41+
# class { 'my_class': }
42+
notify { "Hello, my name is ${::hostname}": }
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
file { '/etc/motd':
2+
ensure => file,
3+
owner => 'root',
4+
group => 'root',
5+
mode => '0644',
6+
content => "Hey, Puppet is fun!\n",
7+
}
8+
9+
package { 'cowsay':
10+
ensure => present,
11+
provider => gem,
12+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class examples::fundamentals {
2+
File {
3+
owner => 'root',
4+
group => 'root',
5+
mode => '0644',
6+
}
7+
8+
file { '/root/example.pp':
9+
ensure => file,
10+
source => 'puppet:///modules/examples/fundamentals/example.pp',
11+
}
12+
13+
}

site/profile/manifests/example.pp

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class profile::example {
2+
notify { 'This is the example profile!': }
3+
}
4+

site/role/manifests/example.pp

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class role::example {
2+
include profile::example
3+
}

0 commit comments

Comments
 (0)