3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2025-12-28 19:50:25 +00:00

Stop using deprecated vars variable in all other custom roles

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4776

Supersedes https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4777
This commit is contained in:
Slavi Pantaleev
2025-12-02 21:31:50 +02:00
parent f8f7406c51
commit 325b22a302
16 changed files with 22 additions and 22 deletions

View File

@@ -18,14 +18,14 @@
- {'name': 'matrix_bot_mjolnir_raw_homeserver_url', when: true}
- {'name': 'matrix_bot_mjolnir_pantalaimon_username', when: "{{ matrix_bot_mjolnir_pantalaimon_use }}"}
- {'name': 'matrix_bot_mjolnir_pantalaimon_password', when: "{{ matrix_bot_mjolnir_pantalaimon_use }}"}
when: "item.when | bool and (vars[item.name] == '' or vars[item.name] is none)"
when: "item.when | bool and (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
- name: Fail if inappropriate variables are defined
ansible.builtin.fail:
msg: "The `{{ item.name }}` variable must be undefined or have a null value."
with_items:
- {'name': 'matrix_bot_mjolnir_access_token', when: "{{ matrix_bot_mjolnir_pantalaimon_use }}"}
when: "item.when | bool and not (vars[item.name] == '' or vars[item.name] is none)"
when: "item.when | bool and not (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
- name: (Deprecation) Catch and report renamed Mjolnir settings
ansible.builtin.fail: