Fix collect info script invocation

Change-Id: I757b233142d14f96cb7111cc6b7bcc834a7a3636
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2016-08-26 11:25:42 +02:00
parent aa7c8c6032
commit b5e5fda498
4 changed files with 6 additions and 14 deletions

View File

@ -34,9 +34,7 @@ In order to re-build the tarball with fresh info, run:
.. code:: sh
ADMIN_WORKSPACE=$ws \
VARS="-e @${ws}utils/kargo/roles/configure_logs/defaults/main.yml" \
/usr/local/bin/collect_logs.sh
ADMIN_WORKSPACE=$ws /usr/local/bin/collect_logs.sh
If you deploy from the vagrantfile, you may want to use its NFS mount for
the installer repo and adjust the commands above like this:
@ -50,6 +48,4 @@ the installer repo and adjust the commands above like this:
-e @/vagrant/utils/kargo/roles/configure_logs/defaults/main.yml \
/vagrant/utils/kargo/preinstall.yml
ADMIN_WORKSPACE=$ws \
VARS="-e @/vagrant/utils/kargo/roles/configure_logs/defaults/main.yml" \
/usr/local/bin/collect_logs.sh
ADMIN_WORKSPACE=$ws /usr/local/bin/collect_logs.sh

View File

@ -40,8 +40,7 @@ required_ansible_version="2.1.0"
function collect_info {
# Get diagnostic info and store it as the logs.tar.gz at the admin node
admin_node_command ADMIN_USER=$ADMIN_USER \
ADMIN_WORKSPACE=$ADMIN_WORKSPACE \
VARS="${LOGGING_DEFAULTS_OPT}" collect_logs.sh
ADMIN_WORKSPACE=$ADMIN_WORKSPACE collect_logs.sh
}
function exit_gracefully {
@ -233,7 +232,6 @@ cat $OS_SPECIFIC_DEFAULTS_SRC | admin_node_command "cat > $ADMIN_WORKSPACE/inven
COMMON_DEFAULTS_OPT="-e @$ADMIN_WORKSPACE/inventory/${COMMON_DEFAULTS_YAML}"
OS_SPECIFIC_DEFAULTS_OPT="-e @$ADMIN_WORKSPACE/inventory/${OS_SPECIFIC_DEFAULTS_YAML}"
KARGO_DEFAULTS_OPT="-e @$ADMIN_WORKSPACE/kargo/inventory/group_vars/all.yml"
LOGGING_DEFAULTS_OPT="-e @$ADMIN_WORKSPACE/utils/kargo/roles/configure_logs/defaults/main.yml"
if [ -n "$CUSTOM_YAML" ]; then
echo "Uploading custom YAML for deployment..."

View File

@ -15,8 +15,6 @@ callback_plugins:
script_name: timestamp.py
callback_plugin_path: /usr/share/ansible/plugins/callback
# Define custom diag info to collect
debug: false
searchpath: "{{workspace|default('/home/vagrant/')}}"
commands:
- name: git_info
cmd: find . -type d -name .git -execdir sh -c 'gen-gitinfos.sh global|head -12' \;

View File

@ -1,12 +1,12 @@
#!/bin/bash
LOG_LEVEL=${LOG_LEVEL:--v}
SSH_EXTRA_ARGS='-o\ StrictHostKeyChecking=no'
ADMIN_USER=${ADMIN_USER:-vagrant}
ADMIN_WORKSPACE=${ADMIN_WORKSPACE:-workspace}
VARS=${VARS:--e ansible_ssh_user=vagrant -e human_readable_plugin=false}
/usr/bin/ansible-playbook ${LOG_LEVEL} \
--ssh-extra-args "$SSH_EXTRA_ARGS" -u ${ADMIN_USER} -b \
--become-user=root -i $ADMIN_WORKSPACE/inventory/inventory.cfg \
-e worskpace=$ADMIN_WORKSPACE ${VARS} $ADMIN_WORKSPACE/kargo/scripts/collect-info.yaml
-e searchpath=$ADMIN_WORKSPACE \
-e @$ADMIN_WORKSPACE/utils/kargo/roles/configure_logs/defaults/main.yml \
$ADMIN_WORKSPACE/kargo/scripts/collect-info.yaml