Merge "Fix used paths to match custom working dir"

This commit is contained in:
Zuul 2018-09-27 08:01:09 +00:00 committed by Gerrit Code Review
commit 5e0a6b1e9f
6 changed files with 16 additions and 6 deletions

View File

@ -27,9 +27,9 @@ find ~jenkins -iname tripleo-overcloud-passwords -execdir cat '{}' ';'
sudo systemctl list-units --full --all
if [ -e /home/{{ undercloud_user }}/stackrc ] ; then
if [ -e {{ working_dir }}/stackrc ] ; then
bash <<-EOF &>/var/log/postci.txt
source /home/{{ undercloud_user }}/stackrc
source {{ working_dir }}/stackrc
openstack <<-EOC
server list -f yaml
workflow list -f yaml

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
source ${HOME}/stackrc
source {{ working_dir }}/stackrc
# We did not have OVERCLOUD_ROLES var in the newton version of the
# get-occ-config script. Instead we need to use CONTROLLER_HOSTS var.

View File

@ -1,2 +1,2 @@
source $HOME/stackrc
source {{ working_dir }}/stackrc
openstack stack resource list -n5 overcloud | grep -v COMPLETE

View File

@ -187,7 +187,7 @@ introspect()
done
set +e
timeout $1 bash -c -- 'source $HOME/stackrc; \
timeout $1 bash -c -- 'source {{ working_dir }}/stackrc; \
on_count=$(openstack baremetal node list -f json|jq -r ".[]| select(.[\"Power State\"] == \"power on\")| .[\"UUID\"]" | wc -l) ; \
while [ $on_count -gt 0 ]; do \
sleep 30s; \

View File

@ -48,7 +48,7 @@ openssl rsa -in {{ working_dir }}/server-key.pem \
## the certificate
## ::
openssl x509 -req -in server-req.pem -days 365 \
openssl x509 -req -in {{ working_dir }}/server-req.pem -days 365 \
-CA {{ working_dir }}/overcloud-cacert.pem \
-CAkey {{ working_dir }}/overcloud-ca-privkey.pem \
-set_serial 01 -out {{ working_dir }}/server-cert.pem \

View File

@ -27,3 +27,13 @@
line: "export OS_PASSWORD={{ undercloud_admin_password.stdout }}"
regexp: "OS_PASSWORD"
- name: Copy stackrc created at the UC user $HOME to the working dir
tags:
- undercloud-post-install
copy:
src: /home/{{ undercloud_user }}/stackrc
dest: "{{ working_dir }}/stackrc"
owner: "{{ undercloud_user }}"
mode: 0640
become: true
when: containerized_undercloud|bool