File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 5
5
# Setup/install tasks.
6
6
- include : setup-RedHat.yml
7
7
when : ansible_os_family == 'RedHat'
8
+ static : no
8
9
9
10
- include : setup-Debian.yml
10
11
when : ansible_os_family == 'Debian'
12
+ static : no
11
13
12
14
- name : Check if MySQL packages were installed.
13
15
set_fact :
Original file line number Diff line number Diff line change 23
23
shell : >
24
24
mysql -u root -NBe
25
25
'ALTER USER "{{ mysql_root_username }}"@"{{ item }}" IDENTIFIED WITH mysql_native_password BY "{{ mysql_root_password }}";'
26
- with_items : " {{ mysql_root_hosts.stdout_lines }}"
26
+ with_items : " {{ mysql_root_hosts.stdout_lines|default([]) }}"
27
27
when : ((mysql_install_packages | bool) or mysql_root_password_update) and ('5.7.' in mysql_cli_version.stdout)
28
28
29
29
# Set root password for MySQL < 5.7.x.
30
30
- name : Update MySQL root password for localhost root account (< 5.7.x).
31
31
shell : >
32
32
mysql -u root -NBe
33
33
'SET PASSWORD FOR "{{ mysql_root_username }}"@"{{ item }}" = PASSWORD("{{ mysql_root_password }}");'
34
- with_items : " {{ mysql_root_hosts.stdout_lines }}"
34
+ with_items : " {{ mysql_root_hosts.stdout_lines|default([]) }}"
35
35
when : ((mysql_install_packages | bool) or mysql_root_password_update) and ('5.7.' not in mysql_cli_version.stdout)
36
36
37
37
# Has to be after the root password assignment, for idempotency.
54
54
name : " "
55
55
host : " {{ item }}"
56
56
state : absent
57
- with_items : " {{ mysql_anonymous_hosts.stdout_lines }}"
57
+ with_items : " {{ mysql_anonymous_hosts.stdout_lines|default([]) }}"
58
58
59
59
- name : Remove MySQL test database.
60
60
mysql_db : " name='test' state=absent"
You can’t perform that action at this time.
0 commit comments