Skip to content

Instantly share code, notes, and snippets.

@dalitun
dalitun / k8s-user-data.sh
Created October 8, 2018 19:40 — forked from initcron/k8s-user-data.sh
kubernetes user data script
#!/bin/bash
apt-get update
apt-get install -y git wget
# Install Docker
apt-get install \
apt-transport-https \
ca-certificates \
curl \
@dalitun
dalitun / 1_dmz-provisioner.sh
Created March 18, 2019 14:52 — forked from kenmoini/1_dmz-provisioner.sh
Disconnected DevSecOps with Red Hat OpenShift Container Platform - DMZ Repo Mirror Provisioner
#!/bin/bash
LOCAL_REPO_PATH="/opt/repos"
# This script enables the needed RHEL, OpenShift, Gluster, Ansible, HA, and additional repos needed to mirror them locally.
# The locally created mirror can then be used to deploy OCP into a disconnected environment.
#===== PRE-RUN NOTES:
# This assumes you've already registered and subscribed to the needed OpenShift, Gluster, Ansible, and RHEL subscriptions.
@dalitun
dalitun / convert-and-test.sh
Created December 9, 2021 17:45 — forked from filipenf/convert-and-test.sh
Script to convert an ansible vault into a yaml file with encrypted strings
#!/bin/bash
#Vault password is 1
echo "Converting vault to yaml format:"
ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml
echo "Decrypting a variable from the converted vault"
ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas