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
f72ee53e
Commit
f72ee53e
authored
May 28, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run-ansible for jenkins job
parent
5df1a16c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
util/jenkins/run-ansible.sh
+38
-0
No files found.
util/jenkins/run-ansible.sh
0 → 100644
View file @
f72ee53e
#!/usr/bin/env bash
# A simple wrapper to run ansible from Jenkins.
# This assumes that you will be running on one or more servers
# that are tagged with Name: <environment>-<deployment>-<play>
if
[[
-z
$WORKSPACE
||
-z
$environment
||
-z
$deployment
||
-z
$play
||
-z
$ansible_play
||
-z
$elb_pre_post
||
-z
$first_in
||
-z
$serial_count
]]
;
then
echo
"Environment incorrect for this wrapper script"
env
exit
1
fi
cd
$WORKSPACE
/configuration/playbooks/edx-east
ansible_extra_vars+
=
" -e 'serial_count=
$serial_count
elb_pre_post=
$elb_pre_post
'"
if
[
!
-z
"
$extra_vars
"
]
;
then
ansible_extra_vars+
=
" -e
$extra_vars
"
fi
if
[[
$first_in
==
"true"
]]
;
then
$ansible_limit
+
=
"first_in"
fi
ansible_limit
=
"_tag_Name_
${
environment
}
-
${
deployment
}
-
${
play
}
"
env
echo
ansible-playbook
$ansible_play
-i
./ec2.py
--limit
$ansible_limit
-e
@
"
$WORKSPACE
/configuration-secure/ansible/vars/
${
deployment
}
.yml"
-e
@
"
$WORKSPACE
/configuration-secure/ansible/vars/
${
environment
}
-
${
deployment
}
.yml"
$ansible_extra_vars
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