Fix Ansible 2.x deprecation warnings.

pull/63/head
Jeff Geerling 8 years ago
parent bb39bf5632
commit e393119ed8
  1. 2
      tasks/configure.yml
  2. 2
      tasks/databases.yml
  3. 4
      tasks/secure-installation.yml
  4. 2
      tasks/setup-Debian.yml
  5. 2
      tasks/setup-RedHat.yml
  6. 2
      tasks/users.yml

@ -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).

@ -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 }}"

@ -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"

@ -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

@ -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.

@ -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 }}"