View gist:7ee68379e3876563f6749e8c7ca42775
- name: Discovery EPG To Domains
aci_epg_to_domain:
hostname: "{{ aci_discovery_apic_controller }}"
password: "{{ aci_discovery_password }}"
state: query
tenant: "{{ item }}"
username: "{{ aci_discovery_username }}"
validate_certs: false
register: _aci_discovered_epg_domains
with_items: "{{ aci_discovered_tenants }}"
View gist:039a7bccf342e456dc6f9cbb2474c995
- hosts: all
tasks:
- name: Ansible check directory exists.
stat:
path=/etc/yum.repos.d
register: p
- debug:
msg: "Path exists and is a directory"
when: p.stat.isdir is defined and p.stat.isdir
View aci_discovery.yml.j2
---
tenants:
{% for tenant in aci_discovered_tenants %}
{{ tenant }}:
{% for _ap_tenants in _aci_discovered_aps['results'] %}
{% for _ap_tenant in _ap_tenants['existing'] %}
{% if _ap_tenant['fvTenant']['attributes']['name'] == tenant %}
{% if _ap_tenant['fvTenant']['children'] is defined %}
app_profiles:
{% for ap in _ap_tenant['fvTenant']['children'] %}
View nxos_interface
- name: configure loopback interface address
nxos_ip_interface:
addr: 1.1.1.1
host: "{{ ansible_host }}"
interface: loopback 0
mask: 24
password: "{{ ansible_net_password }}"
state: present
transport: cli
username: "{{ ansible_net_username }}"
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