Ian Wienand d961b6d0d4 static: implement legacy redirect sites
This is a slight divergence from the accepted spec, where we were
going to implement these redirects via a new haproxy instance
(I961456d44a56f2334d3c94ef27e408f27409cd65).  We've decided it's
easier to keep them on static.opendev.org

The following sites are configured to redirect to whatever they are
redirecting to now on static.opendev.org:

 * devstack.org
 * www.devstack.org
 * ci.openstack.org
 * cinder.openstack.org
 * glance.openstack.org
 * horizon.openstack.org
 * keystone.openstack.org
 * nova.openstack.org
 * qa.openstack.org
 * summit.openstack.org
 * swift.openstack.org

As a bonus, they all get a https instance too, which they didn't have
before.

testinfra coverage should be total for this change.  I have created
the _acme-challange CNAME records for all the above.

Story: #2006598
Task: #38881

Change-Id: I3f1fc108e7bb1c9500ad4d1a51df13bb4ae00cb9
2020-02-27 16:25:39 +11:00

99 lines
2.0 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 zuul user
include_role:
name: zuul-user
vars:
zuul_user_enable_sudo: True
- 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-ci.openstack.org
- 50-cinder.openstack.org
- 50-developer.openstack.org
- 50-devstack.org
- 50-docs.opendev.org
- 50-docs.openstack.org
- 50-docs.starlingx.io
- 50-governance.openstack.org
- 50-glance.openstack.org
- 50-horizon.openstack.org
- 50-keystone.openstack.org
- 50-nova.openstack.org
- 50-qa.openstack.org
- 50-security.openstack.org
- 50-service-types.openstack.org
- 50-specs.openstack.org
- 50-releases.openstack.org
- 50-summit.openstack.org
- 50-swift.openstack.org
- 50-tarballs.opendev.org
- 50-tarballs.openstack.org
- 50-zuul-ci.org
- name: Enable git sites
include_tasks: enable_git_site.yaml
loop:
- git.airshipit.org
- git.openstack.org
- git.starlingx.io
- git.zuul-ci.org
loop_control:
loop_var: hostname