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
2 changed files with 5 additions and 5 deletions

View File

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

View File

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