Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webservices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
webservices
Commits
2658a652
Commit
2658a652
authored
7 years ago
by
Hinrikus Wolf
Browse files
Options
Downloads
Patches
Plain Diff
uwsgi: uncoment stuff
parent
8677a798
No related branches found
No related tags found
1 merge request
!3
Unify uwsgi python
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
uwsgi-python/tasks/app.yml
+219
-215
219 additions, 215 deletions
uwsgi-python/tasks/app.yml
with
219 additions
and
215 deletions
uwsgi-python/tasks/app.yml
+
219
−
215
View file @
2658a652
---
-
debug
:
msg
:
"
app
=
{{
app
}}"
--
-
include_vars
:
"
{{
item
}}"
#
#- debug:
# msg: "{{ app }}"
#
#
-
import_vars
:
"
{{
item
}}"
with_items
:
-
"
../vars/{{
app.app
}}.yml"
-
"
{{
inventory_dir
}}/vars/{{
app.app_vars
}}"
...
...
@@ -11,204 +15,204 @@
-
"
{{
app.app
}}"
-
"
{{
app.instance
}}"
#
#- name: ensure we have python 2
#- name: ensure
#
we have python 2
# apt:
# name: "{{ item }}"
# state: installed
# name: "{{ i
#
tem }}"
# state: inst
#
alled
# with_items:
# - python
# - python-dev
# - python-virtualenv
# - uwsgi-plugin-python
# - virtualenv
# when: uwsgi_python == 2
# - python-de
#
v
# - python-vi
#
rtualenv
# - uwsgi-plu
#
gin-python
# - virtualen
#
v
# when: uwsgi_p
#
ython == 2
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have python 3
#- name: ensure
#
we have python 3
# apt:
# name: "{{ item }}"
# state: installed
# name: "{{ i
#
tem }}"
# state: inst
#
alled
# with_items:
# - python3
# - python3-dev
# - python3-virtualenv
# - uwsgi-plugin-python3
# - virtualenv
# when: uwsgi_python == 3
# - python3-d
#
ev
# - python3-v
#
irtualenv
# - uwsgi-plu
#
gin-python3
# - virtualen
#
v
# when: uwsgi_p
#
ython == 3
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- include: sqlite.yml
# when: app.db == "sqlite"
#- include: sqli
#
te.yml
# when: app.db
#
== "sqlite"
#
#- include: mysql.yml
# when: app.db == "mysql"
#- include: mysq
#
l.yml
# when: app.db
#
== "mysql"
#
#- include: postgres.yml
# when: app.db == "postgres"
#- include: post
#
gres.yml
# when: app.db
#
== "postgres"
#
#- name: ensure we have a group
#- name: ensure
#
we have a group
# group:
# name: "{{ app.group }}"
# system: yes
# state: present
# name: "{{ a
#
pp.group }}"
# system: yes
#
# state: pres
#
ent
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have a user
#- name: ensure
#
we have a user
# user:
# name: "{{ app.user }}"
# group: "{{ app.group }}"
# system: yes
# home: "{{ app.home }}"
# shell: /usr/bin/nologin
# createhome: no
# state: present
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
#
#- name: ensure a temporary directory exists
# name: "{{ a
#
pp.user }}"
# group: "{{
#
app.group }}"
# system: yes
#
# home: "{{ a
#
pp.home }}"
# shell: /usr
#
/bin/nologin
# createhome:
#
no
# state: pres
#
ent
# tags:
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure
#
a temporary directory exists
# template:
# src: tmpfiles.conf.j2
# dest: "/etc/tmpfiles.d/10-{{ app.name }}.conf"
# owner: root
# group: root
# src: tmpfil
#
es.conf.j2
# dest: "/etc
#
/tmpfiles.d/10-{{ app.name }}.conf"
# owner: root
#
# group: root
#
# mode: 0644
# notify:
# - create tmpfiles
# - create tm
#
pfiles
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have our uwsgi config file
#- name: ensure
#
we have our uwsgi config file
# template:
# src: uwsgi.ini.j2
# dest: "/etc/uwsgi/apps/{{ app.instance }}.ini"
# owner: root
# group: root
# src: uwsgi.
#
ini.j2
# dest: "/etc
#
/uwsgi/apps/{{ app.instance }}.ini"
# owner: root
#
# group: root
#
# mode: 0644
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure additional software is installed
# apt: name={{ item }} state=present
# with_items: "{{ app.additional_software }}"
#- name: ensure
#
additional software is installed
# apt: name=
"
{{
#
item }}
"
state=present
# with_items: "
#
{{ app.additional_software }}"
# when:
# - app.additional_software is defined
# - app.addit
#
ional_software is defined
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure the deploy key is available
#- name: ensure
#
the deploy key is available
# copy:
# src: "{{ app.deploy_key }}"
# dest: "/root/.ssh/{{ app.
name
}}"
# owner: root
# group: root
# src: "{{ ap
#
p.deploy_key }}"
# dest: "/roo
#
t/.ssh/{{ app.
app
}}"
# owner: root
#
# group: root
#
# mode: 0600
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
## https://github.com/ansible/ansible/issues/27699
#- name: ensure git module is able to clone
# command: mount -o remount,exec /tmp
## https://githu
#
b.com/ansible/ansible/issues/27699
#- name: ensure
#
git module is able to clone
# command: moun
#
t -o remount,exec /tmp
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have the program
#- name: ensure
#
we have the program
# git:
# repo: "{{ app.git_url }}"
# dest: "{{ app.path }}"
# key_file: "/root/.ssh/{{ app.
name
}}"
# version: "{{ app.git_version }}"
# repo: "{{ a
#
pp.git_url }}"
# dest: "{{ a
#
pp.path }}"
# key_file: "
#
/root/.ssh/{{ app.
app
}}"
# version: "{
#
{ app.git_version }}"
# notify:
# - restart uwsgi instance
# register: git
# - restart u
#
wsgi instance
# register: git
#
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure git module is not able to clone anymore
# command: mount -o remount,noexec /tmp
#- name: ensure
#
git module is not able to clone anymore
# command: moun
#
t -o remount,noexec /tmp
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have a virtualenv
#- name: ensure
#
we have a virtualenv
# pip:
# requirements: "{{ app.path }}/requirements.txt"
# virtualenv: "{{ app.venv }}"
# virtualenv_python: "{{ app.python_version }}"
# requirement
#
s: "{{ app.path }}/requirements.txt"
# virtualenv:
#
"{{ app.venv }}"
# virtualenv_
#
python: "{{ app.python_version }}"
# notify:
# - restart uwsgi instance
# - restart u
#
wsgi instance
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have our config
#- name: ensure
#
we have our config
# template:
# src: "apps/{{ app.
name
}}.j2"
# dest: "{{ app.path }}/{{ app.config_file }}"
# owner: "{{ app.user }}"
# group: "{{ app.group }}"
# src: "apps/
#
{{ app.
app
}}.j2"
# dest: "{{ a
#
pp.path }}/{{ app.config_file }}"
# owner: "{{
#
app.user }}"
# group: "{{
#
app.group }}"
# mode: 0640
# notify:
# - restart uwsgi instance
# - restart u
#
wsgi instance
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- name: ensure we have our secret config
#- name: ensure
#
we have our secret config
# template:
# src: secret_config.py.j2
# dest: "{{ app.path }}/secret_config.py"
# owner: "{{ app.user }}"
# group: "{{ app.group }}"
# src: secret
#
_config.py.j2
# dest: "{{ a
#
pp.path }}/secret_config.py"
# owner: "{{
#
app.user }}"
# group: "{{
#
app.group }}"
# mode: 0600
# force: no
# notify:
# - restart uwsgi instance
# - restart u
#
wsgi instance
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
# when:
# - secret_config is defined
# - secret_config == True
# - secret_co
#
nfig is defined
# - secret_co
#
nfig == True
#
#
#- include_tasks: "{{ item }}"
# with_first_found:
#- include_tasks
#
: "{{ item }}"
# with_first_fo
#
und:
# - files:
# - "apps/{{ app.
name
}}.yml"
# skip: true
# - "apps
#
/{{ app.
app
}}.yml"
# skip: tru
#
e
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.instance }}"
# - uwsgi-app
#
# - "{{ app.
a#pp
}}"
# - "{{ app.i
#
nstance }}"
#
#- meta: flush_handlers
#- meta: flush_h
#
andlers
#
#- name: ensure the service is enabled
# service:
...
...
@@ -217,7 +221,7 @@
# state: started
# tags:
# - uwsgi-app
# - "{{ app.
name
}}"
# - "{{ app.
app
}}"
# - "{{ app.instance }}"
#
#
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment