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 | |
##################################################################### | |
## IMPORTANT ## | |
# Run this script with root (sudo su -), wont work if run as sudo. | |
# Change the variables as needed. | |
###################################################################### | |
USER=youruser # User that will have ownership (chown) to /usr/local/bin and /usr/local/lib | |
USERHOME=/home/${USER} # The path to the users home, in this case /home/youruser | |
PYSHORT=3.6 # The Python short version, e.g. easy_install-${PYSHORT} = easy_install-3.6 | |
PYTHONVER=3.6.1 # The actual version of python that you want to download from python.org |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
# CentOS Linux release 7.2.1511 (Core) | |
# Python 2.7.5 | |
# Ansible Version | |
# 1.9.4 | |
# Ansible Installation Method | |
# yum | |
# Tower Version | |
# 2.4.3 | |
# Troubleshooting: Ansible Tower - Cross-Origin Request Blocked (CentOS 7.2.1511 - Python 2.7.5) | |
# Error messages: "Live events: error connecting to the Tower server." OR "Socket error: connection refused by host" |
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
# CentOS Linux release 7.2.1511 (Core) | |
# Python 2.7.5 | |
# Ansible Version | |
# 1.9.4 | |
# Ansible Installation Method | |
# yum | |
# Tower Version | |
# 2.4.3 | |
# Troubleshooting: Ansible Tower - Project - External SCM vs HTTP_PROXY | |
# Error messages: "unable to access 'https://github.com/ansible/tower-example.git/': Failed connect to github.com:443; Connection timed out" |
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
# Red Hat Enterprise Linux Server release 7.2 (Maipo) - Linux 3.10.0-327.el7.x86_64 | |
# StorNext File System Client: | |
## Client Revision 5.3.2.1 Build 64849 Branch branches_5.3.2.1 BuildId A | Built for Linux 3.10.0-121.el7.x86_64 x86_64 | |
## File: snfs_client_RedHat7_x86_64.bin | MD5: 74a80625170e85089b39c351fb4fe246 | |
# Troubleshooting: StorNext File System Client 5.3.2.1 - Kernel PANIC | |
# kdump | vmcore-dmesg.txt: | |
[ 675.569471] CVFS: Linux Interface Verification | |
[ 675.569476] CVFS: Build kernel level = "3.10.0-121.el7.x86_64" | |
[ 675.569477] CVFS: Install kernel level = "3.10.0-327.el7.x86_64" | |
[ 675.569479] CVFS: Linux Interface Verification Complete, 12 items. |
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
OSX (that I run) it’s: | |
ping -D -s 8184 [destinationIP] | |
On Linux it’s: | |
ping -M do -s 8972 [destinationIP] | |
On Windows it’s: | |
ping -f -l 9000 [destinationIP] | |
If you’ve forgotten to enable jumbo frames/9k MTU on your client device you’re sending the ping from you’ll see: |
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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init && git add . && git status | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git | |
git push -u --force origin master |
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 | |
if [ "$1" == "" ] | |
then | |
echo "Usage: ./ping .sh 192.168.1" | |
else | |
for x in `seq 1 254`; do | |
ping -c 1 $1.$x | grep "64 bytes" | cut -d " " -f 4 | sed 's/.$//' | |
done | |
fi |
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/sh | |
set -e | |
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
while read path_key path | |
do | |
url_key=$(echo $path_key | sed 's/\.path/.url/') | |
url=$(git config -f .gitmodules --get "$url_key") | |
git submodule add $url $path |
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
# Error message | |
$ tail -f /var/log/maillog | |
Dec 6 06:06:16 prdmgtjmp01 postfix/smtp[17822]: 0B11CC41153: to=<[email protected]>, relay=email-smtp.us-west2.amazonaws.com[35.162.44.160]:587, delay=4.2, delays=0.03/0.04/4.2/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server email-smtp.us-west-2.amazonaws.com[35.162.44.160]: no mechanism available) | |
Dec 6 06:11:04 prdmgtjmp01 postfix/qmgr[17814]: 9CA16C43607: from=<root@>, size=466, nrcpt=1 (queue active) | |
Dec 6 06:11:05 prdmgtjmp01 postfix/smtp[17830]: 78F56C41157: SASL authentication failed; cannot authenticate to server email-smtp.us-west-2.amazonaws.com[52.10.113.69]: no mechanism available | |
Dec 6 06:11:05 prdmgtjmp01 postfix/smtp[17829]: warning: SASL authentication failure: No worthy mechs found | |
# Solution: | |
$ yum install cyrus-sasl{,-plain} | |
# Try again: |
OlderNewer