issue #182: test for previous commit.

pull/193/head
David Wilson 6 years ago
parent e119058d9b
commit 633cd888a0

@ -1,3 +1,4 @@
- import_playbook: become_flags.yml
- import_playbook: delegate_to.yml
- import_playbook: environment.yml
- import_playbook: with_items.yml

@ -0,0 +1,32 @@
# Verify with_items that modifies the execution environment still executes in
# the correct context.
- hosts: all
any_errors_fatal: true
tasks:
- name: integration/playbook_semantics/with_items.yml
assert:
that: true
- name: Spin up a few interpreters
shell: whoami
become: true
vars:
ansible_become_user: "mitogen__user{{item}}"
with_sequence: start=1 end=3
register: first_run
- name: Reuse them
shell: whoami
become: true
vars:
ansible_become_user: "mitogen__user{{item}}"
with_sequence: start=1 end=3
register: second_run
- name: Verify first and second run matches expected username.
assert:
that:
- first_run.results[item|int].stdout == ("mitogen__user%d" % (item|int + 1))
- first_run.results[item|int].stdout == second_run.results[item|int].stdout
with_sequence: start=0 end=2
Loading…
Cancel
Save