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
b8681b20
Commit
b8681b20
authored
Jun 22, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using YAML syntax to rewrite the ansible tasks
parent
92acf889
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
36 deletions
+37
-36
playbooks/roles/edx_service/tasks/main.yml
+37
-36
No files found.
playbooks/roles/edx_service/tasks/main.yml
View file @
b8681b20
...
...
@@ -49,12 +49,12 @@
# example we were seeing it defaulting to `root` for both.
# The item that is a blank string("") ensures the ownership
# of the home directory is always correct before proceeding.
-
name
:
c
reate edx_service app, venv, data, and staticfiles dirs
file
:
>
path
=
"{{ edx_service_home }}/{{ item }}"
state
=
directory
owner
=
"{{ edx_service_name }}"
group
=
"{{ common_web_group }}"
-
name
:
C
reate edx_service app, venv, data, and staticfiles dirs
file
:
path
:
"
{{
edx_service_home
}}/{{
item
}}"
state
:
directory
owner
:
"
{{
edx_service_name
}}"
group
:
"
{{
common_web_group
}}"
with_items
:
-
"
"
-
"
venvs"
...
...
@@ -64,73 +64,74 @@
-
install
-
install:base
-
name
:
c
reate /edx/var and /edx/etc dirs
file
:
>
path
=
"{{ item }}/{{ edx_service_name }}"
state
=
directory
owner
={{ edx_service_user }}
group
={{ common_web_group }}
mode
=0755
-
name
:
C
reate /edx/var and /edx/etc dirs
file
:
path
:
"
{{
item
}}/{{
edx_service_name
}}"
state
:
directory
owner
:
"
{{
edx_service_user
}}"
group
:
"
{{
common_web_group
}}"
mode
:
"
0755"
with_items
:
-
/edx/var
-
/edx/etc
-
"
/edx/var"
-
"
/edx/etc"
tags
:
-
install
-
install:base
-
name
:
c
reate edx_service log dir
file
:
>
path
=
"{{ item }}"
state
=
directory
owner
=
"syslog"
group
=
"syslog"
-
name
:
C
reate edx_service log dir
file
:
path
:
"
{{
item
}}"
state
:
directory
owner
:
"
syslog"
group
:
"
syslog"
with_items
:
-
"
{{
COMMON_LOG_DIR
}}/{{
edx_service_name
}}"
tags
:
-
install
-
install:base
-
name
:
w
rite out app config file
template
:
>
src
=config.yml.j2
dest
={{ COMMON_CFG_DIR }}/{{ edx_service_name }}.yml
mode
=0644
-
name
:
W
rite out app config file
template
:
src
:
"
config.yml.j2"
dest
:
"
{{
COMMON_CFG_DIR
}}/{{
edx_service_name
}}.yml"
mode
:
"
0644"
when
:
edx_service_config is defined
tags
:
-
install
-
install:configuration
-
name
:
i
nstall a bunch of system packages on which edx_service relies
-
name
:
I
nstall a bunch of system packages on which edx_service relies
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
update_cache
:
true
cache_valid_time
:
3600
with_items
:
edx_service_packages.debian
with_items
:
"
{{
edx_service_packages.debian
}}"
when
:
ansible_distribution in common_debian_variants
tags
:
-
install
-
install:system-requirements
-
name
:
install a bunch of system packages on which edx_service relies
yum
:
pkg={{ item }} state=present
with_items
:
edx_service_name.redhat
-
name
:
Install a bunch of system packages on which edx_service relies
yum
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
"
{{
edx_service_packages.redhat
}}"
when
:
ansible_distribution in common_redhat_variants
tags
:
-
install
-
install:system-requirements
-
name
:
g
et instance information
-
name
:
G
et instance information
action
:
ec2_facts
tags
:
-
to-remove
#old syntax - should be fixed
-
name
:
t
ag instance
-
name
:
T
ag instance
ec2_tag_local
:
resource={{ ansible_ec2_instance_id }} region={{ ansible_ec2_placement_region }}
args
:
tags
:
-
Name
:
version:{{
edx_service_name
}}
-
Name
:
version:{{
edx_service_name
}}
Value
:
"
{{
item.0.DOMAIN
}}/{{
item.0.PATH
}}/{{
item.0.REPO
}}
{{
item.1.after
|truncate(7,True,'')
}}"
when
:
item.1.after is defined and COMMON_TAG_EC2_INSTANCE and edx_service_repos is defined
with_together
:
...
...
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