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 | |
# Description: Generate AWS config file from Britive Profiles with proper space handling | |
# Requires: | |
# - Bash v4 or higher: brew install bash | |
# - Britive CLI: pip3 install --upgrade pybritive | |
# Usage: | |
# # make sure to backup your original ~/.aws/config | |
# sh ./aws-generate-profiles | tee ~/.aws/config |
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
#!/usr/bin/env bash | |
set -eu | |
################################################################################ | |
# | |
# For documentation see https://github.com/qoomon/aws-ssm-ssh-proxy-command | |
# | |
################################################################################ | |
REGION_SEPARATOR='--' |
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 | |
. /usr/share/foreman/config/hooks.d/lib/utils.sh | |
. $FOREMAN_HOME/config/hooks.d/lib/hook_functions.sh | |
set -x | |
IP=$(hook_data host.ip) | |
DNSNAME=$(hook_data host.name) | |
REVERSE=$(reverseIp ${IP}) | |
rdns_create() { | |
echolog IP ${IP} calling nsupdate: dns3.server.name update add ${REVERSE}.in-addr.arpa. 86400 PTR $DNSNAME |
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 | |
export FOREMAN_SERVER=$foremanserver/api | |
export FOREMAN_USER=apiuser | |
export FOREMAN_PASSWORD=$password | |
export FOREMAN_HOME=/usr/share/foreman | |
export PATH=$PATH:/usr/local/bin | |
reverseIp() { | |
local a i n | |
IFS=. read -r -a a <<< "$1" |