mitogen/tests/ansible/integration/playbook_semantics/become_flags.yml

33 lines
552 B
YAML

#
# Test sudo_flags respects -E.
#
- hosts: all
any_errors_fatal: true
tasks:
- name: integration/playbook_semantics/become_flags.yml
assert:
that: true
- name: "without -E"
become: true
shell: "echo $FOO"
register: out
- assert:
that: "out.stdout == ''"
- hosts: all
any_errors_fatal: true
become_flags: -E
tasks:
- name: "with -E"
become: true
shell: "echo $FOO"
register: out2
environment:
FOO: 2
- assert:
that: "out2.stdout == '2'"