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
#!/usr/bin/env bash | |
# Find available IP addresses from by using dig -x axfr | |
usage() { | |
cat <<-EOF | |
usage: ${0} <network> | |
example: ${0} 10.1.10 | |
EOF | |
} |
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
#!/usr/bin/env bash | |
usage() { | |
cat <<-EOF | |
usage: ${0} -l <login> -u <new uid> [-g <new gid>] | |
-h this help screen | |
-l login account login account name | |
-p primary group for account login | |
-u uid new UID to assign to account | |
-g new GID to assign to account group |
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
# Reference Commands | |
cmd_list='usermod groupmod find chgrp getent id awk tr wc' | |
# Function to check if referenced command exists | |
cmd_exists() { | |
if [ $# -eq 0 ]; then | |
echo 'WARNING: No command argument was passed to verify exists' | |
fi | |
cmd=${1} |
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
#!/usr/bin/env bash | |
node_fqdn=$(hostname -f) | |
prettyjson='python -m json.tool' | |
# Generate Token for code-deployer RBAC user (5y Lifetime) | |
token_file_loc='/root/.puppetlabs/code-deployer_token' | |
# Trigger Code-Manager Deployment of ALL environments | |
function trigger_run() { |
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/bash | |
set -e | |
function stash_create_repo() | |
{ | |
local username="$1" | |
local password="$2" | |
local hostname="$3" | |
local port="$4" | |
local project="$5" |
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
#!/opt/puppetlabs/puppet/bin/ruby | |
require "rest-client" | |
require "json" | |
require "rugged" | |
require 'optparse' | |
options = { :verbose => nil, :pretty => nil } | |
parser = OptionParser.new do|opts| | |
opts.banner = "Usage: #{$0} [options]" |
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
#!/usr/bin/env python | |
# This git-hook triggers the Code-Manager per branch and checks for status to be returned | |
# Requirements: This requires the python request module ( sudo yum install python-requests ) | |
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
import json | |
import sys |
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
#!/usr/bin/env python | |
# Requirements: | |
# - request module ( sudo yum install python-requests ) | |
# - slacker ( sudo pip install slacker) | |
# * https://github.com/os/slacker | |
# Suppress Deprecation Warning....because...python 2.6 is old | |
import warnings |
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
postgresql::server::role { 'marmot': | |
password_hash => 'foobar', | |
} | |
Error: /Stage[main]/Profile::Postgresql/Postgresql::Server::Role[marmot]/Postgresql_psql[CREATE ROLE "marmot" ENCRYPTED PASSWORD 'foobar' LOGIN NOCREATEROLE NOCREATEDB NOSUPERUSER CONNECTION LIMIT -1]: Could not evaluate: undefined method `exitcode' for [" 0\n\n", #<Process::Status: pid 8127 exit 0>]:Array | |
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/vendor/rgen/lib/rgen/array_extensions.rb:25:in `method_missing' | |
/vagrant/puppet/environments/dev/modules/postgresql/lib/puppet/type/postgresql_psql.rb:41:in `matches' | |
/vagrant/puppet/environments/dev/modules/postgresql/lib/puppet/type/postgresql_psql.rb:92:in `should_run_sql' | |
/vagrant/puppet/environments/dev/modules/postgresql/lib/puppet/type/postgresql_psql.rb:16:in `retrieve' | |
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1072:in `block in retrieve' |
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
## Snippet from puppet agent run | |
Debug: Prefetching puppetserver_gem resources for package | |
Debug: Executing: '/opt/puppetlabs/bin/puppetserver gem list --local' | |
Debug: Executing: '/opt/puppetlabs/bin/puppetserver gem list --local ^deep_merge$' | |
Debug: Executing: '/opt/puppetlabs/bin/puppetserver gem install --no-rdoc --no-ri deep_merge' | |
Error: Could not install: ERROR: Could not find a valid gem 'deep_merge' (>= 0) in any repository | |
Error: /Stage[main]/Hiera::Deep_merge/Hiera::Install[deep_merge]/Package[puppetserver deep_merge]/ensure: change from absent to present failed: Could not install: ERROR: Could not find a valid gem 'deep_merge' (>= 0) in any repository |