You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/examples/playbook/playbook__become_flags.yml

28 lines
449 B
YAML

# This must be run with FOO=2 set in the environment.
#
# Test sudo_flags respects -E.
#
- hosts: all
tasks:
- name: "without -E"
become: true
shell: "echo $FOO"
register: out
- assert:
that: "out.stdout == ''"
- hosts: all
become_flags: -E
tasks:
- name: "with -E"
become: true
shell: "set"
register: out2
- debug: msg={{out2}}
- assert:
that: "out2.stdout == '2'"