Hello guys,
I need to run loop with a file but run all tasks item by item. Here is my conf:
- name: test
hosts: yo
tasks:
-
name: task 1
win_uri:
url: https://{{ frontsrc }}/{{ item }}/
with_lines: cat /etc/ansible/group_vars/afyahia -
name: Task 2
win_uri:
url: https://{{ frontsrc }}.{{ item }}/
with_lines: cat /etc/ansible/group_vars/afyahia
in afyahia file, i have:
appli1
appli2
…
applin
If i run the playbook it’s running like:
task 1
appli1
appli2
…
…
task 2
appli1
appli2
…
I would like to run it like this:
task 1
appli1
task 2
appli1
task 1
appli2
task 2
appli2
task 1
…
task 2
…
Is it possible?
thx