Verified Commit abf19d97 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/archweb: Deploy archweb on config changes too. Also, add a check to add...

roles/archweb: Deploy archweb on config changes too. Also, add a check to add ssl_require mode when connecting to remote hosts.
parent 1f113600
......@@ -48,6 +48,7 @@
- name: configure archweb
template: src=local_settings.py.j2 dest=/srv/http/archweb/local_settings.py owner=archweb group=archweb mode=0660
register: config
no_log: true
- name: create archweb db users
......@@ -150,7 +151,7 @@
become: true
become_user: archweb
file: path=/etc/uwsgi/vassals/archweb.ini state=touch
when: archweb_site and release.changed
when: archweb_site and (release.changed or config.changed)
- name: start and enable archweb memcached service
service: name="archweb-memcached.service" enabled=yes state=started
......
......@@ -22,7 +22,13 @@ DATABASES = {
'NAME' : '{{ archweb_db }}',
'USER' : '{{ archweb_db_site_user }}',
'PASSWORD': '{{ archweb_db_site_password }}',
'OPTIONS' : {'autocommit': True, 'application_name': 'archweb'},
'OPTIONS' : {
'autocommit': True,
'application_name': 'archweb',
{% if archweb_db_host != 'localhost' %}
'sslmode': 'require',
{% endif %}
}
},
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment