SHARE
TWEET

Untitled

a guest Sep 22nd, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # before starting mysqld:
  2.  
  3. - name: check for MySQL pre systemd script
  4.   stat:
  5.     path: /usr/bin/mysqld_pre_systemd
  6.   register: pre_systemd
  7.  
  8. # Monkey-patch MySQL pre-start systemd script to prevent it setting
  9. # a random root password
  10. # Don't hate me, blame Oracle
  11. - name: patch MySQL initialisation
  12.   replace:
  13.     dest: /usr/bin/mysqld_pre_systemd
  14.     regexp: ' --initialize '
  15.     replace: ' --initialize-insecure '
  16.     backup: yes
  17.   when: pre_systemd.stat.exists
  18.  
  19. # now start mysqld service (and set a known root password!)
RAW Paste Data
Top