diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/become/vars/main.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/become/vars/main.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/targets/become/vars/main.yml b/test/integration/targets/become/vars/main.yml new file mode 100644 index 0000000..d9c1cd0 --- /dev/null +++ b/test/integration/targets/become/vars/main.yml @@ -0,0 +1,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 }}" |