View vsphere_management.ps1.j2
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
.INPUTS
<Inputs if any, otherwise state None>
.OUTPUTS Log File
View ssh_keys_distribution.yml.j2
---
_ssh_keys_distribution:
{% for host in play_hosts %}
- host: '{{ host }}'
keys:
{% for _keys in hostvars[host]['_ssh_pub_key']['results'] %}
- user: '{{ _keys['item'] }}'
key: '{{ _keys['stdout'] }}'
{% endfor %}
{% endfor %}
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 %}