Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
8ea460ef
Unverified
Commit
8ea460ef
authored
Jun 06, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YAML style parameter passing
parent
73545e9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
57 deletions
+55
-57
playbooks/roles/flower/handlers/main.yml
+6
-6
playbooks/roles/flower/tasks/main.yml
+49
-51
No files found.
playbooks/roles/flower/handlers/main.yml
View file @
8ea460ef
---
-
name
:
restart flower
supervisorctl
:
>
state
=
restarted
supervisorctl_path
={{ supervisor_ctl }}
config
={{ supervisor_cfg }}
name
=
"{{ FLOWER_USER }}"
sudo_user
:
"
{{supervisor_service_user
}}"
supervisorctl
:
state
:
restarted
supervisorctl_path
:
"
{{
supervisor_ctl
}}"
config
:
"
{{
supervisor_cfg
}}"
name
:
"
{{
FLOWER_USER
}}"
sudo_user
:
"
{{
supervisor_service_user
}}"
playbooks/roles/flower/tasks/main.yml
View file @
8ea460ef
---
-
name
:
create application user
user
:
>
name="{{ FLOWER_USER }}" home="{{ flower_app_dir }}"
createhome=no shell=/bin/false
-
name
:
Create application user
user
:
name
:
"
{{
FLOWER_USER
}}"
home
:
"
{{
flower_app_dir
}}"
createhome
:
no
shell
:
/bin/false
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
create flower user dirs
file
:
>
path="{{ item }}" state=directory
owner="{{ FLOWER_USER }}" group="{{ common_web_group }}"
-
name
:
Create flower user dirs
file
:
path
:
"
{{
item
}}"
state
:
directory
owner
:
"
{{
FLOWER_USER
}}"
group
:
"
{{
common_web_group
}}"
notify
:
-
"
restart
flower"
-
restart flower
with_items
:
-
"
{{
flower_app_dir
}}"
-
"
{{
flower_data_dir
}}"
-
"
{{
flower_venv_dir
}}"
-
"
{{
flower_log_dir
}}"
-
name
:
create flower environment script
template
:
>
src=edx/app/flower/flower_env.j2
dest={{ flower_app_dir }}/flower_env
owner={{ FLOWER_USER }} group={{ common_web_group }}
mode=0640
notify
:
-
"
restart
flower"
-
name
:
create flower configuration file
template
:
>
src=edx/app/flower/flowerconfig.py.j2
dest={{ flower_conf_dir }}/flowerconfig.py
owner={{ FLOWER_USER }} group={{ common_web_group }}
mode=0640
-
name
:
Create flower environment script and configuration file
template
:
src
:
"
{{
item.src
}}"
dest
:
"
{{
item.dest
}}"
owner
:
"
{{
FLOWER_USER
}}"
group
:
"
{{
common_web_group
}}"
mode
:
0640
notify
:
-
"
restart
flower"
-
restart flower
with_items
:
-
{
src
:
'
edx/app/flower/flower_env.j2'
,
dest
:
'
{{
flower_app_dir
}}/flower_env'
}
-
{
src
:
'
edx/app/flower/flowerconfig.py.j2'
,
dest
:
'
{{
flower_conf_dir
}}/flowerconfig.py'
}
-
name
:
c
reate virtualenv and install Python requirements
pip
:
>
name
=
"{{ item }}"
virtualenv
=
"{{ flower_venv_dir }}"
state
=
present
extra_args
=
"-i {{ COMMON_PYPI_MIRROR_URL }}"
-
name
:
C
reate virtualenv and install Python requirements
pip
:
name
:
"
{{
item
}}"
virtualenv
:
"
{{
flower_venv_dir
}}"
state
:
present
extra_args
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
sudo_user
:
"
{{
FLOWER_USER
}}"
environment
:
"
{{
flower_environment
}}"
with_items
:
"
flower_python_reqs
"
with_items
:
"
{{
flower_python_reqs
}}
"
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
c
reate supervisor configuration
template
:
>
src
=edx/app/supervisor/conf.d.available/flower.conf.j2
dest
={{ supervisor_available_dir }}/{{ FLOWER_USER }}.conf
owner
={{ supervisor_user }}
group
={{ supervisor_user }}
-
name
:
C
reate supervisor configuration
template
:
src
:
"
edx/app/supervisor/conf.d.available/flower.conf.j2"
dest
:
"
{{
supervisor_available_dir
}}/{{
FLOWER_USER
}}.conf"
owner
:
"
{{
supervisor_user
}}"
group
:
"
{{
supervisor_user
}}"
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
e
nable supervisor configuration
file
:
>
src
={{ supervisor_available_dir }}/{{ FLOWER_USER }}.conf
dest
={{ supervisor_cfg_dir }}/{{ FLOWER_USER }}.conf
state
=
link
force
=
yes
-
name
:
E
nable supervisor configuration
file
:
src
:
"
{{
supervisor_available_dir
}}/{{
FLOWER_USER
}}.conf"
dest
:
"
{{
supervisor_cfg_dir
}}/{{
FLOWER_USER
}}.conf"
state
:
link
force
:
yes
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
u
pdate supervisor configuration
-
name
:
U
pdate supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
register
:
supervisor_update
sudo_user
:
"
{{
supervisor_service_user
}}"
changed_when
:
supervisor_update.stdout is defined and supervisor_update.stdout != ""
notify
:
-
"
restart
flower"
-
restart flower
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment