Skip to content

Instantly share code, notes, and snippets.

@greenbrian
greenbrian / vault-token-role-via-api.sh
Last active January 23, 2024 15:10
HashiCorp Vault Token Role overview
# start vault in dev mode
VAULT_UI=true vault server -dev -dev-root-token-id="password"
# write some secrets for our example usage
curl --request POST \
--silent \
--header "X-Vault-Token: password" \
--header "Content-Type: application/json" \
--data '{ "options": { "cas": 0 }, "data": { "username": "administrator", "password": "hunter2" } }' \
http://127.0.0.1:8200/v1/secret/data/dev | jq '.'
@jpswade
jpswade / devops_best_practices.md
Last active August 11, 2024 11:13
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing

HOWTO: Installing Vault On an AWS Ubuntu EC2 server

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

@edrzmr
edrzmr / ansible-reboot.yaml
Last active October 11, 2019 21:26
ansible waiting for reboot, really really works!
- name: 'check if reboot is required'
shell: if [ $(readlink -f /vmlinuz) != /boot/vmlinuz-$(uname -r) ]; then echo 'yes'; else echo 'no'; fi
ignore_errors: true
register: reboot
- name: 'reboot...'
shell: nohup bash -c 'sleep 2 && shutdown -r now "Ansible kernel update applied"' &
async: 0
poll: 0
ignore_errors: true
@jeherve
jeherve / install.sh
Last active January 22, 2021 20:44
Installing my favorite apps on a new machine https://jeremy.hu/homebrew-cask-automate-mac-install/
#!/bin/sh
echo Install all AppStore Apps at first!
# If you are looking into a solution to automate AppStore installs,
# check mas https://github.com/argon/mas
# I installed XCode, Simplenote, Clocks, Stuffit Expander, Cloudapp, Forklift.
read -p "Press any key to continue... " -n1 -s
echo '\n'
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@cludden
cludden / howto-installing-vault-on-aws-linux.md
Created February 3, 2016 00:30
HOWTO: Installing Vault on AWS Linux

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

@ygorth
ygorth / troubleshooting-ansible-tower-cors-socket-io.txt
Last active February 21, 2017 10:31
Troubleshooting: Ansible Tower - Cross-Origin Request Blocked (CentOS 7.2.1511 - Python 2.7.5)
# CentOS Linux release 7.2.1511 (Core)
# Python 2.7.5
# Ansible Version
# 1.9.4
# Ansible Installation Method
# yum
# Tower Version
# 2.4.3
# Troubleshooting: Ansible Tower - Cross-Origin Request Blocked (CentOS 7.2.1511 - Python 2.7.5)
# Error messages: "Live events: error connecting to the Tower server." OR "Socket error: connection refused by host"
@digital-shokunin
digital-shokunin / Get wsadmin help.md
Last active January 5, 2024 03:46
WSAdmin cheatsheet
    Help()
    AdminApp.help()
    AdminConfig.help()
    AdminControl.help()

List some servers:

AdminControl.queryNames('type=Server,cell='+cn+',node='+nn+',*')