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
d29be64a
Commit
d29be64a
authored
Feb 13, 2015
by
Max Rothman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow edx_service to be run without defined repos
parent
f20fe05f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
playbooks/roles/edx_service/tasks/main.yml
+6
-5
No files found.
playbooks/roles/edx_service/tasks/main.yml
View file @
d29be64a
...
...
@@ -110,10 +110,11 @@
-
name
:
set git fetch.prune to ignore deleted remote refs
shell
:
git config --global fetch.prune
true
sudo_user
:
"
{{
edx_service_user
}}"
when
:
edx_service_repos is defined
-
name
:
validate git protocol
fail
:
msg='REPOS.PROTOCOL must be "https" or "ssh"'
when
:
(item.PROTOCOL != "https") and (item.PROTOCOL != "ssh")
when
:
(item.PROTOCOL != "https") and (item.PROTOCOL != "ssh")
and edx_service_repos is defined
with_items
:
edx_service_repos
-
name
:
install read-only ssh key
...
...
@@ -121,7 +122,7 @@
dest="{{ edx_service_home }}/.ssh/{{ item.REPO }}"
content="{{ item.SSH_KEY }}" owner={{ edx_service_user }}
group={{ edx_service_user }} mode=0600
when
:
item.PROTOCOL == "ssh"
when
:
item.PROTOCOL == "ssh"
and edx_service_repos is defined
with_items
:
edx_service_repos
-
name
:
checkout code over ssh
...
...
@@ -131,7 +132,7 @@
accept_hostkey=yes key_file={{ edx_service_home }}/.ssh/{{ item.REPO }}
sudo_user
:
"
{{
edx_service_user
}}"
register
:
code_checkout
when
:
item.PROTOCOL == "ssh"
when
:
item.PROTOCOL == "ssh"
and edx_service_repos is defined
with_items
:
edx_service_repos
-
name
:
checkout code over https
...
...
@@ -140,7 +141,7 @@
dest={{ item.DESTINATION }} version={{ item.VERSION }}
sudo_user
:
"
{{
edx_service_user
}}"
register
:
code_checkout
when
:
item.PROTOCOL == "https"
when
:
item.PROTOCOL == "https"
and edx_service_repos is defined
with_items
:
edx_service_repos
...
...
@@ -153,7 +154,7 @@
args
:
tags
:
"
version:{{edx_service_name}}"
:
"
{{
item.0.DOMAIN
}}/{{
item.0.PATH
}}/{{
item.0.REPO
}}
{{
item.1.after
|truncate(7,True,'')
}}"
when
:
item.1.after is defined and ansible_ec2_instance_id is defined
when
:
item.1.after is defined and ansible_ec2_instance_id is defined
and edx_service_repos is defined
with_together
:
-
edx_service_repos
-
code_checkout.results
...
...
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