4 ms·
The author's example of using loop data out of loops is overlooking anchors and aliases in YAML. His example can be rewritten as: - hosts: all tasks:
by athenot 6y ago
The author's example of using loop data out of loops is overlooking anchors and aliases in YAML. His example can be rewritten as:
- hosts: all
tasks:
- name: Install distro packages
package:
name: "{{ item }}"
state: present
with_list: &packages
- git
- htop
tags: *packages
- spyc 6y agoGood point, thanks for bringing it up! I have updated the article accordingly just now.