summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/become/vars/main.yml
blob: d9c1cd024138cfa606c6b88f270071e0eebe8ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
become_test: >-
  {{ become_test_config.method }} from {{ connection_user.stdout }} to {{ become_test_config.user }}
  {{ 'with' if become_test_config.password else 'without' }} password

become_methods:
  - method: sudo
    user: "{{ test_user_name }}"
    password: "{{ test_user_plaintext_password if connection_user.stdout != 'root' else None }}"
    # Some systems are not configured to allow sudo for non-root users.
    # The tests could be updated in the future to temporarily enable sudo for the connection user.
    skip: "{{ connection_user.stdout != 'root' and ansible_distribution == 'FreeBSD' }}"
  - method: su
    user: "{{ test_user_name }}"
    password: "{{ test_user_plaintext_password if connection_user.stdout != 'root' else None }}"