Skip to content
Snippets Groups Projects
Verified Commit 6f4dc82c authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/archweb: Add a forced_deploy variable to trigger a deploy even when...

roles/archweb: Add a forced_deploy variable to trigger a deploy even when nothing seems to have changed. Also restart memcached on deploys.
parent 1011223c
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ archweb_pgp_import: false
archweb_keyring: '/etc/pacman.d/gnupg/pubring.gpg'
archweb_reporead: false
archweb_services: false
archweb_forced_deploy: false
archweb_db: 'archweb'
archweb_db_host: 'localhost'
......
......@@ -2,3 +2,6 @@
- name: daemon reload
command: systemctl daemon-reload
- name: restart archweb memcached
service: name=archweb-memcached state=restarted
......@@ -75,7 +75,7 @@
django_manage: app_path="{{ archweb_dir }}" command=migrate virtualenv="{{ archweb_dir }}/env"
become: true
become_user: archweb
when: archweb_site and (db_created.changed or release.changed or virtualenv.changed)
when: archweb_site and (db_created.changed or release.changed or config.changed or virtualenv.changed or archweb_forced_deploy)
- name: db privileges for archweb users
postgresql_privs: database="{{ archweb_db }}" host="{{ archweb_db_host }}" login="{{ archweb_db_site_user }}" password="{{ archweb_db_site_password }}"
......@@ -104,7 +104,7 @@
django_manage: app_path="{{ archweb_dir }}" command=collectstatic virtualenv="{{ archweb_dir }}/env"
become: true
become_user: archweb
when: archweb_site and (db_created.changed or release.changed or config.changed or virtualenv.changed)
when: archweb_site and (db_created.changed or release.changed or config.changed or virtualenv.changed or archweb_forced_deploy)
- name: install reporead service
template: src="archweb-reporead.service.j2" dest="/etc/systemd/system/archweb-reporead.service" owner=root group=root mode=0644
......@@ -152,7 +152,8 @@
become: true
become_user: archweb
file: path=/etc/uwsgi/vassals/archweb.ini state=touch
when: archweb_site and (release.changed or config.changed or virtualenv.changed)
when: archweb_site and (release.changed or config.changed or virtualenv.changed or archweb_forced_deploy)
notify: restart archweb memcached
- name: start and enable archweb memcached service
service: name="archweb-memcached.service" enabled=yes state=started
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment