Skip to content

Instantly share code, notes, and snippets.

View mrlesmithjr's full-sized avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
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
- hosts: test_nodes
vars:
_docker_version: 17.12.0
tasks:
- group:
name: docker
state: present
become: true
#! /usr/bin/env python
"""Parses Terraform tfstate to generate Ansible inventory."""
import json
import os
import yaml
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
TERRAFORM_INVENTORY = []
TERRAFORM_ANSIBLE_INVENTORY = (
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
refreshenv
---
- hosts: dbservers
tasks:
- name: Apply MySQL Role
import_role:
name: mrlesmithjr.mysql
- hosts: webservers
tasks:
- name: Apply NGINX Role
#!/usr/bin/env python3
import json
import glob
from datetime import datetime
import csv
src = "./"
date = datetime.now()
#!/usr/bin/env bash
# ZFS Backups to remote server using replication
# Larry Smith Jr.
# @mrlesmithjr
# http://everythingshouldbevirtual.com
# Turn on verbose execution
set -x
---
_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 %}
#! /usr/bin/env bash
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c42237bb14f10c6ef7b997b780b584314d6f9c74/Casks/vmware-fusion.rb
#! /usr/bin/env bash
# Currently only works with Terraform versions up to 0.12.29
set -e
# Clone the repository
git clone https://github.com/Telmate/terraform-provider-proxmox
# Go Install the provider and provisioner (requires a working Golang installation)
cd terraform-provider-proxmox