This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"golang.org/x/crypto/ssh" | |
kh "golang.org/x/crypto/ssh/knownhosts" |
This file contains hidden or 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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg2 | |
- software-properties-common |
This file contains hidden or 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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg2 | |
- software-properties-common |
This file contains hidden or 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
#cloud-config | |
users: | |
- default | |
- name: bastion | |
groups: sudo | |
shell: /bin/bash | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
hostname: ${fqdn} | |
package_update: true |
This file contains hidden or 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
version: 2.1 | |
executors: | |
golang: | |
docker: | |
- image: syntaqx/ci-golang | |
docker-publisher: | |
docker: | |
- image: circleci/buildpack-deps:19.04 | |
environment: | |
DOCKER_BUILDKIT: "1" |
This file contains hidden or 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
#!/bin/bash | |
rep=$(curl -s --unix-socket /var/run/docker.sock http://ping > /dev/null) | |
status=$? | |
if [ "$status" == "7" ]; then | |
echo 'not connected' | |
exit 1 | |
fi |
This file contains hidden or 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 bash | |
set -eo pipefail | |
[[ $TRACE ]] && set -x | |
# docker_gc.cron - Prunes all unused docker objects | |
# https://docs.docker.com/config/pruning/ | |
# | |
# By default, Docker takes a conservative approach to cleaning up unused objects | |
# (often referred to as "garbage collection"), such as images, containers, | |
# volumes, and networks. This can cause Docker to use extra disk space, |
This file contains hidden or 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
package log | |
import ( | |
"go.uber.org/zap" | |
"go.uber.org/zap/zapcore" | |
) | |
// NewNop returns a no-op Logger. It never writes out logs or internal errors, | |
// andf it never runs user-defined hooks. | |
// |
This file contains hidden or 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
package flagtype | |
// github.com/urfave/cli | |
import ( | |
"fmt" | |
"strings" | |
) | |
type EnumValue struct { | |
Enum []string |
This file contains hidden or 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
terraform { | |
required_version = ">= 0.12" | |
} | |
# | |
# @HOWTO: reference another state files output | |
# | |
# data "terraform_remote_state" "current" { | |
# backend = "remote" | |
# |