Issue #61: Ensure package change flag can be set by either Debian or RHEL.

pull/63/head
Stuart Williams 9 years ago
parent 9e5e424d6c
commit 5c26e06957
  1. 4
      tasks/main.yml
  2. 4
      tasks/secure-installation.yml
  3. 2
      tasks/setup-Debian.yml
  4. 2
      tasks/setup-RedHat.yml

@ -25,6 +25,10 @@
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'
- name: Check if MySQL packages were installed.
set_fact:
mysql_install_packages: "{{ rh_mysql_install_packages.changed or deb_mysql_install_packages.changed }}"
# Configure MySQL.
- include: configure.yml
- include: secure-installation.yml

@ -11,7 +11,7 @@
mysql -u root -NBe
'SET PASSWORD FOR "{{ mysql_root_username }}"@"{{ item }}" = PASSWORD("{{ mysql_root_password }}");'
with_items: mysql_root_hosts.stdout_lines
when: mysql_install_packages.changed or mysql_root_password_update
when: mysql_install_packages or mysql_root_password_update
# Has to be after the root password assignment, for idempotency.
- name: Copy .my.cnf file with root password credentials.
@ -35,4 +35,4 @@
with_items: mysql_anonymous_hosts.stdout_lines
- name: Remove MySQL test database.
mysql_db: "name='test' state=absent"
mysql_db: "name='test' state=absent"

@ -13,7 +13,7 @@
- name: Ensure MySQL packages are installed.
apt: "name={{ item }} state=installed"
with_items: mysql_packages
register: mysql_install_packages
register: deb_mysql_install_packages
# Because Ubuntu starts MySQL as part of the install process, we need to stop
# mysql and remove the logfiles in case the user set a custom log file size.

@ -5,4 +5,4 @@
- name: Ensure MySQL packages are installed.
yum: "name={{ item }} state=installed enablerepo={{ mysql_enablerepo }}"
with_items: mysql_packages
register: mysql_install_packages
register: rh_mysql_install_packages