summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2016-06-07 11:53:04 +0100
committerBen Copeland <ben.copeland@linaro.org>2016-06-08 07:16:36 +0000
commit5d06696dd104df23efcd1b5932f57d9956798a57 (patch)
treea65832128f665dc9204a08a97844d57d37119f3d
parent03e91cb89f275aecad4aea2a2f57793bd2f07459 (diff)
downloadansible-playbooks-5d06696dd104df23efcd1b5932f57d9956798a57.tar.gz
releases-geo: set the correct geo hostname
We should set the proper hostname when using releases in geo-location. This update allows for host_vars to be used to set a geo FQDN, if none set defaults to host_name. Change-Id: I23db5dbeb34841b706d2b52993b8f9f2b5411a3a Reviewed-on: https://review.linaro.org/12502 Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
-rw-r--r--files/publishing/llp-apache.conf6
-rw-r--r--host_vars/releases-ap.linaro.org1
-rw-r--r--host_vars/releases-us.linaro.org1
-rw-r--r--roles/apache-site/defaults/main.yml2
4 files changed, 8 insertions, 2 deletions
diff --git a/files/publishing/llp-apache.conf b/files/publishing/llp-apache.conf
index c6d6d46..997bf35 100644
--- a/files/publishing/llp-apache.conf
+++ b/files/publishing/llp-apache.conf
@@ -1,7 +1,8 @@
<VirtualHost *:80>
Alias /static/ {{django_app_root}}/static/
DocumentRoot /srv/{{ hostname }}/www
- ServerName {{ hostname }}
+ ServerName {{ publishing_host }}
+ ServerAlias {{ hostname }}
ServerAdmin webmaster@linaro.org
CustomLog /var/log/apache2/{{ hostname }}-access.log combined env=!dontlog
ErrorLog /var/log/apache2/{{ hostname }}-error.log
@@ -58,7 +59,8 @@
<VirtualHost *:443>
Alias /static/ {{django_app_root}}/static/
DocumentRoot /srv/{{ hostname }}/www
- ServerName {{ hostname }}
+ ServerName {{ publishing_host }}
+ ServerAlias {{ hostname }}
ServerAdmin webmaster@linaro.org
CustomLog /var/log/apache2/{{ hostname }}-access.log combined env=!dontlog
ErrorLog /var/log/apache2/{{ hostname }}-error.log
diff --git a/host_vars/releases-ap.linaro.org b/host_vars/releases-ap.linaro.org
index 2d153c7..3dc5ff2 100644
--- a/host_vars/releases-ap.linaro.org
+++ b/host_vars/releases-ap.linaro.org
@@ -1,4 +1,5 @@
sitename: Linaro Releases
secrets_file: releases-ap-secrets.py
+publishing_host: releases.linaro.org
process_report: true
diff --git a/host_vars/releases-us.linaro.org b/host_vars/releases-us.linaro.org
index ad49d6b..8b1bf57 100644
--- a/host_vars/releases-us.linaro.org
+++ b/host_vars/releases-us.linaro.org
@@ -1,5 +1,6 @@
sitename: Linaro Releases
secrets_file: releases-us-secrets.py
+publishing_host: releases.linaro.org
process_report: true
s3_sanity: true
diff --git a/roles/apache-site/defaults/main.yml b/roles/apache-site/defaults/main.yml
new file mode 100644
index 0000000..083989b
--- /dev/null
+++ b/roles/apache-site/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+publishing_host: "{{ hostname }}"