File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,9 +222,6 @@ run_ansible_playbook() {
222222 log " INFO" " Extracted key_vault_id: $key_vault_id "
223223 fi
224224
225- log " INFO" " Installing required Ansible collections..."
226- ansible-galaxy collection install community.general
227-
228225 if [[ " $auth_type " == " SSHKEY" ]]; then
229226 log " INFO" " Authentication type is SSHKEY."
230227
Original file line number Diff line number Diff line change 33
44#! /bin/bash
55
6- # Determine script and project directories
7- SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
8- PROJECT_ROOT=" $( dirname " $SCRIPT_DIR " ) "
9- VENV_DIR=" $PROJECT_ROOT /.venv"
10-
116# Function to check if a command exists
127command_exists () {
138 command -v " $1 " & > /dev/null
@@ -57,9 +52,9 @@ packages=("python3-pip" "ansible" "sshpass" "python3-venv")
5752
5853install_packages " ${packages[@]} "
5954
60- if [ ! -d " $VENV_DIR " ]; then
55+ if [ ! -d " ../.venv " ]; then
6156 log " INFO" " Creating Python virtual environment..."
62- if python3 -m venv " $VENV_DIR " ; then
57+ if python3 -m venv ../.venv ; then
6358 log " INFO" " Python virtual environment created."
6459 else
6560 log " ERROR" " Failed to create Python virtual environment."
6964
7065# Ensure virtual environment is activated
7166log " INFO" " Activating Python virtual environment..."
72- if source " $VENV_DIR / bin/activate" ; then
67+ if source ../.venv/ bin/activate; then
7368 log " INFO" " Python virtual environment activated."
7469else
7570 log " ERROR" " Failed to activate Python virtual environment."
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ display_skipped_hosts = False
99conditional_bare_variables = False
1010interpreter_python = auto_silent
1111callbacks_enabled = profile_tasks
12- stdout_callback = community.general.counter_enabled
12+ stdout_callback = yaml
1313bin_ansible_callbacks = True
1414host_key_checking = False
1515error_on_undefined_vars = True
You can’t perform that action at this time.
0 commit comments