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/inventory_ini | |
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 '')
4 files changed, 22 insertions, 0 deletions
diff --git a/test/integration/targets/inventory_ini/aliases b/test/integration/targets/inventory_ini/aliases new file mode 100644 index 0000000..3005e4b --- /dev/null +++ b/test/integration/targets/inventory_ini/aliases @@ -0,0 +1 @@ +shippable/posix/group4 diff --git a/test/integration/targets/inventory_ini/inventory.ini b/test/integration/targets/inventory_ini/inventory.ini new file mode 100644 index 0000000..a0c99ad --- /dev/null +++ b/test/integration/targets/inventory_ini/inventory.ini @@ -0,0 +1,5 @@ +[local] +testhost ansible_connection=local ansible_become=no ansible_become_user=ansibletest1 + +[all:vars] +ansible_python_interpreter="{{ ansible_playbook_python }}" diff --git a/test/integration/targets/inventory_ini/runme.sh b/test/integration/targets/inventory_ini/runme.sh new file mode 100755 index 0000000..81bf147 --- /dev/null +++ b/test/integration/targets/inventory_ini/runme.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -eux + +ansible-playbook -v -i inventory.ini test_ansible_become.yml diff --git a/test/integration/targets/inventory_ini/test_ansible_become.yml b/test/integration/targets/inventory_ini/test_ansible_become.yml new file mode 100644 index 0000000..55bbe7d --- /dev/null +++ b/test/integration/targets/inventory_ini/test_ansible_become.yml @@ -0,0 +1,11 @@ +- hosts: testhost + gather_facts: no + tasks: + - name: Test proper bool evaluation of ansible_become (issue #70476) + shell: whoami + register: output + + - name: Assert we are NOT the become user specified + assert: + that: + - "output.stdout != 'ansibletest1'" |