diff --git a/README.md b/README.md index d76888f..06b2459 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ where ## List of projects that use `foosible` -* [barsible](https://gitlab.epfl.ch/vpsi/barcode-catalyse.ops/-/blob/master/barsible) * [botsible](https://github.com/SaphireVert/gitlabot/blob/master/ansible/botsible) * [busible](https://github.com/epfl-si/businesscard.ops/blob/main/ansible/busible) * [cataiamsible](https://github.com/epfl-si/catalyse-iam.ops/blob/main/cataiamsible) @@ -48,7 +47,7 @@ where * [juicyble](https://github.com/epfl-dojo/juice-shop-ansible/blob/master/juicyble) * [k3sible](https://github.com/epfl-dojo/k3s-ansible/blob/master/k3sible) * [lhdsible](https://gitlab.epfl.ch/lhd/ops/-/blob/master/lhdsible) -* [nocsible](https://github.com/epfl-si/external-noc/blob/master/ansible/nocsible) +* [nocsible](https://github.com/epfl-si/external-noc/blob/master/nocsible) * [paysible](https://github.com/epfl-si/payonline.ops/blob/master/paysible) * [possible](https://gitlab.epfl.ch/si-idevfsd/people-dev/-/blob/master/ops/possible) * [presensible](https://github.com/epfl-fsd/presence_bot/blob/main/ansible/presensible) diff --git a/install.sh b/install.sh index 7b9115c..4e4bb81 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,9 @@ # # $SUITCASE_DIR (mandatory) Where to install the goods to # +# $SUITCASE_ANSIBLE_VERSION The precise version of Ansible to use. +# (mandatory) +# # $SUITCASE_PYTHON_VERSIONS A list of acceptable Python versions # to use. (A reasonable default value is # provided, which will try and make use of @@ -20,9 +23,6 @@ # Ignored if $SUITCASE_NO_EYAML is set. # A reasonable default value is provided. # -# $SUITCASE_ANSIBLE_VERSION The precise version of Ansible to use. -# (A reasonable default value is provided) -# # $SUITCASE_PIP_EXTRA Additional modules to install with `pip install` # (separated with spaces) # @@ -96,7 +96,6 @@ if [ -z "$SUITCASE_RUBY_VERSIONS" ]; then fi fi -: ${SUITCASE_ANSIBLE_VERSION:=3.4.0} : ${SUITCASE_EYAML_VERSION:=3.2.0} : ${SUITCASE_WITH_EYAML:=0} : ${SUITCASE_WITH_KEYBASE:=1} @@ -110,6 +109,7 @@ satisfied= unsatisfied= main () { + ensure_suitcase_ansible_version_set ensure_git [ -n "$SUITCASE_DIR" ] || fatal "SUITCASE_DIR is not set; don't know where to install" @@ -167,6 +167,35 @@ fatal () { exit 1 } +ensure_suitcase_ansible_version_set () { + # https://github.com/epfl-si/ansible.suitcase/issues/7 + if [ -z "$SUITCASE_ANSIBLE_VERSION" ]; then + case "/$0" in + */botsible) + # https://github.com/SaphireVert/gitlabot/issues/10 + SUITCASE_ANSIBLE_VERSION=3.4.0 ;; + */ictsible) + # https://github.com/ponsfrilus/ict-bot/issues/55 + SUITCASE_ANSIBLE_VERSION=3.4.0 ;; + */presensible) + # https://github.com/epfl-fsd/presence_bot/issues/30 + SUITCASE_ANSIBLE_VERSION=3.4.0 ;; + */tulsible) + # https://github.com/epfl-si/ops.tuleap/issues/1 + SUITCASE_ANSIBLE_VERSION=3.4.0 ;; + *) + fatal <<'PLEASE_SET_SUITCASE_ANSIBLE_VERSION' +Please set SUITCASE_ANSIBLE_VERSION upon invoking the suitcase, e.g. + +curl https://raw.githubusercontent.com/epfl-si/ansible.suitcase/master/install.sh | \ + SUITCASE_ANSIBLE_VERSION=3.4.0 sh -x + +PLEASE_SET_SUITCASE_ANSIBLE_VERSION + ;; + esac + fi +} + satisfied () { satisfied="$satisfied $1" if [ -n "$2" ]; then