Difference between revisions of "With items:"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by one other user not shown)
Line 4: Line 4:
  
 
  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>
  
  
Line 11: Line 25:
 
* <code>[[vars:]]</code>
 
* <code>[[vars:]]</code>
 
* [[Use loops in task (Ansible)]]
 
* [[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: