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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
webservices
Commits
3a329e37
Commit
3a329e37
authored
7 years ago
by
Hinrikus Wolf
Browse files
Options
Downloads
Patches
Plain Diff
rum probiert
parent
639a88e0
No related branches found
No related tags found
1 merge request
!3
Unify uwsgi python
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
uwsgi-python/tasks/app.yml
+20
-14
20 additions, 14 deletions
uwsgi-python/tasks/app.yml
uwsgi-python/tasks/main.yml
+6
-3
6 additions, 3 deletions
uwsgi-python/tasks/main.yml
with
26 additions
and
17 deletions
uwsgi-python/tasks/app.yml
+
20
−
14
View file @
3a329e37
...
...
@@ -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_
nam
e
}}.ini"
dest
:
"
/etc/uwsgi/apps/{{
app_
instanc
e
}}.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_
nam
e
}}"
name
:
"
uwsgi@{{
app_
instanc
e
}}"
enabled
:
yes
state
:
started
tags
:
-
uwsgi-app
-
"
{{
app_name
}}"
-
"
{{
app_instance
}}"
This diff is collapsed.
Click to expand it.
uwsgi-python/tasks/main.yml
+
6
−
3
View file @
3a329e37
...
...
@@ -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
}}"
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