Last active
September 22, 2017 13:33
-
-
Save aderixon/81130c7e4c56bedb87c4bb851a6d3c5b to your computer and use it in GitHub Desktop.
Ansible MySQL 5.7 Community Edition install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# before starting mysqld: | |
- name: check for MySQL pre systemd script | |
stat: | |
path: /usr/bin/mysqld_pre_systemd | |
register: pre_systemd | |
# Monkey-patch MySQL pre-start systemd script to prevent it setting | |
# a random root password | |
# Don't hate me, blame Oracle | |
- name: patch MySQL initialisation | |
replace: | |
dest: /usr/bin/mysqld_pre_systemd | |
regexp: ' --initialize ' | |
replace: ' --initialize-insecure ' | |
backup: yes | |
when: pre_systemd.stat.exists | |
# now start mysqld service (and set a known root password!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment