Advertisement
FamiHug

salt debconf

Feb 25th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. include:
  2. - debconf-utils
  3. - php
  4. {% if pillar['zabbix-sql'] == 'postgres' %}
  5. - postgres
  6. {% else %}
  7. - mysql
  8. {% endif %}
  9.  
  10. #zabbix-debconf:
  11. # debconf.set_file:
  12. # - source: salt://zabbix/zabbix.sel
  13.  
  14. zabbix-server:
  15. pkg:
  16. - installed
  17. - debconf: salt://zabbix/zabbix.sel
  18. {% if pillar['zabbix-sql'] == 'postgres' %}
  19. - name: zabbix-server-pgsql
  20. - require:
  21. - pkg: postgres
  22. {% else %}
  23. - name: zabbix-server-mysql
  24. - require:
  25. - pkg: mysql
  26. - pkg: debconf-utils
  27. {% endif %}
  28.  
  29. zabbix-frontend-php:
  30. pkg:
  31. - installed
  32. - debconf: salt://zabbix/zabbix.sel
  33. - require:
  34. - pkg: php
  35. - pkg: zabbix-server
  36. - pkg: debconf-utils
  37.  
  38. #TODO: for ubuntu > 12.04, zabbix2.0 require change php.ini
  39.  
  40. ================== zabbix.sel
  41. zabbix-server-pgsql zabbix-server-pgsql/pgsql/app-pass password rootpasswd!@#$
  42. zabbix-server-pgsql zabbix-server-pgsql/app-password-confirm password rootpasswd!@#$
  43. zabbix-server-pgsql zabbix-server-pgsql/password-confirm password rootpasswd!@#$
  44. zabbix-server-pgsql zabbix-server-pgsql/pgsql/admin-pass password rootpasswd!@#$
  45. zabbix-server-pgsql zabbix-server-pgsql/dbconfig-install boolean true
  46.  
  47. # TODO set passwd for mysql
  48.  
  49. # PostgreSQL application password for zabbix-frontend-php:
  50. zabbix-frontend-php zabbix-frontend-php/pgsql/admin-pass password rootpasswd!@#$
  51. zabbix-frontend-php zabbix-frontend-php/pgsql/app-pass password rootpasswd!@#$
  52.  
  53. zabbix-frontend-php zabbix-frontend-php/mysql/admin-pass password rootpasswd!@#$
  54. zabbix-frontend-php zabbix-frontend-php/mysql/app-pass password rootpasswd!@#$
  55.  
  56. zabbix-frontend-php zabbix-frontend-php/password-confirm password rootpasswd!@#$
  57. zabbix-frontend-php zabbix-frontend-php/database-type select pgsql
  58.  
  59. # NOTE: the password that server and frontend use must be the same, because frontend will change server password to its passwd
  60.  
  61. ====== output
  62.  
  63. root@ubun3:/etc/zabbix# debconf-get-selections | grep zabb | grep passw | grep -v mysql | grep server
  64. zabbix-server-pgsql zabbix-server-pgsql/app-password-confirm password rootpasswd!@#$
  65. zabbix-server-pgsql zabbix-server-pgsql/password-confirm password rootpasswd!@#$
  66. # PostgreSQL application password for zabbix-server-pgsql:
  67. zabbix-server-pgsql zabbix-server-pgsql/pgsql/app-pass password rootpasswd!@#$
  68. zabbix-server-pgsql zabbix-server-pgsql/pgsql/admin-pass password rootpasswd!@#$
  69. zabbix-server-pgsql zabbix-server-pgsql/passwords-do-not-match error
  70. zabbix-server-pgsql zabbix-server-pgsql/pgsql/no-empty-passwords error
  71. root@ubun3:/etc/zabbix#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement