Skip to content

Instantly share code, notes, and snippets.

### docker-swarm-playbook.yml
---
- name: Setup Common Elements
hosts: all
become: true
gather_facts: true
remote_user: ${remote_user}
tasks:
- name: Create Node Exporter user
user:
@davidjsanders
davidjsanders / LFD259-Vagrantfile
Last active May 22, 2019 01:42
Vagrantfile to prepare and build VMs for LFD259 - Certified Kubernetes Application Developer environment
#
# To run...
# LFDUrl=https://.../LFD259_...tar.bz2 LFDUser=theusername LFDPassword=thepassword vagrant up
#
# Thanks to Raj Rajaratnam for his original Medium article:
# https://medium.com/@wso2tech/multi-node-kubernetes-cluster-with-vagrant-virtualbox-and-kubeadm-9d3eaac28b98
#
$bothScript = <<-SCRIPT
#
# Set the timezone to Toronto
@davidjsanders
davidjsanders / anchore-scan.sh
Created April 5, 2019 00:29
A simple shell script to call anchore and a) add an image, b) wait for the image scan to complete, and c) fetch the vulnerabilities, awk them to a comma-delimited list (excluding the headers) and then pipe to jq
#!/usr/bin/env bash
echoerr () {
echo "$@" 1>&2
}
if [ "$1x" == "x" ]; then
echoerr "Please specify the image name"
return
fi