From 2c60745fbafc8f27ab4a397e696bf085632b29f8 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 27 Sep 2016 21:34:27 +0000 Subject: [PATCH] Update Ansible version to stable-2.1 Updated the version to be installed to stable-2.1 as well as updated some of the playbooks that were incorrectly passing string arguments instead of dictionary arguments for authentication since Ansible 2.1 has checks that detect this. Additionally, updated the task labels used for unsetting authentiction parameters to be more consistent with the state of the code. Change-Id: I8c50cd2a722f2c8fee91fb6ef0761969dd3da138 --- .../roles/bifrost-deploy-nodes-dynamic/tasks/main.yml | 3 ++- .../bifrost-unprovision-node-dynamic/tasks/main.yml | 4 ++-- playbooks/roles/ironic-delete-dynamic/tasks/main.yml | 4 ++-- playbooks/roles/ironic-enroll-dynamic/tasks/main.yml | 3 ++- playbooks/roles/ironic-inspect-node/tasks/main.yml | 4 ++-- releasenotes/notes/ansible-2.1-4b6b36998287bb11.yaml | 9 +++++++++ scripts/env-setup.sh | 2 +- 7 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/ansible-2.1-4b6b36998287bb11.yaml diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index c57335245..14e3df7dc 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -17,9 +17,10 @@ # the pass-through could mean that the user could deploy # things that are not directly accessible or reasonable # to be inspected. -- name: "If in noauth mode, set Auth parameters to None" +- name: "If in noauth mode, unset authentication parameters." set_fact: auth_type: None + auth: {} when: noauth_mode | bool == true - name: "Setup DHCP for nodes." template: diff --git a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml index a9535860b..1ab9d8193 100644 --- a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "If in noauth mode, set Auth parameters to None" +- name: "If in noauth mode, unset authentication parameters." set_fact: auth_type: None - auth: None + auth: {} when: noauth_mode | bool == true - name: "Unprovision node" os_ironic_node: diff --git a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml index 07283d0d8..0caa2ee13 100644 --- a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "If in noauth mode, set Auth parameters to None" +- name: "If in noauth mode, unset authentication parameters." set_fact: auth_type: None - auth: None + auth: {} when: noauth_mode | bool == true - name: "Delete hardware" os_ironic: diff --git a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml index d94ddd205..7a889874f 100644 --- a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "If in noauth mode, set Auth parameters to None" +- name: "If in noauth mode, unset authentication parameters." set_fact: auth_type: None + auth: {} when: noauth_mode | bool == true - name: "Dynamic enrollment" os_ironic: diff --git a/playbooks/roles/ironic-inspect-node/tasks/main.yml b/playbooks/roles/ironic-inspect-node/tasks/main.yml index 3c4dbef40..b478dc7ce 100644 --- a/playbooks/roles/ironic-inspect-node/tasks/main.yml +++ b/playbooks/roles/ironic-inspect-node/tasks/main.yml @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "If in noauth mode, set Auth parameters to None" +- name: "If in noauth mode, unset authentication parameters." set_fact: auth_type: None - auth: None + auth: {} when: noauth_mode | bool == true - name: "Execute node introspection - NoAuth Mode" os_ironic_inspect: diff --git a/releasenotes/notes/ansible-2.1-4b6b36998287bb11.yaml b/releasenotes/notes/ansible-2.1-4b6b36998287bb11.yaml new file mode 100644 index 000000000..3e5c1674f --- /dev/null +++ b/releasenotes/notes/ansible-2.1-4b6b36998287bb11.yaml @@ -0,0 +1,9 @@ +--- +features: + - Bifrost has been updated to utilize Ansible 2.1's stable branch + for the version of ansible installed. +upgrade: + - Bifrost has been changed to utilize Ansible 2.1 by default. + Should a deployment encounter issues with Ansible, they may + wish to check/update their version of Ansible, or re-execute + the env-setup.sh script. diff --git a/scripts/env-setup.sh b/scripts/env-setup.sh index a901fbb21..07a319b4a 100755 --- a/scripts/env-setup.sh +++ b/scripts/env-setup.sh @@ -2,7 +2,7 @@ set -eu ANSIBLE_GIT_URL=${ANSIBLE_GIT_URL:-https://github.com/ansible/ansible.git} -ANSIBLE_GIT_BRANCH=${ANSIBLE_GIT_BRANCH:-stable-2.0} +ANSIBLE_GIT_BRANCH=${ANSIBLE_GIT_BRANCH:-stable-2.1} ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack} function check_get_module () {