Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: delete anonymous MySQL server user for {{ ansible_nodename }}
- mysql_user: login_user=root
- login_password='{{ mysql_root }}'
- check_implicit_admin=yes
- user=""
- host={{ item }}
- state="absent"
- with_items:
- - ""
- - "{{ ansible_nodename }}"
- - localhost
- - name: Change root user password on first run
- mysql_user: login_user=root
- login_password="{{ mysql_root }}"
- check_implicit_admin=yes
- name=root
- password={{ mysql_root }}
- priv=*.*:ALL,GRANT
- host={{ item }}
- with_items:
- - "{{ ansible_nodename }}"
- - 127.0.0.1
- - ::1
- - localhost
- - name: remove the MySQL test database
- action: mysql_db login_user=root login_password="{{ mysql_root }}" db=test state=absent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement