Skip to content

Instantly share code, notes, and snippets.

View bgstack15's full-sized avatar

B. Stack bgstack15

View GitHub Profile
@bgstack15
bgstack15 / sapsnug.sh
Created April 6, 2018 12:59
Wrapper for ansible to use nsupdate -g
#!/bin/sh
# File: /etc/ansible/books/stable/clone/dependencies/sapsnug.sh
# Author: bgstack15
# Startdate: 2018-04-05 10:12
# Title: Script to Accept Parameters to Send to Nsupdate Using Gsstsig
# Purpose: To wrap nsupdate -g in ansible
# History:
# Usage:
# Run as root, or define variables SNUG_PASSWORD and SNUG_USERNAME
# Variables:
@bgstack15
bgstack15 / ansible-own.sh
Created April 6, 2018 15:48
Script that enforces ansible ownership of ansible files
#!/bin/sh
ansibleown_version="2018-04-04a"
tu=ansible
tg="$( id -ng "${tu}" )"
for word in $@ ;
do
# set group accessible
find ${word} -exec chown "${tu}:${tg}" {} \; -exec chmod g+rwX {} \;
# set setgid and sticky bits
find ${word} -type d -exec chmod g+s,o+t {} \;
@bgstack15
bgstack15 / world-read-python-libs.sh
Created April 6, 2018 15:51
Set python libs to be world readable
#!/bin/sh
worldreadpythonlibs_version="2018-04-06a"
for word in /usr/lib{,64}/python2.7/site-packages ;
do
find ${word} -exec chmod g+rX,o+rX {} \;
done