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
ccfbafdd
Commit
ccfbafdd
authored
Mar 17, 2015
by
Max Rothman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ansible-provision.sh fail on any failed ansible runs
parent
056af16b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
util/jenkins/ansible-provision.sh
+13
-7
No files found.
util/jenkins/ansible-provision.sh
View file @
ccfbafdd
...
...
@@ -22,6 +22,12 @@ env
export
PYTHONUNBUFFERED
=
1
export
BOTO_CONFIG
=
/var/lib/jenkins/
${
aws_account
}
.boto
run_ansible
()
{
ansible-playbook
$@
ret
=
$?
[
$ret
-ne
0
]
&&
exit
$ret
}
# This DATE_TIME will be used as instance launch time tag
TERMINATION_DATE_TIME
=
`
date +
"%m-%d-%Y %T"
--date
=
"-7 days ago"
`
...
...
@@ -215,13 +221,13 @@ EOF
# run the tasks to launch an ec2 instance from AMI
cat
$extra_vars_file
ansible-playbook
edx_provision.yml
-i
inventory.ini
$extra_var_arg
--user
ubuntu
run_ansible
edx_provision.yml
-i
inventory.ini
$extra_var_arg
--user
ubuntu
if
[[
$server_type
==
"full_edx_installation"
]]
;
then
# additional tasks that need to be run if the
# entire edx stack is brought up from an AMI
ansible-playbook
rabbitmq.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
ansible-playbook
restart_supervisor.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
run_ansible
rabbitmq.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
run_ansible
restart_supervisor.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
fi
fi
...
...
@@ -235,7 +241,7 @@ done
# run non-deploy tasks for all roles
if
[[
$reconfigure
==
"true"
||
$server_type
==
"full_edx_installation_from_scratch"
]]
;
then
cat
$extra_vars_file
ansible-playbook
edx_continuous_integration.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
run_ansible
edx_continuous_integration.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
fi
if
[[
$reconfigure
!=
"true"
&&
$server_type
==
"full_edx_installation"
]]
;
then
...
...
@@ -243,15 +249,15 @@ if [[ $reconfigure != "true" && $server_type == "full_edx_installation" ]]; then
for
i
in
$roles
;
do
if
[[
${
deploy
[
$i
]
}
==
"true"
]]
;
then
cat
$extra_vars_file
ansible-playbook
${
i
}
.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
--tags
deploy
run_ansible
${
i
}
.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
--tags
deploy
fi
done
fi
# deploy the edx_ansible role
ansible-playbook
edx_ansible.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
run_ansible
edx_ansible.yml
-i
"
${
deploy_host
}
,"
$extra_var_arg
--user
ubuntu
# set the hostname
ansible-playbook
set_hostname.yml
-i
"
${
deploy_host
}
,"
-e
hostname_fqdn
=
${
deploy_host
}
--user
ubuntu
run_ansible
set_hostname.yml
-i
"
${
deploy_host
}
,"
-e
hostname_fqdn
=
${
deploy_host
}
--user
ubuntu
rm
-f
"
$extra_vars_file
"
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