updated before removal

This commit is contained in:
aminnairi
2025-11-08 20:46:32 +01:00
parent 722f9db961
commit b194ae5efb
+9 -10
View File
@@ -76,15 +76,15 @@ fi
choosen_playbook_path=$1 choosen_playbook_path=$1
echo "Updating this repository before anything else..." # echo "Updating this repository before anything else..."
#
if [[ ! $(git pull --all --rebase --prune) ]] # if [[ ! $(git pull --all --rebase --prune) ]]
then # then
echo "Failed to update this repository" # echo "Failed to update this repository"
exit $ERROR_BECAUSE_GIT_PULL_FAILED # exit $ERROR_BECAUSE_GIT_PULL_FAILED
fi # fi
#
echo "Done updating this repository, now at the latest revision." # echo "Done updating this repository, now at the latest revision."
if [[ -z $choosen_playbook_path ]] if [[ -z $choosen_playbook_path ]]
then then
@@ -103,6 +103,5 @@ echo "Installing needed Ansible packages..." \
&& ANSIBLE_COLLECTIONS_PATH="$PWD/ansible/collections" ansible-galaxy collection install --collections-path ansible/collections --requirements-file ansible/galaxy/requirements.yml \ && ANSIBLE_COLLECTIONS_PATH="$PWD/ansible/collections" ansible-galaxy collection install --collections-path ansible/collections --requirements-file ansible/galaxy/requirements.yml \
&& echo "Done installing needed Ansible packages." \ && echo "Done installing needed Ansible packages." \
&& echo "Running choosen Ansible Playbook at $choosen_playbook_path..." \ && echo "Running choosen Ansible Playbook at $choosen_playbook_path..." \
&& yes O | yay \
&& ansible-playbook --inventory localhost, --ask-become-pass --module-path ansible/collections "$choosen_playbook_path" \ && ansible-playbook --inventory localhost, --ask-become-pass --module-path ansible/collections "$choosen_playbook_path" \
&& echo "Done running choosen Ansible Playbook. If this is your first installation, you might want to reboot in order for the settings to take effect." && echo "Done running choosen Ansible Playbook. If this is your first installation, you might want to reboot in order for the settings to take effect."