Skip to content

Commit c7bd114

Browse files
committed
cope with not running mysql install tasks
1 parent f511ed2 commit c7bd114

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ansible/roles/mysql/tasks/configure.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
- name: Ensure mysql service state
1212
systemd:
1313
name: mysql
14-
state: "{{ mysql_state | default('restarted' if _mysql_unitfile.changed else 'started') }}"
14+
state: "{{ mysql_state | default('restarted' if _mysql_unitfile_changed else 'started') }}"
1515
enabled: "{{ mysql_systemd_service_enabled }}"
16-
daemon_reload: "{{ _mysql_unitfile.changed }}"
16+
daemon_reload: "{{ _mysql_unitfile_changed }}"
17+
vars:
18+
# cope with not having run install tasks
19+
_mysql_unitfile_changed: "{{ _mysql_unitfile.changed | default(false) }}"
1720

1821
- block:
1922
- name: Wait for mysql to initialise

0 commit comments

Comments
 (0)