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
| - name: Use the GIT_SSH_COMMAND environment variable to automatically accept the host key | |
| shell: git archive [email protected]:my-repo.git master my-file | |
| # Can be used for bitbucket.org for example | |
| environment: | |
| GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" |
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 | |
| # Exit if any of the intermediate steps fail | |
| set -e | |
| function check_deps() { | |
| if test ! "$(which jq)" | |
| then | |
| >&2 echo "Cannot find jq" | |
| exit 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
| for policy in $(aws iam list-policies --scope Local | jq -r .Policies[].PolicyName | sort) | |
| do | |
| policy_output=$(aws iam list-policies --scope Local | jq -r --arg NAME $policy '.Policies[] | select(.PolicyName == $NAME)') | |
| policy_arn=$(echo $policy_output | jq -r .Arn) | |
| policy_description=$(aws iam get-policy --policy-arn $policy_arn | jq -r '.Policy.Description // ""') | |
| policy_version=$(echo $policy_output | jq -r .DefaultVersionId) | |
| policy_path=$(echo $policy_output | jq -r .Path) | |
| echo "resource \"aws_iam_policy\" \"$policy\" {" | |
| echo " name = \"$policy\"" |
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 | |
| # jq and rd command must be installed | |
| #Β https://github.com/rundeck/rundeck-cli | |
| usage() { | |
| cat <<"EOF" | |
| USAGE: | |
| rundeck_clean_activites.sh [OPTIONS] |
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 | |
| # Default install path is /usr/local/bin | |
| # Override with update-terraform.sh /override/path/ | |
| INSTALL_DIR="${1:-/usr/local/bin}" | |
| URL="https://releases.hashicorp.com/terraform" | |
| VER="$(curl -sL $URL | egrep -v 'beta|alpha' | grep -Po "_(\d*\.?){3}" | sed 's/_//' | sort -V | tail -1)" | |
| ZIP="terraform_${VER}_linux_amd64.zip" |