- name: Install required binary packages apt: name={{item}} state=installed with_items: - apache2 - libapache2-mod-php notify: restart apache - name: Create Apache vhost configuration for HTTPS (Horde and Adminer) template: src: apache/webmail.conf-443.j2 dest: /etc/apache2/sites-available/default-ssl.conf notify: restart apache - name: Enable Apache vhost for HTTPS command: /usr/sbin/a2ensite default-ssl creates=/etc/apache2/sites-enabled/default-ssl.conf notify: restart apache - name: Create Apache vhost configuration for HTTP (redirect to HTTPS) template: src: apache/webmail.conf-80.j2 dest: /etc/apache2/sites-available/000-default.conf notify: restart apache - name: Enable Apache SSL module command: /usr/sbin/a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.conf notify: restart apache - name: creating Horde MySQL database mysql_db: name: horde - name: creating MySQL user to access the Horde database mysql_user: name: horde password: "{{ispmail_mysql_horde_password}}" priv: horde.*:ALL - name: Generate random secret key for this Horde installation command: pwgen -s 20 register: horde_secret_key - name: Generate Horde config file template: src: horde/conf.php.j2 dest: /etc/horde/horde/conf.php - name: Create Horde database schema command: /usr/bin/horde-db-migrate # code: language=ansible insertSpaces=true tabSize=2