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 | |
| set -e | |
| if ! command -v git &> /dev/null; then | |
| echo "Error: Git command not found. Please install Git and configure GitHub authentication." | |
| exit 1 | |
| fi | |
| if ! command -v find &> /dev/null; then | |
| echo "Error: Find command not found. Please install Find." |
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
| # config file for ansible -- http://ansible.com/ | |
| # ============================================== | |
| # nearly all parameters can be overridden in ansible-playbook | |
| # or with command line flags. ansible will read ANSIBLE_CONFIG, | |
| # ansible.cfg in the current working directory, .ansible.cfg in | |
| # the home directory or /etc/ansible/ansible.cfg, whichever it | |
| # finds first | |
| [defaults] |
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
| Host * | |
| ForwardAgent yes | |
| ControlMaster auto | |
| ControlPath /tmp/%r@%h:%p | |
| ServerAliveInterval 30 | |
| ServerAliveCountMax 10 | |
| AddKeysToAgent yes | |
| StrictHostKeyChecking no | |
| PubkeyAcceptedKeyTypes=+ssh-rsa | |
| HostKeyAlgorithms=+ssh-rsa |
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 | |
| gcloud compute instances list --filter=gke-cluster --format="json" | jq '.[] | {name, external_ip: .networkInterfaces[0]["accessConfigs"][0].natIP}' | |
| { |
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
| # filter not empty, not null based on field in array | |
| curl -s --location --request GET -H "Authorization: Bearer $token" -H "CF-Access-Client-Id: $CF_Access_Id" -H "CF-Access-Client-Secret: $CF_Access_Secret" https://$ARGOCD_DOMAIN/api/v1/clusters| jq '.items|=sort_by(.name) | .items[] | {name,server,serverVersion} | select( .serverVersion != null ) | join("=")' --raw-output | |
| # set default value in field of array | |
| curl -s --location --request GET -H "Authorization: Bearer $token" -H "CF-Access-Client-Id: $CF_Access_Id" -H "CF-Access-Client-Secret: $CF_Access_Secret" https://$ARGOCD_DOMAIN/api/v1/clusters| jq '.items|=sort_by(.name) | .items[] | {name,server,serverVersion} | [.[] | . // "unknown"] | join("=")' --raw-output |
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 | |
| clusterList=$(kubectl config get-contexts --output=name) | |
| while read line; do | |
| contexts[${#contexts[@]}]="$line"; | |
| done <<< "$clusterList"; | |
| select context in "${contexts[@]}" | |
| do | |
| echo "Selected => $context"; |
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 | |
| echo "Installed ansible versions"; | |
| for i in $(ls $HOME/avm_dir/versions); | |
| do | |
| echo $i; | |
| done | |
| echo Choose ansible version: | |
| read line < /dev/tty | |
| ANSIBLE_VERSION=$line; |
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 | |
| PYTHON_BIN=$1 | |
| ANSIBLE_CORE_VERSION=$2 | |
| ANSIBLE_PACKAGE_VERSION=$3 | |
| PYTHON_BIN="${PYTHON_BIN:-python3.11}" | |
| ANSIBLE_CORE_VERSION="${ANSIBLE_CORE_VERSION:-2.14}" | |
| ANSIBLE_PACKAGE_VERSION="${ANSIBLE_PACKAGE_VERSION:-7.2.0}" |
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 | |
| echo "Installed ansible versions"; | |
| for i in $(ls $HOME/avm_dir/versions); | |
| do | |
| echo $i; | |
| done | |
| echo Choose ansible version: | |
| read line < /dev/tty | |
| ANSIBLE_VERSION=$line; |
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 | |
| clear | |
| getAppName() { | |
| echo -e "\n*** Please enter your application name: ***" | |
| read APP_NAME | |
| } | |
| getBranchStrategy() { | |
| echo -e "\n*** Please select GitHub repository branch name if your app follows a single branch workflow strategy? ***" |
NewerOlder