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.
 
 
 
 
 
 

45 rivejä
1.4 KiB

  1. - name: Install required binary packages
  2. apt: name={{item}} state=installed
  3. with_items:
  4. - apache2
  5. - libapache2-mod-php
  6. notify: restart apache
  7. - name: Create Apache vhost configuration for HTTPS (Horde and Adminer)
  8. template:
  9. src: apache/webmail.conf-443.j2
  10. dest: /etc/apache2/sites-available/default-ssl.conf
  11. notify: restart apache
  12. - name: Enable Apache vhost for HTTPS
  13. command: /usr/sbin/a2ensite default-ssl creates=/etc/apache2/sites-enabled/default-ssl.conf
  14. notify: restart apache
  15. - name: Create Apache vhost configuration for HTTP (redirect to HTTPS)
  16. template:
  17. src: apache/webmail.conf-80.j2
  18. dest: /etc/apache2/sites-available/000-default.conf
  19. notify: restart apache
  20. - name: Enable Apache SSL module
  21. command: /usr/sbin/a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.conf
  22. notify: restart apache
  23. - name: creating Horde MySQL database
  24. mysql_db:
  25. name: horde
  26. - name: creating MySQL user to access the Horde database
  27. mysql_user:
  28. name: horde
  29. password: "{{ispmail_mysql_horde_password}}"
  30. priv: horde.*:ALL
  31. - name: Generate random secret key for this Horde installation
  32. command: pwgen -s 20
  33. register: horde_secret_key
  34. - name: Generate Horde config file
  35. template:
  36. src: horde/conf.php.j2
  37. dest: /etc/horde/horde/conf.php
  38. - name: Create Horde database schema
  39. command: /usr/bin/horde-db-migrate
  40. # code: language=ansible insertSpaces=true tabSize=2