Skip to content

Instantly share code, notes, and snippets.

View omgjlk's full-sized avatar
🤷‍♂️
Inserting sleeps until it works

Jesse Keating omgjlk

🤷‍♂️
Inserting sleeps until it works
View GitHub Profile
one two three
for five siz
Speedtest by Ookla
Server: CenturyLink - Seattle, WA (id = 8864)
ISP: CenturyLink
Latency: 2.68 ms (0.24 ms jitter)
Download: 663.06 Mbps (data used: 405.9 MB)
Upload: 937.53 Mbps (data used: 423.7 MB)
Packet Loss: 0.0%
Result URL: https://www.speedtest.net/result/c/db16d107-c13f-4faf-b62a-45224366641c
# Fin's Awesome Plant Monitor
import time
import board
import busio
import neopixel
from board import SCL, SDA
from adafruit_seesaw.seesaw import Seesaw
Identity added: /tmp/awx_15212_9qrimehd/artifacts/15212/ssh_key_data (gtower-cert-client-key@github)
Certificate added: /tmp/awx_15212_9qrimehd/artifacts/15212/ssh_key_data-cert.pub (vault-token-gtower-ssh-client-signer-c416ae1bc7d58a92d350f637f527504a89cd9a1b978b770093b10b5a2850bab8)
PLAY [Reboot hosts based on uptime TTL] ****************************************
TASK [gather the facts] ********************************************************
ok: [hookshot-kestrel-2c2b286.va3-iad.github.net]
TASK [locate github lifecycle hooks] *******************************************
ok: [hookshot-kestrel-2c2b286.va3-iad.github.net]
@omgjlk
omgjlk / the-plan.md
Created September 23, 2019 14:42
Tower External SSH Data

First setup (pre ssh certificate signing)

Short term description of how things will work for early beta:

  • Joe wants to run some automation across pages-fe hosts
  • Joe opens a pull request to the pages-fe-ansible repo with a new Ansible playbook and configuration to add it to AWX.
  • Joe get’s peer review
  • Joe does a branch deploy of pages-fe-ansible, which updates AWX config to use his branch for that project, and adds the new playbook as a “template”.
  • Joe then browses to gtower.githubapp.com and logs in with his LDAP credentials
  • Joe browses to the new template and clicks to execute.
  • Joe is prompted to select a credential to use. Joe select’s “joes-vault-backed-ssh-key” credential which only Joe is allowed to use
@omgjlk
omgjlk / whatsnext.yaml
Created August 30, 2019 17:13
Some Ansible to show what's next in a serial play
---
- name: try a thing
hosts: _cab*
ignore_unreachable: true
gather_facts: false
connection: local
serial: 2
tasks:
- name: what host am I
"top - 10:00:46 up 2 days, 23:45, 1 user, load average: 314.03, 311.50, 304.49",
"Tasks: 527 total, 1 running, 526 sleeping, 0 stopped, 0 zombie",
"%Cpu(s): 0.8 us, 0.3 sy, 0.0 ni, 93.4 id, 5.4 wa, 0.0 hi, 0.0 si, 0.0 st",
"KiB Mem: 9980740 total, 3293968 used, 6686772 free, 190216 buffers",
"KiB Swap: 0 total, 0 used, 0 free. 2547988 cached Mem",
"",
" PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND",
" 8991 omgjlk 20 0 26280 3168 2416 R 6.1 0.0 0:00.02 top",
" 1 root 20 0 60796 6728 4908 S 0.0 0.1 0:15.24 systemd",
" 2 root 20 0 0 0 0 S 0.0 0.0 0:00.72 kthreadd",
[2694520.622354] CPU 3/KVM invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=0, order=0, oom_score_adj=0
[2694520.622482] CPU 3/KVM cpuset=vcpu3 mems_allowed=0
[2694520.622737] CPU: 14 PID: 169362 Comm: CPU 3/KVM Not tainted 4.9.0-0.bpo.6-amd64 #1 Debian 4.9.88-1+deb9u1~bpo8+1
[2694520.622859] Hardware name: Dell Inc. PowerEdge FC640/05YC4P, BIOS 1.6.11 11/20/2018
[2694520.622977] 0000000000000000 ffffffff9b53047b ffffab422331f838 ffff8e400aa50800
[2694520.623402] ffffffff9b402ea5 0000000000000000 0000000000000000 ffffffff9b39b4ab
[2694520.623827] ffff8e413fffccc0 0000000c3fffb5c0 ffff8e413fffccf0 ffffffff9b38a0f4
[2694520.624250] Call Trace:
[2694520.624350] [<ffffffff9b53047b>] ? dump_stack+0x5a/0x6f
[2694520.624454] [<ffffffff9b402ea5>] ? dump_header+0x85/0x212
- name: playbook
hosts: all
tasks:
- name: do a thing
stat:
path: /to/a/file
register: stat_task
- name: see the var
debug:
1
Identity added: /tmp/awx_99_63jwa07n/credential_2 (/tmp/awx_99_63jwa07n/credential_2)
2
ansible 2.7.6
3
config file = /etc/ansible/ansible.cfg
4
configured module search path = [u'/var/lib/awx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
5