Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
- - name: Set root user password
- mysql_user: name=root
- host="{{ item }}"
- password="{{ mysql_root_password }}"
- check_implicit_admin=yes
- login_user="{{ mysql_user }}"
- login_password="{{ mysql_root_password }}"
- state=present
- - name: Set root user password
- mysql_user: name=root
- host="{{ item }}"
- password="{{ mysql_root_password }}"
- check_implicit_admin=yes
- login_user="{{ mysql_user }}"
- login_password="{{ mysql_old_root_password }}"
- state=present
- mysql_old_root_password: productionpw
- mysql_root_password: newproductionpw
- - name: Set root user password
- # If .my.cnf already exists, this will cause an mysql-root-password update.
- mysql_user:
- name: root
- password: "{{ mysql_root_password}}"
- check_implicit_admin: true
- - name: Create .my.cnf
- template:
- src: "client.my.cnf.j2"
- dest: "/root/.my.cnf"
- owner: root
- group: root
- mode: 0600
- [client]
- user=root
- password={{ mysql_root_password }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement