Guest User

Untitled

a guest
Oct 29th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. STATE:
  2. {%- set root_pass = salt['pillar.get']('admin_pass') %}
  3. {%- set root_pass_raw = salt['pillar.get']('admin_pass_raw') %}
  4. {%- set review_pass = salt['pillar.get']('review_pass') %}
  5.  
  6. root:
  7. mysql_user.present:
  8. - host: localhost
  9. {%- if root_pass is defined %}
  10. - password_hash: '{{ root_pass }}'
  11. {%- endif %}
  12. require:
  13. - pkg: mysql-python
  14. - pkg: mariadb-client
  15. - service.running: mariadb
  16.  
  17. root-pwd:
  18. mysql_user.present:
  19. - name: root
  20. - connection_host: localhost
  21. - connection_user: root
  22. - connection_pass: '{{ root_pass_raw }}'
  23. - connection_charset: utf8
  24. - use:
  25. - mysql_user: root
  26. - onfail:
  27. - mysql_user: root
  28.  
  29. review:
  30. mysql_user.present:
  31. - host: localhost
  32. {%- if review_pass is defined %}
  33. - password_hash: '{{ review_pass }}'
  34. {%- endif %}
  35. - connection_host: localhost
  36. - connection_user: root
  37. - connection_pass: root_pass_raw
  38. - connection_charset: utf8
  39. require:
  40. - pkg: mysql-python
  41. - pkg: mariadb-client
  42. - service.running: mariadb
  43.  
  44. ERRORS:
  45. ----------
  46. ID: root
  47. Function: mysql_user.present
  48. Result: False
  49. Comment: MySQL Error 1045: Access denied for user 'root'@'localhost' (using password: NO)
  50. Started: 15:37:26.827806
  51. Duration: 11.512 ms
  52. Changes:
  53. ----------
  54. ID: root-pwd
  55. Function: mysql_user.present
  56. Name: root
  57. Result: False
  58. Comment: Recursive requisite found
  59. Changes:
  60. ----------
  61. ID: review
  62. Function: mysql_user.present
  63. Result: False
  64. Comment: MySQL Error 1045: Access denied for user 'root'@'localhost' (using password: YES)
  65. Started: 15:37:26.840551
  66. Duration: 5.328 ms
  67. Changes:
  68. ----------
Add Comment
Please, Sign In to add comment