mirror of https://github.com/ansible/ansible.git
Signed-off-by: tu1h <lihai.tu@daocloud.io>pull/80377/head
parent
0e509ecf25
commit
043a0f3ee8
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- "strategy plugins: get the correctly templated and validated run_once value on strategy linear (https://github.com/ansible/ansible/issues/78492)"
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
- hosts: testhost,testhost2
|
||||||
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
run_once_flag: false
|
||||||
|
tasks:
|
||||||
|
- debug:
|
||||||
|
msg: "I am {{ item }}"
|
||||||
|
run_once: "{{ run_once_flag }}"
|
||||||
|
register: reg1
|
||||||
|
loop:
|
||||||
|
- "{{ inventory_hostname }}"
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "reg1.results[0].msg == 'I am testhost'"
|
||||||
|
when: inventory_hostname == 'testhost'
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "reg1.results[0].msg == 'I am testhost2'"
|
||||||
|
when: inventory_hostname == 'testhost2'
|
||||||
Loading…
Reference in New Issue