Changeset - 9f9dbcb79909
[Not reviewed]
0 1 0
Branko Majic (branko) - 7 years ago 2016-11-21 22:33:18
branko@majic.rs
MAR-74: Restart the WSGI applications when related packages are getting updated (in order to run against latest version of a package).
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
roles/wsgi_website/tasks/main.yml
Show inline comments
 
@@ -28,6 +28,8 @@
 
- name: Install extra packages for website
 
  apt: name="{{ item }}" state=present
 
  with_items: "{{ packages }}"
 
  notify:
 
    - "Restart website {{ fqdn }}"
 

	
 
- name: Create directory for storing the Python virtual environment
 
  file: path="{{ home }}/virtualenv" state=directory
 
@@ -55,15 +57,21 @@
 
- name: Install futures package for use with Gunicorn thread workers
 
  become_user: "{{ admin }}"
 
  pip: name=futures version="{{ futures_version }}" state=present virtualenv="{{ home }}/virtualenv"
 
  notify:
 
    - "Restart website {{ fqdn }}"
 

	
 
- name: Install Gunicorn in Python virtual environment
 
  become_user: "{{ admin }}"
 
  pip: name=gunicorn version="{{ gunicorn_version }}" state=present virtualenv="{{ home }}/virtualenv"
 
  notify:
 
    - "Restart website {{ fqdn }}"
 

	
 
- name: Install additional packages in Python virtual environment
 
  become_user: "{{ admin }}"
 
  pip: name="{{ item }}" state=present virtualenv="{{ home }}/virtualenv"
 
  with_items: "{{ virtualenv_packages }}"
 
  notify:
 
    - "Restart website {{ fqdn }}"
 

	
 
- name: Deploy systemd socket configuration for website
 
  template: src="systemd_wsgi_website.socket.j2" dest="/etc/systemd/system/{{ fqdn }}.socket"
0 comments (0 inline, 0 general)