Closed
Description
Describe the bug
If we set mariadb_tls_files variables,these tasks will be executed :
setup_cluster | create TLS certificates directory
setup_cluster | copy TLS CA cert, server cert & private key
The when condition
on them are badly written and we receive a DEPRECATION WARNING
on them :
TASK [ansible-mariadb-galera-cluster : setup_cluster | create TLS certificates directory] ****************************************************************************************************
[DEPRECATION WARNING]: evaluating 'mariadb_tls_files' as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see
CONDITIONAL_BARE_VARS configuration toggle. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
TASK [ansible-mariadb-galera-cluster : setup_cluster | copy TLS CA cert, server cert & private key] ******************************************************************************************
[DEPRECATION WARNING]: evaluating 'mariadb_tls_files' as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see
CONDITIONAL_BARE_VARS configuration toggle. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
To Reproduce
Steps to reproduce the behaviour:
- Set the variable
mariadb_tls_files
like in my example :
mariadb_tls_files:
ca_cert:
name: "ca.pem"
content: "{{ lookup('file', 'files/STAR..ca') }}"
server_key:
name: "server-key.pem"
content: "{{ lookup('file', 'STAR.key') }}"
server_cert:
name: "server-cert.pem"
content: "{{ lookup('file', 'files/STAR.crt') }}"
- run the playbook
- See the warning
Expected behavior
A clear and concise description of what you expected to happen.
A better when condution on these tasks
Metadata
Metadata
Assignees
Labels
No labels