Skip to content

Instantly share code, notes, and snippets.


Larry Smith Jr. mrlesmithjr

View GitHub Profile
View Postman-Tower-AWX.json
"info": {
"_postman_id": "0d319df0-e132-4187-82f7-5e42d4e5335d",
"name": "TOWER",
"schema": ""
"item": [
"name": "Get Tasks",
"request": {
mrlesmithjr /
Created Jul 28, 2019
Ansible IP request loops mockup
from random import getrandbits
from ipaddress import IPv4Network, IPv4Address
from ansible.module_utils.basic import AnsibleModule
def main():
fields = {'subnet': {'required': True, 'type': 'str'}}
module = AnsibleModule(argument_spec=fields)
#!/usr/bin/env python
'''A handy script to flush dns cache for Linux/macOS/Windows.'''
import logging
from subprocess import Popen
from sys import platform
import psutil
View file_last_updated.yml
- hosts: localhost
gather_facts: true
connection: local
# user: ansible
# become: true
# Define path to file to check
# file_to_check: /etc/ansible/ansible.cfg
# file_to_check: $HOME/ansible.cfg
View gist:444002a3091b1f9597c796d706188bd1
### Keybase proof
I hereby claim:
* I am mrlesmithjr on github.
* I am mrlesmithjr ( on keybase.
* I have a public key ASDZkpNIa6LhHlP9uBTN7GG2FYQUIM0l0SCD5wtHGjw4ywo
To claim this, I am signing this object:
View gist:77e3fa8a3d50835b2c531ce52eb5c51e
#adduser --shell /bin/bash --gecos "" --disabled-password testuser1
useradd -s /bin/bash -m -G sudo testuser1
echo "testuser1:testpass" | chpasswd
View ubuntu-live.json
"variables": {
"boot_command_prefix": "",
"box_tag": "",
"compression_level": "6",
"iso_checksum": "",
"iso_checksum_type": "",
"iso_url": "",
"vagrant_cloud_token": "",
"vagrant_cloud_username": "",
mrlesmithjr / windows_runonce
Last active Mar 15, 2019
Windows runonce for Ansible
View windows_runonce
powershell.exe -Command "& {[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-WebRequest -Uri -OutFile C:\Windows\Temp\ConfigureRemotingForAnsible.ps1}"
powershell.exe -ExecutionPolicy Unrestricted -File C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP
#!/usr/bin/env python
import json
VMS = {
'db01': {
'profile': 'Linux_DB',
'vm_size': 'medium'
'web01': {
'profile': 'Linux_Web',
#!/usr/bin/env python
import os
import shutil
for root, dirs, files in os.walk(os.getcwd()):
if 'venv' in dirs:
print('Found venv in {0}'.format(root))
folder = os.path.join(root, 'venv')