Using loop instead of with_X
The loop keyword is the current recommended way to handle loops, and supports filters. It's available since Ansible version 2.5 so changing ansible requirement in driver-requirements. Change-Id: Ibff1f07ca00b8f5a5274d73f9e53196f49c33a66
This commit is contained in:
parent
0f95848d6f
commit
89c30cb923
@ -125,7 +125,7 @@ Requirements
|
||||
============
|
||||
|
||||
Ansible
|
||||
Tested with, and targets, Ansible 2.4.x
|
||||
Tested with, and targets, Ansible 2.5.x
|
||||
|
||||
Bootstrap image requirements
|
||||
----------------------------
|
||||
|
@ -14,7 +14,7 @@ python-xclarityclient>=0.1.6
|
||||
sushy>=2.0.0
|
||||
|
||||
# Ansible-deploy interface
|
||||
ansible>=2.4
|
||||
ansible>=2.5
|
||||
|
||||
# HUAWEI iBMC hardware type uses the python-ibmcclient library
|
||||
python-ibmcclient>=0.1.0
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
- set_fact:
|
||||
ironic_root_device: /dev/{{ item.key }}
|
||||
with_dict: "{{ ansible_devices }}"
|
||||
loop: "{{ ansible_devices | dict2items | sort(attribute='key') }}"
|
||||
when:
|
||||
- ironic_root_device is undefined
|
||||
- item.value.host
|
||||
|
5
releasenotes/notes/ansible-loops-de0eef0d5b79a9ff.yaml
Normal file
5
releasenotes/notes/ansible-loops-de0eef0d5b79a9ff.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Changing minimum version of Ansible for use with the ``ansible``
|
||||
``deploy_interface`` to version 2.5.
|
Loading…
Reference in New Issue
Block a user