‘funkwhale_version’ might be undefined for task “Set version to install”
The task “Set version to install” depends on a value set for the variable ‘funkwhale_version’:
- name: Set version to install
set_fact:
funkwhale_install_version: "{{ latest_version.get('content', funkwhale_version) | trim }}"
That variable, though, is not defined anywhere in the Ansible role.
So, when that condition is not met, the task “Check latest version” is not run, the ‘latest_version’ variable is undefined, and then the task “Set version to install” fails with an error:
$ ansible-playbook ansible/playbooks/site.ansible.yaml --check --diff
[…]
TASK [funkwhale : Check latest version] ******************************************************************************************************************************************************************************************************
skipping: [lindale.whitetree]
TASK [funkwhale : Set version to install] ****************************************************************************************************************************************************************************************************
fatal: [lindale.whitetree]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: 'funkwhale_version' is undefined. 'funkwhale_version' is undefined
The error appears to be in '/home/bignose/.ansible/roles/funkwhale/tasks/funkwhale.yml': line 9, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Set version to install
^ here