Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. ---
  2. - name: MariaDB | Add repo file
  3. template: src=MariaDB.repo.j2 dest=/etc/yum.repos.d/MariaDB.repo owner=root group=root mode=0644
  4.  
  5. - name: MariaDB | Update cache repo
  6. yum:
  7. name: '*'
  8. state: latest
  9.  
  10. - name: MariaDB | Install
  11. yum: pkg={{ item }} state=latest
  12. with_items:
  13. - MariaDB-server
  14. - MariaDB-client
  15. - MySQL-python
  16. - MariaDB-connect-engine
  17. notify:
  18. - Start MariaDB
  19.  
  20. - name: MariaDB | Set root password
  21. mysql_user: name=root password={{ mysql_root_password }} host=localhost login_user=root login_password=""
  22.  
  23. - name: MariaDB | Copy Optimize Config
  24. template: src=my.cnf.j2 dest=/etc/my.cnf
  25. notify:
  26. - Restart MariaDB
  27.  
  28. handlers:
  29. - name: Start MariaDB
  30. systemd: name=mysql state=started enabled=yes
  31.  
  32. - name: Restart MariaDB
  33. systemd: name=mysql state=restarted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement