Don't use template delimiters in conditions

This commit is contained in:
jo 2022-12-16 14:55:06 +01:00
parent d4e151468b
commit 5084b252f1
No known key found for this signature in database
GPG Key ID: B2FEC9B22722B984
2 changed files with 6 additions and 6 deletions

View File

@ -77,14 +77,14 @@
ansible.builtin.shell: | ansible.builtin.shell: |
mariadb -Bse 'STATUS' | grep "^Server version:" mariadb -Bse 'STATUS' | grep "^Server version:"
register: version register: version
when: "{{ lookup('env', 'MARIADB_VERSION') }}" when: lookup('env', 'MARIADB_VERSION')
- name: Check MariaDB version - name: Check MariaDB version
ansible.builtin.assert: ansible.builtin.assert:
that: that:
- "'{{ lookup('env', 'MARIADB_VERSION') }}' in version.stdout" - lookup('env', 'MARIADB_VERSION') in version.stdout
msg: "{{ version.stdout }}" msg: "{{ version.stdout }}"
when: "{{ lookup('env', 'MARIADB_VERSION') }}" when: lookup('env', 'MARIADB_VERSION')
- name: Check that Innodb engine is enabled (and default) - name: Check that Innodb engine is enabled (and default)
ansible.builtin.shell: | ansible.builtin.shell: |

View File

@ -77,14 +77,14 @@
ansible.builtin.shell: | ansible.builtin.shell: |
sudo mariadb -Bse 'STATUS' | grep "^Server version:" sudo mariadb -Bse 'STATUS' | grep "^Server version:"
register: version register: version
when: "{{ lookup('env', 'MARIADB_VERSION') }}" when: lookup('env', 'MARIADB_VERSION')
- name: Check MariaDB version - name: Check MariaDB version
ansible.builtin.assert: ansible.builtin.assert:
that: that:
- "'{{ lookup('env', 'MARIADB_VERSION') }}' in version.stdout" - lookup('env', 'MARIADB_VERSION') in version.stdout
msg: "{{ version.stdout }}" msg: "{{ version.stdout }}"
when: "{{ lookup('env', 'MARIADB_VERSION') }}" when: lookup('env', 'MARIADB_VERSION')
- name: Check that Innodb engine is enabled (and default) - name: Check that Innodb engine is enabled (and default)
ansible.builtin.shell: | ansible.builtin.shell: |