deboco improvement: added extra check to detect debops env failure

- note: work done on 30/01/2026

work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=4312]
This commit is contained in:
Guillaume Raffy 2026-02-17 12:38:11 +01:00
parent 366b0a327a
commit f112cc3a2e
1 changed files with 13 additions and 0 deletions

View File

@ -188,6 +188,19 @@ controller__check_integrity()
# ANSIBLE_CONFIG=~/debops/controllers/alambix/ansible.debops.git/ansible.cfg # ANSIBLE_CONFIG=~/debops/controllers/alambix/ansible.debops.git/ansible.cfg
pushd "$local_repos_path" pushd "$local_repos_path"
source "$virtual_env_path/bin/activate" source "$virtual_env_path/bin/activate"
debops env
if [ $? != 0 ]
then
# Error: No inventory specified in the "ansible.cfg" configuration file. You
# might want to run "debops project refresh" command to ensure that it's
# included in the generated file. If this is a legacy project, check if the
# "inventory" option is present in the ".debops.cfg" file. The default is:
# [ansible defaults]
# inventory = ansible/inventory
log 'error' "'debops env' failed"
return "$RETURNCODE_ERROR"
fi
eval "$(debops env)" eval "$(debops env)"
local home_dir=$(echo ~) local home_dir=$(echo ~)
local var_name='' local var_name=''