openstack-ansible/rpc_deployment/roles/horizon_apache/tasks/main.yml
Kevin Carter e115b59965 Updates to remove uses of ">" that cause errors
This PR removes the use of the ">" sign commands where this was an issue.

Resolves: #192
2014-09-30 19:41:47 -05:00

59 lines
1.7 KiB
YAML

---
# 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"