Skip to content

Instantly share code, notes, and snippets.

David Norman deekayen

Block or report user

Report or block deekayen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deekayen
deekayen / motd.txt
Created Sep 3, 2019
BSA logo in ASCII
View motd.txt
.
.l.
'ONx.
,0MkMO'
;XMMlMMK,
;XMMM,MMMK,
'KMMMN'NMMMK'
....... .dMMMMK'KMMMMo. ......
,cd0XWMMWX0d:XMMMMKlkXMMMK;dOXWWWWXOo:,
lc;,'......':xNMMxllKdxMMMNx:'.....',;:ll
@deekayen
deekayen / .gitattributes
Created Aug 6, 2019
Print the vaulted AWS secrets stored in Ansible Tower
View .gitattributes
*.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 Jul 3, 2019
Resize EC2 instances using Ansible Tower.
View resize_instance.yml
---
- hosts: all
connection: local
gather_facts: no
pre_tasks:
- debug:
var: ansible_limit
verbosity: 1
@deekayen
deekayen / custom.css
Last active Dec 2, 2018
Mastodon admin site settings with scouting colors
View custom.css
@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 Sep 19, 2018
Download and build amazon-efs-utils in a Jenkins pipeline
View Jenkinsfile
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 Aug 7, 2018
Ansible: loop through a string list. Could be useful for creating lots of EC2 instances passed from a textarea in Ansible Tower.
View main.yml
---
- hosts: all
connection: local
vars:
stuff: "asdf
asdfasdf
asdfasdfasdf
asdfasdfasdf
@deekayen
deekayen / runonce.bat
Created Jul 20, 2018
Run Once: Start WinRM for Ansible to connect to Windows
View runonce.bat
powershell.exe -Command "& {[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-WebRequest -Uri https://raw.githubusercontent.com/ansible/ansible/7963279fc2c3a8cfa6affb70307bac6fa669679c/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile C:\Windows\Temp\ConfigureRemotingForAnsible.ps1}"
powershell.exe -ExecutionPolicy Bypass -File C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfile -EnableCredSSP -ForceNewSSLCert -CertValidityDays 3650
@deekayen
deekayen / vault.sh
Last active Jul 18, 2018
Configure a default vault password file for Ansible AWX
View vault.sh
docker exec -it awx_task_containerid bash
vi /var/lib/awx/.vault_pass.txt
vi /etc/ansible/ansible.cfg
# add /var/lib/awx/.vault_pass.txt to ansible.cfg
exit
@deekayen
deekayen / upgrade.sh
Last active Aug 7, 2019
Upgrade Ansible AWX containers
View upgrade.sh
docker stop awx_task
docker rm awx_task
docker rmi ansible/awx_task:latest
docker stop awx_web
docker rm awx_web
docker rmi ansible/awx_web:latest
git pull
cd installer
@deekayen
deekayen / substr.yml
Created Mar 21, 2018
Ansible variable substring from regex_replace
View substr.yml
---
# RUN: ansible-playbook -i localhost, substr.yml
- hosts: localhost
vars:
stuff: deekayen@WINDOMAIN.COM
ansible_user: deekayen
tasks:
You can’t perform that action at this time.