Skip to content
Snippets Groups Projects
Commit 68d54709 authored by Georg Krause's avatar Georg Krause
Browse files

feat: Allow to migrate to the new installation method for ansible

parent b81521ca
No related branches found
No related tags found
No related merge requests found
Pipeline #32061 passed
......@@ -49,6 +49,19 @@ yesno_prompt() {
}
do_upgrade() {
echo '[Check Ansible installation]'
if [ ! -f "$ansible_bin_path/ansible" ]; then
echo "To make the installation more future proof, we changed how ansible gets installed and now install it in its own venv."
yesno_prompt proceed 'Do you want to migrate to the new ansible installation method?' 'yes'
if [ "$proceed" = "false" ]; then
ansible_bin_path="$HOME/.local/bin"
else
apt-get install -y python3-venv
python3 -m venv $ansible_venv_path
$ansible_venv_path/bin/pip3 install --upgrade pip
$ansible_venv_path/bin/pip3 install ansible=="$ansible_version"
fi
fi
echo '[Beginning upgrade]'
playbook_path="$ansible_conf_path/playbook.yml"
echo "[1/$total_steps] Retrieving currently installed version from $playbook_path"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment