Merge "Protect CLI parameters passed through osa wrapper"

This commit is contained in:
Jenkins 2016-11-07 16:07:09 +00:00 committed by Gerrit Code Review
commit 7780080efa
2 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ fi
# Execute the Ansible command.
if [ "\${RUN_CMD}" == "openstack-ansible" ] || [ "\${RUN_CMD}" == "ansible-playbook" ]; then
/opt/ansible-runtime/bin/ansible-playbook \${@} \${VAR1}
/opt/ansible-runtime/bin/ansible-playbook "\${@}" \${VAR1}
else
/opt/ansible-runtime/bin/\${RUN_CMD} "\${@}"
fi

View File

@ -18,7 +18,7 @@
## Vars ----------------------------------------------------------------------
LINE='----------------------------------------------------------------------'
MAX_RETRIES=${MAX_RETRIES:-5}
ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-" -e 'gather_facts=False' "}
ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:--e gather_facts=False}
STARTTIME="${STARTTIME:-$(date +%s)}"
PIP_INSTALL_OPTIONS=${PIP_INSTALL_OPTIONS:-'pip==8.1.2 setuptools==28.3.0 wheel==0.29.0 '}
COMMAND_LOGS=${COMMAND_LOGS:-"/openstack/log/ansible_cmd_logs"}
@ -59,9 +59,9 @@ function successerator {
false
for ((RETRY=0; $? != 0 && RETRY < MAX_RETRIES; RETRY++)); do
if [ ${RETRY} -gt 1 ];then
$@ -vvvv
"$@" -vvvv
else
$@
"$@"
fi
done
# If max retires were hit, fail.
@ -82,7 +82,7 @@ function successerator {
function install_bits {
# Use the successerator to run openstack-ansible
successerator openstack-ansible $@ ${ANSIBLE_PARAMETERS}
successerator openstack-ansible "$@" ${ANSIBLE_PARAMETERS}
}
function ssh_key_create {