# issue #154: yum_repository module leaks state via a class variable, so it
# must be reinitialized or cleared out somehow on each invocation.

- name: regression/issue_154__module_state_leaks.yml
  any_errors_fatal: true
  hosts: test-targets
  tasks:

  - custom_python_leaky_class_vars:
      name: David
    with_sequence: start=0 end=3
    register: out

  - assert:
      that:
        - out.results[item|int].leak1 == ["David"]
        - out.results[item|int].leak2 == ["David"]
    with_sequence: start=0 end=3
