Advertisement
Guest User

Untitled

a guest
Jul 18th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. {"failed": true, "invocation": {"module_args":
  2. {"append_privs": false, "check_implicit_admin": true, "config_file": "/root/.my.cnf", "connect_timeout": 30, "encrypted": false, "host": "rothko", "host_all": false, "login_host": "localhost", "login_password": "", "login_port": 3306, "login_unix_socket": null, "login_user": "root", "name": "root", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "priv": "*.*:ALL,GRANT", "sql_log_bin": true, "ssl_ca": null, "ssl_cert": null, "ssl_key": null, "state": "present", "update_password": "always", "user": "root"}, "module_name": "mysql_user"},
  3. "item": "rothko",
  4. "msg": "unable to connect to database,
  5. check login_user and login_password are correct or /root/.my.cnf has the credentials.
  6. Exception message: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")"}
  7.  
  8. # - name: Create .my.cnf file with root password credentials
  9. # become: yes
  10. # template: src=".my.cnf.j2" dest="/root/.my.cnf" owner=root group=root mode=0600
  11. # - name: Restart mysql
  12. # service: name=mysqld state=restarted
  13. # - name: Change root user password on first run
  14. # mysql_user:
  15. # name=root
  16. # host=localhost
  17. # password={{ mysql_root_password }}
  18. # priv=*.*:ALL,GRANT
  19. - name: update mysql root password for all root accounts
  20. become: yes
  21. mysql_user:
  22. login_user=root
  23. login_password=''
  24. name=root
  25. host="{{ item }}"
  26. password="{{ mysql_root_password }}"
  27. check_implicit_admin=yes
  28. priv="*.*:ALL,GRANT"
  29. with_items:
  30. - "{{ ansible_hostname }}"
  31. - 127.0.0.1
  32. - ::1
  33. - localhost
  34. ignore_errors: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement