Skip to content
Snippets Groups Projects

Unify uwsgi python

Merged Hinrikus Wolf requested to merge unify_uwsgi_python into master
2 files
+ 26
17
Compare changes
  • Side-by-side
  • Inline

Files

+ 20
14
@@ -15,6 +15,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have python 3
apt:
@@ -30,18 +31,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- name: ensure we have the necessary libraries for ldap
apt:
name: "{{ item }}"
state: installed
with_items:
- libsasl2-dev
- libssl-dev
- libldap2-dev
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- include: sqlite.yml
when: app_db == "sqlite"
@@ -60,6 +50,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have a user
user:
@@ -73,6 +64,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure a temporary directory exists
template:
@@ -86,17 +78,19 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have our uwsgi config file
template:
src: uwsgi.ini.j2
dest: "/etc/uwsgi/apps/{{ app_name }}.ini"
dest: "/etc/uwsgi/apps/{{ app_instance }}.ini"
owner: root
group: root
mode: 0644
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure additional software is installed
apt: name={{ item }} state=present
@@ -106,6 +100,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure the deploy key is available
copy:
@@ -117,6 +112,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
# https://github.com/ansible/ansible/issues/27699
- name: ensure git module is able to clone
@@ -124,6 +120,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have the program
git:
@@ -137,12 +134,14 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure git module is not able to clone anymore
command: mount -o remount,noexec /tmp
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have a virtualenv
pip:
@@ -154,6 +153,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have our config
template:
@@ -167,6 +167,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- name: ensure we have our secret config
template:
@@ -181,6 +182,7 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
when:
- secret_config is defined
- secret_config == True
@@ -194,14 +196,18 @@
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
- meta: flush_handlers
- name: ensure the service is enabled
service:
name: "uwsgi@{{ app_name }}"
name: "uwsgi@{{ app_instance }}"
enabled: yes
state: started
tags:
- uwsgi-app
- "{{ app_name }}"
- "{{ app_instance }}"
Loading