Debian Codegraph @

test/integration/targets/become/vars/main.yml

raw
1 become_test: >-
2 {{ become_test_config.method }} from {{ connection_user.stdout }} to {{ become_test_config.user }}
3 {{ 'with' if become_test_config.password else 'without' }} password
4
5 become_methods:
6 - method: sudo
7 user: "{{ test_user_name }}"
8 password: "{{ test_user_plaintext_password if connection_user.stdout != 'root' else None }}"
9 # Some systems are not configured to allow sudo for non-root users.
10 # The tests could be updated in the future to temporarily enable sudo for the connection user.
11 skip: "{{ connection_user.stdout != 'root' and ansible_distribution == 'FreeBSD' }}"
12 - method: su
13 user: "{{ test_user_name }}"
14 password: "{{ test_user_plaintext_password if connection_user.stdout != 'root' else None }}"