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
#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 class is meant to solve the problem of synchronizing pe_repo agent | |
# packages to compile masters when there is no internet access. | |
# | |
# This profile assumes that the Puppet MoM (master of masters) is able to reach | |
# the internet to download the needed packages, or they've been sneaker-netted to the MoM. | |
# | |
class pe_repo_packages { | |
# Generate an array of puppet-agent pe_repo package names. | |
# 1. Searches PuppetDB for all pe_repo::platform classess added to the MoM. |
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
$service_accounts = { | |
'larry' => { | |
gid => '1111', | |
tag => 'group_a', | |
}, | |
'moe' => { | |
gid => '2222', | |
tag => 'group_b', | |
}, | |
'curly' => { |
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
#!/opt/puppetlabs/puppet/bin/ruby | |
require 'json' | |
require 'socket' | |
compile_master = Socket.gethostname | |
environmentpath = ARGV[0] | |
environment = ARGV[1] | |
# Get the short SHA1 commit ID from the control repository. | |
r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json') |
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
pihole: | |
image: diginc/pi-hole | |
ports: | |
- "53:53/tcp" | |
- "53:53/udp" | |
- "80:80/tcp" | |
cap_add: | |
- NET_ADMIN | |
environment: | |
ServerIP: 10.72.0.5 |
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 will disable UAC on Windows nodes. | |
# | |
# Requires: puppetlabs/registry | |
# | |
class profile::windows::disable_uac { | |
registry::value { 'Disable UAC': | |
key => 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', | |
value => 'EnableLUA', | |
data => '0', | |
type => 'dword', |
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
# Custom fact that shows the current name of the Administrator and | |
# Guest accounts based on well-known SID's. | |
# | |
# http://support.microsoft.com/kb/243330 | |
# | |
require 'puppet' | |
Facter.add(:account_names) do | |
confine osfamily: :windows |
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
<%- | String $client_source, | |
String $argument_list | |
| -%> | |
$ClientSource = "<%= $client_source %>" | |
$TempDir = Join-Path "C:\Windows\Temp" "ccm_client" | |
$CCMSetup = Join-Path $TempDir "ccmsetup.exe" | |
if (-not (Test-Path $CCMSetup)) { | |
Try { | |
Write-Output "Copying $ClientSource to $TempDir" |
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
#!/opt/puppetlabs/puppet/bin/ruby | |
# | |
# A note on logging: | |
# This script's stderr and stdout are only shown at the DEBUG level | |
# of the master's logs. This means you won't see the error messages | |
# in puppetserver.log by default. All you'll see is the exit code. | |
# | |
# https://docs.puppet.com/puppet/latest/ssl_autosign.html#policy-executable-api | |
# | |
# Exit Codes: |