Difference between revisions of "With items:"

From wikieduonline
Jump to navigation Jump to search
(Created page with "{{Draft}} with_items: == See also == * {{Ansible}} Category:Ansible")
 
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Draft}}
 
{{Draft}}
 +
{{lc}}
 +
* https://docs.ansible.com/ansible/latest/collections/ansible/builtin/items_lookup.html
  
 
  with_items:
 
  with_items:
  
 +
 +
== Example ==
 +
<pre>
 +
<nowiki>
 +
- name: "loop through list"
 +
  ansible.builtin.debug:
 +
    msg: "An item: {{ item }}"
 +
  with_items:
 +
    - 1
 +
    - 2
 +
    - 3
 +
</nowiki>
 +
</pre>
 +
 +
 +
== Related terms ==
 +
* [[When: (ansible)]]
 +
* <code>[[for]]</code>
 +
* <code>[[vars:]]</code>
 +
* [[Use loops in task (Ansible)]]
 +
* <code>[[set_fact]]</code>
 +
* [[Terraform]]: <code>[[for_each]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 15:58, 12 January 2023

Advertising: