--- # Copyright 2014, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Drop apache2 ports file template: src: "horizon-ports.conf" dest: "/etc/apache2/ports.conf" owner: "root" group: "root" - name: Drop Horizon config template: src: "openstack-dashboard.conf" dest: "/etc/apache2/sites-available" owner: "{{ system_user }}" group: "{{ system_group }}" - name: Enable Horizon Site file: src: "/etc/apache2/sites-available/{{ item.name }}" dest: "/etc/apache2/sites-enabled/{{ item.name }}" state: "{{ item.state }}" with_items: - { state: link, name: openstack-dashboard.conf } - { state: absent, name: 000-default.conf } - name: Enable apache2 modules apache2_module: state: "{{ item.state }}" name: "{{ item.name }}" with_items: - { state: present, name: wsgi } - { state: present, name: ssl } - { state: absent, name: mpm_event } - { state: present, name: mpm_worker } - { state: present, name: rewrite } - name: Ensure Apache ServerName lineinfile: dest: "/etc/apache2/apache2.conf" line: "ServerName {{ container_name }}" - name: Ensure Apache is running service: name: "apache2" state: "restarted"