This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"access_key": "{{user `var_aws_access_key`}}", | |
"ami_description": "Built from the GL cut CentOS7. This is a fairly standard CentOS7 image.", | |
"ami_name": "CentOS 7 x86_64 Base {{timestamp}}", | |
"associate_public_ip_address": true, | |
"enhanced_networking": true, | |
"instance_type": "{{user `var_aws_instance_type`}}", | |
"region": "{{user `var_aws_region`}}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bats | |
@test "Ensure uchiwa is running" { | |
run systemctl is-active uchiwa | |
[ "$status" -eq 0 ] | |
} | |
@test "Ensure uchiwa is enabled" { | |
run systemctl is-enabled uchiwa | |
[ "$status" -eq 0 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/gocode | |
cat << "EOL" >> ~/.bashrc | |
export GOPATH="$HOME/gocode" | |
export PATH=$GOPATH/bin:"${PATH}" | |
EOL | |
source ~/.bashrc | |
go get github.com/tools/godep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENVIRONMENT="$1" | |
test_CNT="thing1 thing2 thing3" | |
beta_CNT="thing4 thing5 thing6" | |
for i in ${${ENVIRONMENT}_CNT}; do | |
echo $i | |
done | |
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_security_group" "jenkins" { | |
name = "${var.env}_${var.tier}_jenkins_secgroup" | |
vpc_id = "${var.vpc_id}" | |
description = "jenkins security group" | |
tags { | |
Name = "${var.env}_${var.tier}_jenkins_secgroup" | |
TERRAFORM = "true" | |
ENV = "${var.env}" | |
TIER = "${var.tier}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Assume this list of ips | |
192.168.33.10,192.168.33.11,192.168.33.12 | |
"retry_join": [{% for h in groups['consul_servers'] %}"{{ hostvars[h].ansible_eth1.ipv4.address|difference(ansible_all_ipv4_addresses)|list }}"{% if not loop.last %},{% endif %}{% endfor , | |
### This will output | |
"retry_join": ["[u'1', u'9', u'2', u'.', u'6', u'8', u'3', u'0']"], | |
### I am looking for the following instead of ^ | |
#### Assuming I am on box 192.168.33.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat Jenkinsfile | |
#!/usr/bin/env groovy | |
node { | |
git credentialsId: '4sdjfsdkjbfgksjdbfksjdbfkjsdbfkjsdbfjkbsdfb', url: '[email protected]:/terraform-autobot.git' | |
withEnv(["SOURCE_BUILD_NUMBER=${env.BUILD_NUMBER}"]) { | |
sh '''#!/bin/bash | |
echo $SOURCE_BUILD_NUMBER | |
echo "=======" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "region" {} | |
variable "aws_access_key" {} | |
variable "aws_secret_key" {} | |
variable "env" {} | |
variable "company" {} | |
data "terraform_remote_state" "build-vpc" { | |
backend = "s3" | |
config { | |
region = "us-east-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 "resources": { | |
69 "data.terraform_remote_state.build-vpc": { | |
70 "type": "terraform_remote_state", | |
71 "depends_on": [], | |
72 "primary": { |
NewerOlder