Skip to content
Snippets Groups Projects
Commit 3a329e37 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

rum probiert

parent 639a88e0
No related branches found
No related tags found
1 merge request!3Unify uwsgi python
......@@ -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 }}"
......@@ -38,8 +38,11 @@
# enthält webapps eine mehr-instanz-app mehrfach? wenn ja, ist ../vars/item.yml doof
# wenn nein, wie realisieren wir das? bsp: schildergenerator mit schilder, boxes
- include_tasks: app.yml
vars:
app_instance: instance #"{{ item.instance }}"
app_name: name #"{{ item.app }}"
vars_files:
- "../vars/{{ item }}.yml"
- "{{ inventory_dir }}/vars/{{ item }}.yml"
- "../vars/{{ item.app }}.yml"
- "{{ inventory_dir }}/vars/{{ item.app_vars }}"
with_items: "{{ webapps }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment