Ian Wienand 52ef51ca2a static: move site setup to a loop
Remove some repeated boilerplate by moving this into a loop.  No
functional change.

Change-Id: Id99e0c8cc6f663e054d69872b3da6eeb543cf3b5
2020-02-21 14:35:35 +11:00

69 lines
1.3 KiB
YAML

- name: Check AFS mounted
stat:
path: "/afs/openstack.org/project"
register: afs_root
- name: Sanity check AFS
assert:
that:
- afs_root.stat.exists
- name: Install apache2
apt:
name:
- apache2
- apache2-utils
state: present
- name: Rewrite module
apache2_module:
state: present
name: rewrite
- name: Substitute module
apache2_module:
state: present
name: substitute
- name: Cache module
apache2_module:
state: present
name: cache
- name: Cache disk module
apache2_module:
state: present
name: cache_disk
- name: Apache macro module
apache2_module:
state: present
name: macro
- name: Apache 2 ssl module
apache2_module:
state: present
name: ssl
- name: Apache 2 headers module
apache2_module:
state: present
name: headers
- name: Make sure packaged default site disabled
command: a2dissite 000-default.conf
args:
removes: /etc/apache2/sites-enabled/000-default.conf
- name: Enable sites
include_tasks: enable_site.yaml
loop:
- 00-static.opendev.org
- 50-governance.openstack.org
- 50-security.openstack.org
- 50-service-types.openstack.org
- 50-specs.openstack.org
- 50-releases.openstack.org
- 50-tarballs.opendev.org
- 50-tarballs.openstack.org