Fix Ansible 2.x deprecation warnings.

This commit is contained in:
Jeff Geerling 2016-02-28 23:37:00 -06:00
parent bb39bf5632
commit e393119ed8
6 changed files with 7 additions and 7 deletions

View file

@ -26,7 +26,7 @@
group: root
mode: 0644
force: "{{ item.force | default(False) }}"
with_items: mysql_config_include_files
with_items: "{{ mysql_config_include_files }}"
notify: restart mysql
- name: Create slow query log file (if configured).

View file

@ -5,4 +5,4 @@
collation: "{{ item.collation | default('utf8_general_ci') }}"
encoding: "{{ item.encoding | default('utf8') }}"
state: present
with_items: mysql_databases
with_items: "{{ mysql_databases }}"

View file

@ -16,7 +16,7 @@
shell: >
mysql -u root -NBe
'SET PASSWORD FOR "{{ mysql_root_username }}"@"{{ item }}" = PASSWORD("{{ mysql_root_password }}");'
with_items: mysql_root_hosts.stdout_lines
with_items: "{{ mysql_root_hosts.stdout_lines }}"
when: mysql_install_packages | bool or mysql_root_password_update
# Has to be after the root password assignment, for idempotency.
@ -38,7 +38,7 @@
name: ""
host: "{{ item }}"
state: absent
with_items: mysql_anonymous_hosts.stdout_lines
with_items: "{{ mysql_anonymous_hosts.stdout_lines }}"
- name: Remove MySQL test database.
mysql_db: "name='test' state=absent"

View file

@ -12,7 +12,7 @@
- name: Ensure MySQL packages are installed.
apt: "name={{ item }} state=installed"
with_items: mysql_packages
with_items: "{{ mysql_packages }}"
register: deb_mysql_install_packages
# Because Ubuntu starts MySQL as part of the install process, we need to stop

View file

@ -1,7 +1,7 @@
---
- name: Ensure MySQL packages are installed.
yum: "name={{ item }} state=installed enablerepo={{ mysql_enablerepo }}"
with_items: mysql_packages
with_items: "{{ mysql_packages }}"
register: rh_mysql_install_packages
- name: Ensure MySQL Python libraries are installed.

View file

@ -7,4 +7,4 @@
priv: "{{ item.priv | default('*.*:USAGE') }}"
state: present
append_privs: "{{ item.append_privs | default('no') }}"
with_items: mysql_users
with_items: "{{ mysql_users }}"