View .bash_profile
# .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
View .bashrc
# .bashrc
#### SETUP TOOLS ####
# Instructions for setting up various tools
## LINUX ##
#
# cd ~
# git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt --depth=1
View atom.packages.txt
Atom-Bash-Snippets
advanced-open-file
ansible-galaxy
ansible-snippets
ansible-vault
atom-beautify
atom-jinja2
atom-material-syntax
atom-material-syntax-dark
atom-material-ui
View ansible-container --debug
2017-05-27T14:35:33.304571 The default type is [container.config] caller_file=/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/config.py caller_func=_resolve_defaults caller_line=140 config=<class 'ruamel.yaml.comments.CommentedMap'> defaults=<type '_ordereddict.ordereddict'>
2017-05-27T14:35:33.305364 Getting environment variables... [container.config] caller_file=/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=156
2017-05-27T14:35:33.306091 Read environment variables [container.config] caller_file=/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=161 env_vars={}
2017-05-27T14:35:33.306749 Resolved template variables [container.config] caller_file=/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/containe
View setup_ansible_virtualenvs.sh
#!/usr/bin/env bash
set -x
ANSIBLE_VERSIONS=("1.9.4" "1.9.5" "1.9.6" "2.0.0.0" "2.0.0.1" "2.0.0.2" \
"2.0.1.0" "2.0.2.0" "2.1.0.0" "2.1.1.0" "2.1.2.0" "2.1.3.0" \
"2.1.4.0" "2.1.5.0" "2.1.6.0" "2.2.0.0" "2.2.1.0" "2.2.2.0" \
"2.2.3.0" "2.3.0.0" "2.3.1.0")
ANSIBLE_CONTAINER_VERSIONS=("0.1.0" "0.2.0" "0.3.0" "0.9.0.0" "0.9.1")
VIRTUALENV_PATH="./python-virtualenvs"
View dig2JSON
foo=$(dig google.com +nocomments +noquestion +noauthority +noadditional +nostats | awk '{if (NR>3){print}}'| jq -R 'split("\t") |{Name:.[0],TTL:.[2],Class:.[3],Type:.[4],IpAddress:.[5]}' | jq --slurp .) | jq -n --argjson v $foo '{"foo": $v}'
View email_notifications.txt.j2
The following machines were included in this execution:
# Defined machines marked as broken
{% if groups['maas_broken_machines'] is defined %}
maas_broken_machines:
{% for host in groups['maas_broken_machines'] %}
- '{{ host }}'
{% endfor %}
{% elif groups['maas_broken_machines'] is not defined %}
maas_broken_machines: []
View kvm_vms_list.yml.j2
---
{% if groups['kvm_vms_list'] is defined %}
kvm_vms_list:
{% for item in groups['kvm_vms_list'] %}
- '{{ item }}'
{% endfor %}
{% elif groups['kvm_vms_list'] is not defined %}
kvm_vms_list: []
{% endif %}
View maas.inventory.inv.j2
[maas_non_provisioned]
{% for host in (maas_machines['stdout']|from_json) %}
{% if groups['maas_deployed_machines'] is defined %}
{% if host['fqdn'] not in groups['maas_deployed_machines'] %}
{{ host['fqdn'] }}
{% elif host['hostname'] not in groups['maas_deployed_machines'] %}
{{ host['hostname'] }}
{% endif %}
{% elif groups['maas_deployed_machines'] is not defined %}
{{ host['fqdn'] }}
View maas_management_vars.yml.j2
---
# Defined vars from first maas play to continue onto additional plays.
# these will eventually be put into group_vars
inventory_directory: '{{ inventory_directory }}'
maas_login_profile: '{{ maas_login_profile }}'
maas_login_url: '{{ maas_login_url }}'
maas_login_user: '{{ maas_login_user }}'
maas_match_kvm_name: {{ maas_match_kvm_name }}
maas_virsh_user: '{{ maas_virsh_user }}'