Skip to content

Instantly share code, notes, and snippets.

@ITBlogger
ITBlogger / main.tf
Created Feb 8, 2021
Terraform Cloud Workflow Creation Using Terraform
View main.tf
terraform {
required_providers {
tfe = {
source = "hashicorp/tfe"
}
}
}
provider "tfe" {
alias = "default"
@ITBlogger
ITBlogger / rancher.yaml
Created Oct 12, 2018
Sample Rancher rke yaml
View rancher.yaml
---
cluster_name: rancher
ignore_docker_version: true
cloud_provider:
name: aws
nodes:
- address: <IP1>
user: ubuntu
role: [controlplane,etcd,worker]
ssh_key_path: ~/.ssh/<key>.pem
View filebeat configmaps
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
kubernetes.io/cluster-service: "true"
data:
View pipelines.yml
- pipeline.id: beats-intake
pipeline.workers: 2
config.string: |
input {
beats {
port => 5044
ssl => true
ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
id => "beats_input"
View aws_dev_var_sample
---
asg_extra_tags:
- asg_extra:
- system: product1
- billing: Account1
elb_group_rules:
- rules:
- proto: tcp
from_port: 80
@ITBlogger
ITBlogger / gist:195ad4c1fcae2d81da64
Last active Aug 29, 2015
Ruby Script to process output of command and create Ansible host list
View gist:195ad4c1fcae2d81da64
#!/usr/bin/env ruby
whereami = "/cust/tools/bin/whereami"
ecndir = "/cust/tools/etc/envdef/envs"
sysinvfilename = "systeminventory.txt"
sysinv = File.open(sysinvfilename, "a")
dirs = Dir.entries("#{ecndir}")
dirs.sort!
@ITBlogger
ITBlogger / gist:8721349
Created Jan 30, 2014
Git rsync from /var/staging -- No longer used, but keeping if needed in future
View gist:8721349
#!/bin/bash
rsync -vrlptgo /var/staging/hiera/hiera/ /var/lib/hiera/ --chmod=Du+rwx,go=rx,Fu+rw,go=r --del
chown -R root:root /var/lib/hiera
for environment in `ls /var/staging/environments`
do
echo "this is environment ${environment}"
cd /var/staging/environments/${environment}
commit=`git log -1 | grep commit`
echo "${commit}"
echo `cat /var/staging/${environment}-commit`