summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2023-02-22 17:18:10 +0100
committerGitHub <noreply@github.com>2023-02-22 17:18:10 +0100
commit6c3d2a4e51df560e350d1ca3d6a039bf0e05f2ab (patch)
treee76788e346f4cd54c9e63d8fdbc2debe23413311 /test
parentUpdate playbooks_tests.rst (#79788) (diff)
downloadansible-6c3d2a4e51df560e350d1ca3d6a039bf0e05f2ab.tar.xz
ansible-6c3d2a4e51df560e350d1ca3d6a039bf0e05f2ab.zip
Use FAs with inheritance only when applicable (#80026)
... and set default value of an attribute on an object only in NonInheritableFA. Fixes #79777 ci_complete
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/keyword_inheritance/dep_keyword_inheritance.yml8
-rw-r--r--test/integration/targets/keyword_inheritance/roles/role-meta-inheritance/meta/main.yml4
-rwxr-xr-xtest/integration/targets/keyword_inheritance/runme.sh2
3 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/targets/keyword_inheritance/dep_keyword_inheritance.yml b/test/integration/targets/keyword_inheritance/dep_keyword_inheritance.yml
new file mode 100644
index 0000000000..3d3b684ab4
--- /dev/null
+++ b/test/integration/targets/keyword_inheritance/dep_keyword_inheritance.yml
@@ -0,0 +1,8 @@
+- hosts: localhost
+ gather_facts: false
+ tasks:
+ - include_role:
+ name: "{{ item }}"
+ loop:
+ - setup_test_user
+ - role-meta-inheritance
diff --git a/test/integration/targets/keyword_inheritance/roles/role-meta-inheritance/meta/main.yml b/test/integration/targets/keyword_inheritance/roles/role-meta-inheritance/meta/main.yml
new file mode 100644
index 0000000000..b0af49fb14
--- /dev/null
+++ b/test/integration/targets/keyword_inheritance/roles/role-meta-inheritance/meta/main.yml
@@ -0,0 +1,4 @@
+dependencies:
+ - role: whoami
+ become: true
+ become_user: ansibletest0
diff --git a/test/integration/targets/keyword_inheritance/runme.sh b/test/integration/targets/keyword_inheritance/runme.sh
index 6b78a06dc4..1f13ef85c7 100755
--- a/test/integration/targets/keyword_inheritance/runme.sh
+++ b/test/integration/targets/keyword_inheritance/runme.sh
@@ -3,3 +3,5 @@
set -eux
ANSIBLE_ROLES_PATH=../ ansible-playbook -i ../../inventory test.yml "$@"
+
+ANSIBLE_ROLES_PATH=../ ansible-playbook -i ../../inventory dep_keyword_inheritance.yml "$@"