Skip to content

Instantly share code, notes, and snippets.

Avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
View vmware_fusion_11.sh
#! /usr/bin/env bash
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c42237bb14f10c6ef7b997b780b584314d6f9c74/Casks/vmware-fusion.rb
View install_tf_proxmox_provider.sh
#! /usr/bin/env bash
# Currently only works with Terraform versions up to 0.12.29
set -e
# Clone the repository
git clone https://github.com/Telmate/terraform-provider-proxmox
# Go Install the provider and provisioner (requires a working Golang installation)
cd terraform-provider-proxmox
@mrlesmithjr
mrlesmithjr / gist:72e23d0a0cceefef553b83b4fce5d06f
Created Sep 18, 2020
Example GitLab CI Pipeline using Terraform, etc.
View gist:72e23d0a0cceefef553b83b4fce5d06f
---
# Most pre-req tooling, etc. is installed using jumphosts.yml playbook
variables:
ADMIN_EMAIL: mrlesmithjr@gmail.com
CLOUD_PROVIDER: Azure # Define Supported Cloud Provider (Azure)
GIT_CRYPT_ENABLED: "true" # Must be lowercase (true|false)
GIT_SUBMODULE_STRATEGY: recursive
ORGANIZATION: example_org
PROJECT_NAME: example_project
TERRAFORM_VERSION: 0.12.28
View interfaces
# Custom interfaces file for Packer builds using cloud-init
View backup.sh
#!/usr/bin/env bash
set -e
DEST="Backblaze:$(hostname | awk -F. '{ print $1}')"
OPTS=("--delete-excluded" "--links" "--fast-list" "-v")
DIRS=("$HOME/Desktop" "$HOME/Documents" "$HOME/Git_Projects" "$HOME/Pictures"
"$HOME/.kube" "$HOME/.ssh")
EXCLUDE=("Applications/**" "Documents/Snagit/Autosaved Captures.localized/**"
"Documents/Virtual Machines.localized/**" "Downloads/**" "Dropbox/**"
"Google Drive/**" "Library/Caches/**" "Library/Containers/com.docker.docker/**"
View environment.yml
---
# Global provisioners will run against every node in the order specified.
# These provisioners run after all node specific provisioners if defined.
#
# For node specific provisioners add at the node level
provisioners: []
# - type: shell
# inline: |
# if [ -f /etc/os-release ]; then
# os_name="$(awk -F= '/^NAME/{ print $2 }' /etc/os-release | sed 's/"//g')"
View example_playbook.yml
---
- hosts: dbservers
tasks:
- name: Apply MySQL Role
import_role:
name: mrlesmithjr.mysql
- hosts: webservers
tasks:
- name: Apply NGINX Role
View Terraform_Trace.log
2020/07/07 17:44:48 [INFO] Terraform version: 0.12.28
2020/07/07 17:44:48 [INFO] Go runtime version: go1.12.13
2020/07/07 17:44:48 [INFO] CLI args: []string{"/home/gitlab-runner/.tfenv/versions/0.12.28/terraform", "plan", "-var-file", "../../terraform.tfvars.json"}
2020/07/07 17:44:48 [DEBUG] Attempting to open CLI config file: /home/gitlab-runner/.terraformrc
2020/07/07 17:44:48 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/07/07 17:44:48 [INFO] CLI command args: []string{"plan", "-var-file", "../../terraform.tfvars.json"}
2020/07/07 17:44:48 [TRACE] Meta.Backend: built configuration for "consul" backend with hash value 3886058809
2020/07/07 17:44:48 [TRACE] Preserving existing state lineage "204fed1e-c02e-9d22-6844-9060bac526ed"
2020/07/07 17:44:48 [TRACE] Preserving existing state lineage "204fed1e-c02e-9d22-6844-9060bac526ed"
2020/07/07 17:44:48 [TRACE] Meta.Backend: working directory was previously initialized for "consul" backend
View CHANGELOG.md

commit e1c55d9060a0d104c710d1803fbc887d0f34ea44 Author: Larry Smith Jr mrlesmithjr@gmail.com Date: Sat May 16 02:18:34 2020 -0400

Updated/added comments for tasks in script

commit a397db53bd6e4c9001810fb3f0af1934bf6523f5 Author: Larry Smith Jr mrlesmithjr@gmail.com Date: Fri May 15 22:13:29 2020 -0400

View dex_slapd.sh
#!/bin/bash -e
if ! [[ "$0" =~ "scripts/slapd.sh" ]]; then
echo "This script must be run in a toplevel dex directory"
exit 255
fi
command -v slapd >/dev/null 2>&1 || {
echo >&2 "OpenLDAP not installed. Install using one of the following commands: