move from with_<lookup>: to loop:

- old functionality is still available direct lookup use, the following are equivalent

  with_nested: [[1,2,3], ['a','b','c']]

  loop: "{{lookup('nested', [1,2,3], ['a','b','c'])}}"

- avoid squashing with 'loop:'
- fixed test to use new intenal attributes
- removed most of 'lookup docs' as these now reside in the plugins
This commit is contained in:
Brian Coca
2017-09-16 23:32:34 -04:00
committed by Brian Coca
parent bd17edd5ed
commit d84df2405d
24 changed files with 157 additions and 1211 deletions

View File

@@ -178,7 +178,7 @@ The following playbook will create an SSH key, 3 Packet servers, and then wait u
port: 22
state: started
timeout: 500
with_items: "{{ newhosts.devices }}"
loop: "{{ newhosts.devices }}"
As with most Ansible modules, the default states of the Packet modules are idempotent, meaning the resources in your project will remain the same after re-runs of a playbook. Thus, we can keep the ``packet_sshkey`` module call in our playbook. If the public key is already in your Packet account, the call will have no effect.