You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
пре 7 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ---
  2. - name: mysql database
  3. mysql_db:
  4. name: "{{postfixadmin_mysql_database}}"
  5. state: present
  6. delegate_to: "{{postfixadmin_mysql_host}}"
  7. - name: mysql user
  8. mysql_user:
  9. name: "{{postfixadmin_mysql_username}}"
  10. password: "{{postfixadmin_mysql_password}}"
  11. priv: "{{postfixadmin_mysql_database}}.*:ALL,GRANT"
  12. state: present
  13. delegate_to: "{{postfixadmin_mysql_host}}"
  14. - name: disable dbconfig
  15. debconf:
  16. name: postfixadmin
  17. question: postfixadmin/dbconfig-{{item}}
  18. answer: false
  19. vtype: boolean
  20. with_items:
  21. - install
  22. - reinstall
  23. - remove
  24. - upgrade
  25. - name: install packages
  26. apt:
  27. pkg: "{{item}}"
  28. install_recommends: no
  29. with_items:
  30. - postfixadmin
  31. - ca-certificates
  32. - name: dbconfig
  33. template:
  34. src: dbconfig.inc.php.j2
  35. dest: /etc/postfixadmin/dbconfig.inc.php
  36. - name: ensure template_c folder is writable by webserver
  37. file:
  38. path: /usr/share/postfixadmin/templates_c
  39. owner: www-data
  40. group: www-data
  41. state: directory
  42. # fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858005
  43. - name: fix postfixadmin setup bug (debian bug \#858005)
  44. get_url:
  45. url: https://raw.githubusercontent.com/postfixadmin/postfixadmin/ba94c3a75ea025762ad732b1a4c735251add8b0f/upgrade.php
  46. dest: /usr/share/postfixadmin/upgrade.php
  47. checksum: sha256:f2a87ded979be06250ab59f9cb4a26e70323b9f1aa962e5efe206b81ebb48d51
  48. - name: make postfixadmin-cli executable
  49. file:
  50. path: /usr/share/postfixadmin/scripts/postfixadmin-cli
  51. mode: "u=rwx,g=rx,o=rx"
  52. - name: symlink for postfixadmin-cli
  53. file:
  54. src: /usr/share/postfixadmin/scripts/postfixadmin-cli
  55. dest: /usr/local/bin/postfixadmin-cli
  56. state: link
  57. #- name: setup postfixadmin
  58. # get_url:
  59. # url: http://localhost/postfixadmin/setup.php
  60. # dest: /var/www/html/postfixadmin-setup-report.html
  61. - name: apache2 default vhost config
  62. template:
  63. src: apache2_default_vhost.conf.j2
  64. dest: /etc/apache2/sites-available/000-default.conf
  65. notify:
  66. - apache2 reload
  67. - name: apache2 default-ssl vhost config
  68. template:
  69. src: apache2_default-ssl_vhost.conf.j2
  70. dest: /etc/apache2/sites-available/default-ssl.conf
  71. notify:
  72. - apache2 reload
  73. - name: apache2 default-ssl vhost enable
  74. file:
  75. src: ../sites-available/default-ssl.conf
  76. dest: /etc/apache2/sites-enabled/default-ssl.conf
  77. state: link
  78. notify:
  79. - apache2 reload
  80. - name: apache2 ssl module enable
  81. apache2_module:
  82. name: ssl
  83. state: present
  84. notify:
  85. - apache2 reload
  86. - name: flush handlers
  87. meta: flush_handlers