Skip to content

Commit

Permalink
Make adjustments for ansible code moving into separate collection repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Jackson committed Sep 16, 2024
1 parent 63f7ca5 commit 0b3ac1e
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 94 deletions.
6 changes: 1 addition & 5 deletions .github/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
[whitelist]
# As of v4, gitleaks only matches against filename, not path in the
# files directive. Leaving content for backwards compatibility.
files = [
"ansible/plugins/modules/*.py",
"ansible/tests/unit/test_*.py",
"ansible/tests/unit/v1/*.yaml",
]
files = [ ]
17 changes: 0 additions & 17 deletions .github/workflows/ansible-lint.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/ansible-unittest.yml

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/display-secrets-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ SCRIPT=$(get_abs_filename "$0")
SCRIPTPATH=$(dirname "${SCRIPT}")
COMMONPATH=$(dirname "${SCRIPTPATH}")
PATTERNPATH=$(dirname "${COMMONPATH}")
ANSIBLEPATH="$(dirname ${SCRIPTPATH})/ansible"
PLAYBOOKPATH="${ANSIBLEPATH}/playbooks"

export ANSIBLE_CONFIG="${ANSIBLEPATH}/ansible.cfg"

if [ "$#" -ge 1 ]; then
export VALUES_SECRET=$(get_abs_filename "${1}")
Expand Down
5 changes: 1 addition & 4 deletions scripts/load-k8s-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ SCRIPT=$(get_abs_filename "$0")
SCRIPTPATH=$(dirname "${SCRIPT}")
COMMONPATH=$(dirname "${SCRIPTPATH}")
PATTERNPATH=$(dirname "${COMMONPATH}")
ANSIBLEPATH="$(dirname ${SCRIPTPATH})/ansible"
PLAYBOOKPATH="${ANSIBLEPATH}/playbooks"
export ANSIBLE_CONFIG="${ANSIBLEPATH}/ansible.cfg"

PATTERN_NAME=${1:-$(basename "`pwd`")}

ansible-playbook -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" "${PLAYBOOKPATH}/k8s_secrets/k8s_secrets.yml"
ansible-playbook -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" "rhvp.cluster_utils.k8s_secrets"
5 changes: 1 addition & 4 deletions scripts/process-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ SCRIPT=$(get_abs_filename "$0")
SCRIPTPATH=$(dirname "${SCRIPT}")
COMMONPATH=$(dirname "${SCRIPTPATH}")
PATTERNPATH=$(dirname "${COMMONPATH}")
ANSIBLEPATH="$(dirname ${SCRIPTPATH})/ansible"
PLAYBOOKPATH="${ANSIBLEPATH}/playbooks"
export ANSIBLE_CONFIG="${ANSIBLEPATH}/ansible.cfg"

PATTERN_NAME=${1:-$(basename "`pwd`")}
SECRETS_BACKING_STORE="$($SCRIPTPATH/determine-secretstore-backend.sh)"

ansible-playbook -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" -e secrets_backing_store="${SECRETS_BACKING_STORE}" "${PLAYBOOKPATH}/process_secrets/process_secrets.yml"
ansible-playbook -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" -e secrets_backing_store="${SECRETS_BACKING_STORE}" "rhvp.cluster_utils.process_secrets"
5 changes: 1 addition & 4 deletions scripts/vault-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ SCRIPT=$(get_abs_filename "$0")
SCRIPTPATH=$(dirname "${SCRIPT}")
COMMONPATH=$(dirname "${SCRIPTPATH}")
PATTERNPATH=$(dirname "${COMMONPATH}")
ANSIBLEPATH="$(dirname ${SCRIPTPATH})/ansible"
PLAYBOOKPATH="${ANSIBLEPATH}/playbooks"
export ANSIBLE_CONFIG="${ANSIBLEPATH}/ansible.cfg"

# Parse arguments
if [ $# -lt 1 ]; then
Expand All @@ -28,4 +25,4 @@ if [ -z ${TASK} ]; then
exit 1
fi

ansible-playbook -t "${TASK}" -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" "${PLAYBOOKPATH}/vault/vault.yaml"
ansible-playbook -t "${TASK}" -e pattern_name="${PATTERN_NAME}" -e pattern_dir="${PATTERNPATH}" "rhvp.cluster_utils.vault"
5 changes: 1 addition & 4 deletions scripts/write-token-kubeconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@ SCRIPT=$(get_abs_filename "$0")
SCRIPTPATH=$(dirname "${SCRIPT}")
COMMONPATH=$(dirname "${SCRIPTPATH}")
PATTERNPATH=$(dirname "${COMMONPATH}")
ANSIBLEPATH="$(dirname ${SCRIPTPATH})/ansible"
PLAYBOOKPATH="${ANSIBLEPATH}/playbooks"
export ANSIBLE_CONFIG="${ANSIBLEPATH}/ansible.cfg"

ansible-playbook -e pattern_dir="${PATTERNPATH}" -e kubeconfig_file="${OUTPUTFILE}" "${PLAYBOOKPATH}/write-token-kubeconfig/write-token-kubeconfig.yml"
ansible-playbook -e pattern_dir="${PATTERNPATH}" -e kubeconfig_file="${OUTPUTFILE}" "rhvp.cluster_utils.write-token-kubeconfig"

0 comments on commit 0b3ac1e

Please sign in to comment.