Advertisement
Guest User

Untitled

a guest
Sep 24th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. ### =======================================
  2. ### /etc/salt/master:
  3.  
  4. mysql.host: 'salt-db'
  5. mysql.port: 3306
  6. mysql.user: 'salt-minion'
  7. mysql.pass: '******'
  8. mysql.db: 'salt'
  9. mysql.charset: 'utf8'
  10.  
  11.  
  12. ### =======================================
  13. ### my state file:
  14.  
  15. salt-client-test-file:
  16. file.touch:
  17. - name: /tmp/salt-test-file
  18.  
  19. salt-client-mysql-pkg:
  20. pkg.installed:
  21. - name: MySQL-python
  22.  
  23. query_id:
  24. mysql_query.run
  25. - database: salt
  26. - query: "INSERT INTO minions (minion,ip) VALUES (5,4);"
  27. - output: "/tmp/query_id.txt"
  28. - require:
  29. - pkg: salt-client-mysql-pkg
  30.  
  31.  
  32.  
  33.  
  34. ### =======================================
  35. ### ERROR output:
  36. ID: query_id
  37. Function: mysql_query.run
  38. Result: False
  39. Comment: MySQL Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  40. Started: 09:18:26.845827
  41. Duration: 19.803 ms
  42. Changes:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement