aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-02-07 18:43:16 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2014-02-07 18:43:16 +0100
commitc55ec516c48365e297ed3a878cd9e7640c69fafb (patch)
tree5b170bddbbf1389dfbdfdad7ae444af758d0227a
parent669c71ccaf16f79d9899059cdbead326c4b29902 (diff)
Variuos fixes and updates.
Change-Id: I75c78b462be132f55961df45720c726eb2689a31
-rw-r--r--ansible/roles/status/tasks/apache_conf.yml4
-rw-r--r--ansible/roles/status/tasks/clone_code.yml2
-rw-r--r--ansible/roles/status/tasks/install_roadmap.yml6
-rw-r--r--ansible/roles/status/tasks/main.yml1
-rw-r--r--ansible/roles/status/tasks/ssl-certificates.yml9
-rw-r--r--ansible/roles/status/tasks/wsgi.yml2
6 files changed, 17 insertions, 7 deletions
diff --git a/ansible/roles/status/tasks/apache_conf.yml b/ansible/roles/status/tasks/apache_conf.yml
index 1c9e797..edbba9a 100644
--- a/ansible/roles/status/tasks/apache_conf.yml
+++ b/ansible/roles/status/tasks/apache_conf.yml
@@ -1,11 +1,11 @@
- name: apache-website-conf
- template: src=apache_website.conf dest=/etc/apache2/sites-available/{{ install_dir }} owner=root group=root mode=0644
+ template: src=apache_website.conf dest=/etc/apache2/sites-available/{{ site_name }} owner=root group=root mode=0644
tags:
- apache-conf
notify: reload-apache
- name: apache-website-enable
- command: a2ensite {{ install_dir }}
+ command: a2ensite {{ site_name }} creates=/etc/apache2/sites-enabled/{{ site_name }}
notify: reload-apache
tags:
- apache-enable
diff --git a/ansible/roles/status/tasks/clone_code.yml b/ansible/roles/status/tasks/clone_code.yml
index c64cdc8..e2c911d 100644
--- a/ansible/roles/status/tasks/clone_code.yml
+++ b/ansible/roles/status/tasks/clone_code.yml
@@ -1,6 +1,6 @@
# Clone roadmap/status code and fix files and dirs permission.
- name: clone-roadmap
- git: name={{ roadmap_repo }} dest={{ install_base }}/{{ install_dir }}
+ git: name={{ roadmap_repo }} dest={{ install_base }}/{{ install_dir }} update=no
- name: fix-repo-owner
file: path={{ install_base}}/{{ install_dir }} recurse=yes owner={{ apache_user }} group={{ apache_user }}
diff --git a/ansible/roles/status/tasks/install_roadmap.yml b/ansible/roles/status/tasks/install_roadmap.yml
index d998683..39a5e2c 100644
--- a/ansible/roles/status/tasks/install_roadmap.yml
+++ b/ansible/roles/status/tasks/install_roadmap.yml
@@ -1,12 +1,12 @@
# Install roadmap via virtualenv.
- name: roadmap-log-directory
- file: path=/var/log/roadmap state=directory owner={{ apache_user }} group={{apache_user }}
+ file: path=/var/log/roadmap state=directory owner={{ apache_user }} group={{ apache_user }}
- name: create-virtualenv
- command: virtualenv --system-site-packages {{ install_base }}/virtualenv/{{ install_dir }}
+ command: virtualenv --system-site-packages {{ install_base }}/virtualenv/{{ install_dir }} creates={{ install_base }}/virtualenv/{{ install_dir }}
- name: install-requirements
- pip: virtualenv={{ install_base }}/virtualenv/{{ install_dir }} requirements={{ install_base }}/{{ install_dir }}/requirements.txt
+ pip: virtualenv={{ install_base }}/virtualenv/{{ install_dir }} requirements={{ install_base }}/{{ install_dir }}/requirements.txt state=present
# Roadmap installation steps.
- name: roadmap-django-syncdb
diff --git a/ansible/roles/status/tasks/main.yml b/ansible/roles/status/tasks/main.yml
index 26bdebe..a5bf832 100644
--- a/ansible/roles/status/tasks/main.yml
+++ b/ansible/roles/status/tasks/main.yml
@@ -2,5 +2,6 @@
- include: local_settings.yml
- include: install_roadmap.yml
- include: wsgi.yml
+- include: ssl-certificates.yml
- include: apache_conf.yml
- include: cronjobs.yml
diff --git a/ansible/roles/status/tasks/ssl-certificates.yml b/ansible/roles/status/tasks/ssl-certificates.yml
new file mode 100644
index 0000000..d84591f
--- /dev/null
+++ b/ansible/roles/status/tasks/ssl-certificates.yml
@@ -0,0 +1,9 @@
+# Copy SSL certificates in the default location. Location is hardcoded also in
+# the apache config template. The list of certificates to copy must be defined
+# in the local secrets.yml file. Refer to the README.
+
+- name: apache-ssl-certs
+ copy: src={{ item }} dest=/etc/ssl/certs/ owner=root group=root mode=0644
+ with_items: openssl_certs
+ tags:
+ - ssl-certs
diff --git a/ansible/roles/status/tasks/wsgi.yml b/ansible/roles/status/tasks/wsgi.yml
index dd52c0d..f49856e 100644
--- a/ansible/roles/status/tasks/wsgi.yml
+++ b/ansible/roles/status/tasks/wsgi.yml
@@ -1,6 +1,6 @@
# Install the correct WSGI script.
- name: install-wsgi
- template: src=roadmap.wsgi dest={{ install_base }}/{{ install_dir }}/{{ install_dir }}.wsgi owner={{ apache_user }} group={{ apache_user }} mode=0744
+ template: src=roadmap.wsgi dest={{ install_base }}/{{ install_dir }}/{{ wsgi_name }} owner={{ apache_user }} group={{ apache_user }} mode=0744
tags:
- wsgi
notify: restart-apache