Skip to content

Instantly share code, notes, and snippets.

View deekayen's full-sized avatar
🏡
Working from home

David Norman deekayen

🏡
Working from home
View GitHub Profile
@deekayen
deekayen / tagging_compliance.yml
Last active November 21, 2019 19:01
Query AWS to find instances and volumes without Name tags using an Ansible playbook. In Ansible Tower, use a null inventory along with an AWS cloud credential. Extend this with another task to stop instances with no Name tag.
---
- hosts: 127.0.0.1
connection: local
become: no
vars:
aws_region: us-east-1
tasks:
@deekayen
deekayen / update_git.sh
Created September 24, 2019 16:28
Update all the git repos in a directory with the latest pull of master
#!/bin/sh
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
@deekayen
deekayen / cowsay.yml
Last active September 20, 2019 20:54
Parse brew list for the version of currently installed cowsay.
---
- hosts: localhost
connection: local
tasks:
- name: Install cowsay.
homebrew:
name: cowsay
@deekayen
deekayen / buffalo.cow
Last active January 8, 2020 19:03
Buffalo animal for cowsay
##
## Buffalo
##
$the_cow = <<EOC;
$thoughts
$thoughts _.-````'-,_
_,.,_ ,-'` `'-.,_
/) ( '``-.
(( ) ) `\\
\\) (_/ )\\
@deekayen
deekayen / motd.txt
Created September 3, 2019 20:12
BSA logo in ASCII
.
.l.
'ONx.
,0MkMO'
;XMMlMMK,
;XMMM,MMMK,
'KMMMN'NMMMK'
....... .dMMMMK'KMMMMo. ......
,cd0XWMMWX0d:XMMMMKlkXMMMK;dOXWWWWXOo:,
lc;,'......':xNMMxllKdxMMMNx:'.....',;:ll
@deekayen
deekayen / .gitattributes
Created August 6, 2019 04:37
Print the vaulted AWS secrets stored in Ansible Tower
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
@deekayen
deekayen / resize_instance.yml
Created July 3, 2019 17:21
Resize EC2 instances using Ansible Tower.
---
- hosts: all
connection: local
gather_facts: no
pre_tasks:
- debug:
var: ansible_limit
verbosity: 1
@deekayen
deekayen / custom.css
Last active December 2, 2018 01:30
Mastodon admin site settings with scouting colors
@import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Slab');
body { font-family: 'Roboto', sans-serif }
.drawer__header, .column-header, .column-header__button, .column-header__back-button, .tabs-bar__link, .landing-page #mastodon-timeline .column-header { font-family: 'Roboto Slab', sans-serif; background: #003f87; color: #ffffff }
.tabs-bar__link.active { font-family: 'Roboto Slab', sans-serif; color: #e9e9e4; border-bottom: 2px solid #cd1126 }
.drawer__tab { font-family: 'Roboto Slab', sans-serif; color: #ffffff }
.button, .simple_form button, .simple_form .button, .simple_form .block-button { background-color: #ce1126 }
.flash-message.notice { background: #006b3f; color: #ffffff }
@deekayen
deekayen / Jenkinsfile
Last active September 19, 2018 13:24
Download and build amazon-efs-utils in a Jenkins pipeline
node() {
stage ('pre-clean') {
cleanWs()
}
stage ('clone scm') {
git 'https://github.com/aws/efs-utils.git'
}
stage ('build') {
sh '''#!/bin/bash
@deekayen
deekayen / main.yml
Created August 7, 2018 21:38
Ansible: loop through a string list. Could be useful for creating lots of EC2 instances passed from a textarea in Ansible Tower.
---
- hosts: all
connection: local
vars:
stuff: "asdf
asdfasdf
asdfasdfasdf
asdfasdfasdf