Commit e2c4cc70 by Brian Coca

added tests for sequence with a count of 1

now checks for stride being 0 so it does not skip counts of 1 but still skips counts of 0
fixes #11422
parent 676c6869
Subproject commit 30377b7103553a6cf0f6fbd4f8cdf119dc0212a2
Subproject commit ea913bada2e4307c254c3277cd4b15304cacb9bb
......@@ -203,8 +203,7 @@ class LookupModule(object):
)
self.sanity_check()
if self.start != self.end:
if self.stride != 0:
results.extend(self.generate_sequence())
except AnsibleError:
raise
......
......@@ -81,10 +81,16 @@
with_sequence: count=0
register: count_of_zero
- name: test with_sequence count 1
set_fact: "{{ 'x' + item }}={{ item }}"
with_sequence: count=1
register: count_of_one
- assert:
that:
- count_of_zero | skipped
- not count_of_zero | failed
- not count_of_one | skipped
# WITH_RANDOM_CHOICE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment