Skip to content

Commit 07e988c

Browse files
committed
Fixes for Ansible Lint rule 602.
1 parent 3b37ba3 commit 07e988c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tasks/configure.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
creates: "{{ mysql_log_error }}"
6767
warn: false
6868
when:
69-
- not mysql_log | bool
70-
- mysql_log_error | bool
69+
- mysql_log | default(true)
70+
- mysql_log_error | default(false)
7171
tags: ['skip_ansible_galaxy']
7272

7373
- name: Set ownership on error log file (if configured).
@@ -78,8 +78,8 @@
7878
group: "{{ mysql_log_file_group }}"
7979
mode: 0640
8080
when:
81-
- not mysql_log | bool
82-
- mysql_log_error | bool
81+
- mysql_log | default(true)
82+
- mysql_log_error | default(false)
8383
tags: ['skip_ansible_galaxy']
8484

8585
- name: Ensure MySQL is started and enabled on boot.

tasks/replication.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
when:
1010
- mysql_replication_role == 'master'
1111
- mysql_replication_user.name is defined
12-
- mysql_replication_master | bool
12+
- mysql_replication_master | default(false)
1313
tags: ['skip_ansible_galaxy']
1414

1515
- name: Check slave replication status.
@@ -21,7 +21,7 @@
2121
register: slave
2222
when:
2323
- mysql_replication_role == 'slave'
24-
- mysql_replication_master | bool
24+
- mysql_replication_master | default(false)
2525
tags: ['skip_ansible_galaxy']
2626

2727
- name: Check master replication status.
@@ -31,7 +31,7 @@
3131
when:
3232
- (slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave is failed)
3333
- mysql_replication_role == 'slave'
34-
- mysql_replication_master | bool
34+
- mysql_replication_master | default(false)
3535
tags: ['skip_ansible_galaxy']
3636

3737
- name: Configure replication on the slave.
@@ -47,12 +47,12 @@
4747
- (slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave is failed)
4848
- mysql_replication_role == 'slave'
4949
- mysql_replication_user.name is defined
50-
- mysql_replication_master | bool
50+
- mysql_replication_master | default(false)
5151

5252
- name: Start replication.
5353
mysql_replication: mode=startslave
5454
when:
5555
- (slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave is failed)
5656
- mysql_replication_role == 'slave'
57-
- mysql_replication_master | bool
57+
- mysql_replication_master | default(false)
5858
tags: ['skip_ansible_galaxy']

0 commit comments

Comments
 (0)