Advertisement
Guest User

Untitled

a guest
May 12th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. - name: delete anonymous MySQL server user for {{ ansible_nodename }}
  2. mysql_user: login_user=root
  3. login_password='{{ mysql_root }}'
  4. check_implicit_admin=yes
  5. user=""
  6. host={{ item }}
  7. state="absent"
  8. with_items:
  9. - ""
  10. - "{{ ansible_nodename }}"
  11. - localhost
  12.  
  13. - name: Change root user password on first run
  14. mysql_user: login_user=root
  15. login_password="{{ mysql_root }}"
  16. check_implicit_admin=yes
  17. name=root
  18. password={{ mysql_root }}
  19. priv=*.*:ALL,GRANT
  20. host={{ item }}
  21. with_items:
  22. - "{{ ansible_nodename }}"
  23. - 127.0.0.1
  24. - ::1
  25. - localhost
  26.  
  27. - name: remove the MySQL test database
  28. action: mysql_db login_user=root login_password="{{ mysql_root }}" db=test state=absent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement