Fix fact set using ternary filter
When the set_fact module is used with the ternary filter the evaluated condition must be surrounded in parentheses, otherwise the fact will always be set to False. While other uses of ternary within this role don't seem to be effected, update them also for consistency and readability. Change-Id: I4809ded8b6fe738f8fa700434739ee0b1f6d3af1
This commit is contained in:
parent
777641e056
commit
2f68deee89
@ -72,7 +72,7 @@
|
||||
apt_repository:
|
||||
repo: "{{ galera_percona_xtrabackup_repo.repo }}"
|
||||
filename: "{{ galera_percona_xtrabackup_repo.filename | default(omit) }}"
|
||||
state: "{{ use_percona_upstream | bool | ternary('present','absent') }}"
|
||||
state: "{{ (use_percona_upstream | bool) | ternary('present','absent') }}"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
@ -102,7 +102,7 @@
|
||||
name: "{{ item }}"
|
||||
state: "{{ galera_server_package_state }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: "{{ add_repos | changed | ternary('0', cache_timeout) }}"
|
||||
cache_valid_time: "{{ (add_repos | changed) | ternary('0', cache_timeout) }}"
|
||||
with_items:
|
||||
- "{{ galera_packages_list | selectattr('enabled') | rejectattr('local_pkg') | sum(attribute='packages', start=[]) }}"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
- name: Set fact for extra arguments in MySQL commands
|
||||
set_fact:
|
||||
mysql_extra_args: "{{ ansible_os_family == 'Debian' | ternary('--defaults-file=/etc/mysql/debian.cnf', '') }}"
|
||||
mysql_extra_args: "{{ (ansible_os_family == 'Debian') | ternary('--defaults-file=/etc/mysql/debian.cnf', '') }}"
|
||||
tags:
|
||||
- galera-cluster-state-check
|
||||
- galera-bootstrap
|
||||
|
Loading…
x
Reference in New Issue
Block a user