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
edx
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
Show 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
-
name
:
restart flower
supervisorctl
:
>
supervisorctl
:
state
=
restarted
state
:
restarted
supervisorctl_path
={{ supervisor_ctl }}
supervisorctl_path
:
"
{{
supervisor_ctl
}}"
config
={{ supervisor_cfg }}
config
:
"
{{
supervisor_cfg
}}"
name
=
"{{ FLOWER_USER }}"
name
:
"
{{
FLOWER_USER
}}"
sudo_user
:
"
{{supervisor_service_user
}}"
sudo_user
:
"
{{
supervisor_service_user
}}"
playbooks/roles/flower/tasks/main.yml
View file @
8ea460ef
---
---
-
name
:
Create application user
-
name
:
create application user
user
:
user
:
>
name
:
"
{{
FLOWER_USER
}}"
name="{{ FLOWER_USER }}" home="{{ flower_app_dir }}"
home
:
"
{{
flower_app_dir
}}"
createhome=no shell=/bin/false
createhome
:
no
shell
:
/bin/false
notify
:
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
create flower user dirs
-
name
:
Create flower user dirs
file
:
>
file
:
path="{{ item }}" state=directory
path
:
"
{{
item
}}"
owner="{{ FLOWER_USER }}" group="{{ common_web_group }}"
state
:
directory
owner
:
"
{{
FLOWER_USER
}}"
group
:
"
{{
common_web_group
}}"
notify
:
notify
:
-
"
restart
flower"
-
restart flower
with_items
:
with_items
:
-
"
{{
flower_app_dir
}}"
-
"
{{
flower_app_dir
}}"
-
"
{{
flower_data_dir
}}"
-
"
{{
flower_data_dir
}}"
-
"
{{
flower_venv_dir
}}"
-
"
{{
flower_venv_dir
}}"
-
"
{{
flower_log_dir
}}"
-
"
{{
flower_log_dir
}}"
-
name
:
create flower environment script
-
name
:
Create flower environment script and configuration file
template
:
>
template
:
src=edx/app/flower/flower_env.j2
src
:
"
{{
item.src
}}"
dest={{ flower_app_dir }}/flower_env
dest
:
"
{{
item.dest
}}"
owner={{ FLOWER_USER }} group={{ common_web_group }}
owner
:
"
{{
FLOWER_USER
}}"
mode=0640
group
:
"
{{
common_web_group
}}"
notify
:
mode
:
0640
-
"
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
notify
:
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
-
name
:
C
reate virtualenv and install Python requirements
pip
:
>
pip
:
name
=
"{{ item }}"
name
:
"
{{
item
}}"
virtualenv
=
"{{ flower_venv_dir }}"
virtualenv
:
"
{{
flower_venv_dir
}}"
state
=
present
state
:
present
extra_args
=
"-i {{ COMMON_PYPI_MIRROR_URL }}"
extra_args
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
sudo_user
:
"
{{
FLOWER_USER
}}"
sudo_user
:
"
{{
FLOWER_USER
}}"
environment
:
"
{{
flower_environment
}}"
environment
:
"
{{
flower_environment
}}"
with_items
:
"
flower_python_reqs
"
with_items
:
"
{{
flower_python_reqs
}}
"
notify
:
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
c
reate supervisor configuration
-
name
:
C
reate supervisor configuration
template
:
>
template
:
src
=edx/app/supervisor/conf.d.available/flower.conf.j2
src
:
"
edx/app/supervisor/conf.d.available/flower.conf.j2"
dest
={{ supervisor_available_dir }}/{{ FLOWER_USER }}.conf
dest
:
"
{{
supervisor_available_dir
}}/{{
FLOWER_USER
}}.conf"
owner
={{ supervisor_user }}
owner
:
"
{{
supervisor_user
}}"
group
={{ supervisor_user }}
group
:
"
{{
supervisor_user
}}"
sudo_user
:
"
{{
supervisor_user
}}"
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
e
nable supervisor configuration
-
name
:
E
nable supervisor configuration
file
:
>
file
:
src
={{ supervisor_available_dir }}/{{ FLOWER_USER }}.conf
src
:
"
{{
supervisor_available_dir
}}/{{
FLOWER_USER
}}.conf"
dest
={{ supervisor_cfg_dir }}/{{ FLOWER_USER }}.conf
dest
:
"
{{
supervisor_cfg_dir
}}/{{
FLOWER_USER
}}.conf"
state
=
link
state
:
link
force
=
yes
force
:
yes
sudo_user
:
"
{{
supervisor_user
}}"
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
notify
:
-
"
restart
flower"
-
restart flower
-
name
:
u
pdate supervisor configuration
-
name
:
U
pdate supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
register
:
supervisor_update
register
:
supervisor_update
sudo_user
:
"
{{
supervisor_service_user
}}"
sudo_user
:
"
{{
supervisor_service_user
}}"
changed_when
:
supervisor_update.stdout is defined and supervisor_update.stdout != ""
changed_when
:
supervisor_update.stdout is defined and supervisor_update.stdout != ""
notify
:
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