Move PrivateDevices before mysql password set

Move the PrivateDevices before we try to start the service the first time

Related-Bug: 1697531
Change-Id: I67ef7ba02ee652e9855b9cf4ba7a44a361844a83
(cherry picked from commit 588b9cead7)
This commit is contained in:
Marc Gariepy 2017-06-15 15:55:23 -04:00 committed by Jesse Pretorius (odyssey4me)
parent a8c14f4bc5
commit c6d3668965
2 changed files with 32 additions and 15 deletions

View File

@ -106,6 +106,38 @@
- galera_server-config
- galera-enable
# This glue to make the upgrade works. when testing the galera_server role we install version 10.0
# of mariadb and so the path doesn't exist, let's clean it up when we do upgrade testing the way
# we do for other roles.
# TODO: cleanup when we change upgrade test.
- name: Check if we are on systemd service
stat:
path: "/etc/systemd/system/mariadb.service.d/"
register: systemd_mysql_service
# See comments above 'galera_disable_privatedevices' in defaults/main.yml for
# links to relevant bugs and discussion.
- name: Remove PrivateDevices systemd options when in container
template:
src: without-privatedevices.conf.j2
dest: "/etc/systemd/system/mariadb.service.d/without-privatedevices.conf"
when:
- ansible_pkg_mgr == 'yum'
- systemd_mysql_service.stat.exists
notify:
- Reload the systemd daemon
- Restart mysql
tags:
- galera-config
# TODO: remove name argument when we upgrade to ansible 2.4
- name: Reload the systemd daemon
systemd:
daemon_reload: yes
name: mysql
when:
- systemd_mysql_service.stat.exists
# NOTE(cloudnull): This is an idempotent shell task is it will only run once
# provided the "/etc/mysql/rhel_configured" exists. This tasks automates the
# MySQL secure setup which is done automatically in Ubuntu deployments.

View File

@ -112,21 +112,6 @@
tags:
- galera-config
# See comments above 'galera_disable_privatedevices' in defaults/main.yml for
# links to relevant bugs and discussion.
- name: Remove PrivateDevices systemd options when in container
template:
src: without-privatedevices.conf.j2
dest: "/etc/systemd/system/mariadb.service.d/without-privatedevices.conf"
when:
- ansible_pkg_mgr == 'yum'
- ansible_service_mgr == 'systemd'
notify:
- Reload the systemd daemon
- Restart mysql
tags:
- galera-config
- name: remove default mysql_safe_syslog
file:
path: "/etc/mysql/conf.d/mysqld_safe_syslog.cnf"