This file contains hidden or 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
#THIS FILE IS MANAGED BY PUPPET | |
<% $device::data.each | $switch | { -%> | |
[<%= $switch['certname'] %>] | |
type cisco | |
url ssh://<%= $switch['username'] %>:<%= $switch['password'] %>@<%= $switch['hostname'] %> | |
<% } -%> |
This file contains hidden or 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
# This defined type is used to create everything needed | |
# in the F5 to load-balance a set of servers. | |
# | |
# Required Parameters: | |
# @param nodes [Array] An array of hashes, where each hash contains a 'name', 'address', 'port', and optional 'monitors' key. | |
# @param pool_name [String] The name of the pool to create and manage. | |
# @param virtualserver_name [String] The name of the virtualserver to create and mange. | |
# @param destination_address [String] The IP address of the VIP destination. | |
# | |
define profile::f5::load_balancer ( |
This file contains hidden or 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
# A Batman module to show how to namespace classes in Puppet | |
batman | |
└── manifests | |
├── init.pp ==> class batman | |
├── belt.pp ==> class batman::belt | |
├── tools | |
│ ├── batarang.pp ==> class batman::tools::batarang | |
│ ├── hook.pp ==> class batman::tools::hook | |
│ └── smoke.pp ==> class batman::tools::smoke |
This file contains hidden or 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
# This requires the pltraining/rbac module from the Forge. https://forge.puppet.com/pltraining/rbac | |
# Last tested on Puppet Enterprise 2016.1.2 | |
# | |
# If an RBAC role already exists, the curl will return "There was a database conflict". | |
# This isn't perfect.... try at your own risk. | |
$deploy_role_name = 'Deploy Code' | |
$deploy_role_description = 'Users that are able to deploy code using Code Manager' | |
$console_master_certname = $::trusted['certname'] |
This file contains hidden or 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
# Build a registry value string for setting DNS servers on windows | |
$dns_servers = [ '1.1.1.1', '2.2.2.2', '3.3.3.3' ] | |
$suffixes = [ '0x09', '0x0a' ] | |
# Generate an array that has 0x09 after the first server, and | |
# 0x0a after all the other servers. | |
$array = $dns_servers.map |$index, $server| { | |
if $index == 0 { | |
"${server},${suffixes[0]}" |
This file contains hidden or 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
# GETTING STARTED | |
# 1. Install the Puppet agent from http://downloads.puppetlabs.com/windows/puppet-agent-1.3.6-x64.msi | |
# 2. puppet module install chocolatey-chocolatey | |
# 3. puppet module install cyberious-apm | |
# 4. puppet apply windows_dev_node.pp | |
include chocolatey | |
$choco_packages = [ | |
'git', |
This file contains hidden or 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
# This custom fact will figure out which application | |
# a node belongs to by looking at the node's hostname | |
# and comparing that to a known list of applications. | |
# | |
# This fact relies on a naming convention where the | |
# first three letters of a node's hostname signify | |
# what application that node belongs to. | |
# | |
Facter.add(:application) do | |
setcode do |
This file contains hidden or 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/bash | |
# GIST_URL: https://gist.github.com/natemccurdy/d1abe94f9688de9d7ea38bfd3b2e8d43 | |
# Dumps the Node Classifier groups to a file. This file can be used to restore classification. | |
# | |
SCRIPTNAME="$(basename "$0")" | |
PATH="/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin:/opt/puppet/bin:$PATH" | |
PE_CERT=$(puppet agent --configprint hostcert) | |
PE_KEY=$(puppet agent --configprint hostprivkey) | |
PE_CA=$(puppet agent --configprint localcacert) |
This file contains hidden or 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
$rc_local = @(RC_LOCAL) | |
#!/bin/sh | |
# This file is managed by Puppet. Any modifications will be overwritten. | |
touch /var/lock/sybsys/local | |
echo '# Increase SCSI timeout on all SCSI disks attached to the system at boot time' | |
ls -1 /sys/block/sd*/device/timeout | while read file | |
do | |
echo 360 > $file |
This file contains hidden or 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
# | |
# win_pagefile/manifests/init.pp | |
# | |
# Move pagefile to D: drive, reboot. | |
class win_pagefile ( | |
$pagefile_drive = 'd', | |
) { | |
if $::pagefile_location =~ '[Cc]\:' or $::pagefile_automanaged == true { | |