From 4f0743fa6eb2cf897cbbbb374c4b94334441cbfe Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 13 Aug 2018 18:24:13 +0300 Subject: [PATCH] Switch to Ansible 2.6 This updates the bifrost playbooks to be compatible with the Ansible 2.6 release. Change-Id: I352fdccc8ddfce88feb2ea760273bf101eafcd65 --- .../roles/bifrost-deploy-nodes-dynamic/tasks/main.yml | 7 +++++-- scripts/env-setup.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index ee65a2edd..de58c6483 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -78,7 +78,10 @@ timeout: " {{ wait_timeout | default(1800) }}" when: instance_info is defined and instance_info | to_json != '{}' - name: "Collect the checksum of the deployment image." - stat: path={{deploy_image}} + stat: + path: "{{ deploy_image }}" + get_checksum: yes + checksum_algorithm: md5 register: test_deploy_image when: instance_info is not defined or ( instance_info is defined and instance_info | to_json == '{}' ) - name: "Error if deploy_image is not present, and instance_info is not defined" @@ -95,7 +98,7 @@ config_drive: "{{ deploy_url_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/configdrive-{{ uuid }}.iso.gz" instance_info: image_source: "{{ deploy_url_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/{{deploy_image_filename}}" - image_checksum: "{{ test_deploy_image.stat.md5 }}" + image_checksum: "{{ test_deploy_image.stat.checksum }}" image_disk_format: "qcow2" root_gb: 10 wait: "{{ wait_for_node_deploy }}" diff --git a/scripts/env-setup.sh b/scripts/env-setup.sh index 22a058145..d30434e86 100755 --- a/scripts/env-setup.sh +++ b/scripts/env-setup.sh @@ -5,7 +5,7 @@ set -eu # NOTE(pas-ha) the above exports some useful variables like # $PYTHON , $PIP and $VENV depending on venv install or not -ANSIBLE_PIP_VERSION=${ANSIBLE_PIP_VERSION:-${ANSIBLE_GIT_BRANCH:-stable-2.4}} +ANSIBLE_PIP_VERSION=${ANSIBLE_PIP_VERSION:-${ANSIBLE_GIT_BRANCH:-stable-2.6}} ANSIBLE_PIP_STRING=$(${PYTHON} $(dirname $0)/ansible-pip-str.py ${ANSIBLE_PIP_VERSION})