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

uwsgi: uncoment stuff

parent 8677a798
No related branches found
No related tags found
1 merge request!3Unify uwsgi python
--- --
- debug:
msg: "app = {{ app }}"
- include_vars: "{{ item }}" #
#- debug:
# msg: "{{ app }}"
#
#
- import_vars: "{{ item }}"
with_items: with_items:
- "../vars/{{ app.app }}.yml" - "../vars/{{ app.app }}.yml"
- "{{ inventory_dir }}/vars/{{ app.app_vars }}" - "{{ inventory_dir }}/vars/{{ app.app_vars }}"
...@@ -11,204 +15,204 @@ ...@@ -11,204 +15,204 @@
- "{{ app.app }}" - "{{ app.app }}"
- "{{ app.instance }}" - "{{ app.instance }}"
# #
#- name: ensure we have python 2 #- name: ensure #we have python 2
# apt: # apt:
# name: "{{ item }}" # name: "{{ i#tem }}"
# state: installed # state: inst#alled
# with_items: # with_items:
# - python # - python
# - python-dev # - python-de#v
# - python-virtualenv # - python-vi#rtualenv
# - uwsgi-plugin-python # - uwsgi-plu#gin-python
# - virtualenv # - virtualen#v
# when: uwsgi_python == 2 # when: uwsgi_p#ython == 2
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have python 3 #- name: ensure #we have python 3
# apt: # apt:
# name: "{{ item }}" # name: "{{ i#tem }}"
# state: installed # state: inst#alled
# with_items: # with_items:
# - python3 # - python3
# - python3-dev # - python3-d#ev
# - python3-virtualenv # - python3-v#irtualenv
# - uwsgi-plugin-python3 # - uwsgi-plu#gin-python3
# - virtualenv # - virtualen#v
# when: uwsgi_python == 3 # when: uwsgi_p#ython == 3
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- include: sqlite.yml #- include: sqli#te.yml
# when: app.db == "sqlite" # when: app.db #== "sqlite"
# #
#- include: mysql.yml #- include: mysq#l.yml
# when: app.db == "mysql" # when: app.db #== "mysql"
# #
#- include: postgres.yml #- include: post#gres.yml
# when: app.db == "postgres" # when: app.db #== "postgres"
# #
#- name: ensure we have a group #- name: ensure #we have a group
# group: # group:
# name: "{{ app.group }}" # name: "{{ a#pp.group }}"
# system: yes # system: yes#
# state: present # state: pres#ent
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have a user #- name: ensure #we have a user
# user: # user:
# name: "{{ app.user }}" # name: "{{ a#pp.user }}"
# group: "{{ app.group }}" # group: "{{ #app.group }}"
# system: yes # system: yes#
# home: "{{ app.home }}" # home: "{{ a#pp.home }}"
# shell: /usr/bin/nologin # shell: /usr#/bin/nologin
# createhome: no # createhome:# no
# state: present # state: pres#ent
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure a temporary directory exists #- name: ensure #a temporary directory exists
# template: # template:
# src: tmpfiles.conf.j2 # src: tmpfil#es.conf.j2
# dest: "/etc/tmpfiles.d/10-{{ app.name }}.conf" # dest: "/etc#/tmpfiles.d/10-{{ app.name }}.conf"
# owner: root # owner: root#
# group: root # group: root#
# mode: 0644 # mode: 0644
# notify: # notify:
# - create tmpfiles # - create tm#pfiles
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have our uwsgi config file #- name: ensure #we have our uwsgi config file
# template: # template:
# src: uwsgi.ini.j2 # src: uwsgi.#ini.j2
# dest: "/etc/uwsgi/apps/{{ app.instance }}.ini" # dest: "/etc#/uwsgi/apps/{{ app.instance }}.ini"
# owner: root # owner: root#
# group: root # group: root#
# mode: 0644 # mode: 0644
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure additional software is installed #- name: ensure #additional software is installed
# apt: name={{ item }} state=present # apt: name="{{# item }}" state=present
# with_items: "{{ app.additional_software }}" # with_items: "#{{ app.additional_software }}"
# when: # when:
# - app.additional_software is defined # - app.addit#ional_software is defined
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure the deploy key is available #- name: ensure #the deploy key is available
# copy: # copy:
# src: "{{ app.deploy_key }}" # src: "{{ ap#p.deploy_key }}"
# dest: "/root/.ssh/{{ app.name }}" # dest: "/roo#t/.ssh/{{ app.app }}"
# owner: root # owner: root#
# group: root # group: root#
# mode: 0600 # mode: 0600
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
## https://github.com/ansible/ansible/issues/27699 ## https://githu#b.com/ansible/ansible/issues/27699
#- name: ensure git module is able to clone #- name: ensure #git module is able to clone
# command: mount -o remount,exec /tmp # command: moun#t -o remount,exec /tmp
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have the program #- name: ensure #we have the program
# git: # git:
# repo: "{{ app.git_url }}" # repo: "{{ a#pp.git_url }}"
# dest: "{{ app.path }}" # dest: "{{ a#pp.path }}"
# key_file: "/root/.ssh/{{ app.name }}" # key_file: "#/root/.ssh/{{ app.app }}"
# version: "{{ app.git_version }}" # version: "{#{ app.git_version }}"
# notify: # notify:
# - restart uwsgi instance # - restart u#wsgi instance
# register: git # register: git#
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure git module is not able to clone anymore #- name: ensure #git module is not able to clone anymore
# command: mount -o remount,noexec /tmp # command: moun#t -o remount,noexec /tmp
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have a virtualenv #- name: ensure #we have a virtualenv
# pip: # pip:
# requirements: "{{ app.path }}/requirements.txt" # requirement#s: "{{ app.path }}/requirements.txt"
# virtualenv: "{{ app.venv }}" # virtualenv:# "{{ app.venv }}"
# virtualenv_python: "{{ app.python_version }}" # virtualenv_#python: "{{ app.python_version }}"
# notify: # notify:
# - restart uwsgi instance # - restart u#wsgi instance
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have our config #- name: ensure #we have our config
# template: # template:
# src: "apps/{{ app.name }}.j2" # src: "apps/#{{ app.app }}.j2"
# dest: "{{ app.path }}/{{ app.config_file }}" # dest: "{{ a#pp.path }}/{{ app.config_file }}"
# owner: "{{ app.user }}" # owner: "{{ #app.user }}"
# group: "{{ app.group }}" # group: "{{ #app.group }}"
# mode: 0640 # mode: 0640
# notify: # notify:
# - restart uwsgi instance # - restart u#wsgi instance
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- name: ensure we have our secret config #- name: ensure #we have our secret config
# template: # template:
# src: secret_config.py.j2 # src: secret#_config.py.j2
# dest: "{{ app.path }}/secret_config.py" # dest: "{{ a#pp.path }}/secret_config.py"
# owner: "{{ app.user }}" # owner: "{{ #app.user }}"
# group: "{{ app.group }}" # group: "{{ #app.group }}"
# mode: 0600 # mode: 0600
# force: no # force: no
# notify: # notify:
# - restart uwsgi instance # - restart u#wsgi instance
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# when: # when:
# - secret_config is defined # - secret_co#nfig is defined
# - secret_config == True # - secret_co#nfig == True
# #
# #
#- include_tasks: "{{ item }}" #- include_tasks#: "{{ item }}"
# with_first_found: # with_first_fo#und:
# - files: # - files:
# - "apps/{{ app.name }}.yml" # - "apps#/{{ app.app }}.yml"
# skip: true # skip: tru#e
# tags: # tags:
# - uwsgi-app # - uwsgi-app#
# - "{{ app.name }}" # - "{{ app.a#pp }}"
# - "{{ app.instance }}" # - "{{ app.i#nstance }}"
# #
#- meta: flush_handlers #- meta: flush_h#andlers
# #
#- name: ensure the service is enabled #- name: ensure the service is enabled
# service: # service:
...@@ -217,7 +221,7 @@ ...@@ -217,7 +221,7 @@
# state: started # state: started
# tags: # tags:
# - uwsgi-app # - uwsgi-app
# - "{{ app.name }}" # - "{{ app.app }}"
# - "{{ app.instance }}" # - "{{ app.instance }}"
# #
# #
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment