--- - name: Install apache2 apt: pkg: apache2 state: present become: true - name: a2enmod headers apache2_module: name: headers state: present become: true - name: a2enmod expires apache2_module: name: expires state: present become: true - name: a2enmod rewrite when: ssl_enabled apache2_module: name: rewrite state: present become: true - name: Enable mod_ssl when: ssl_enabled apache2_module: name: ssl state: present become: true - name: "Configure rails_projects" include_role: name: apache-rails - debug: msg="trigger apache restart" notify: apache restart changed_when: true - name: create server-status conf template: src: server_status.conf dest: /etc/apache2/conf-available/server_status.conf sudo: true - name: enable server-status conf file: src: /etc/apache2/conf-available/server_status.conf dest: /etc/apache2/conf-enabled/server_status.conf state: link sudo: true notify: apache restart