summaryrefslogtreecommitdiff
path: root/tests/fixtures/config/remote-action-modules
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtures/config/remote-action-modules')
-rw-r--r--tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-delegate.yaml3
-rw-r--r--tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-localhost.yaml11
-rw-r--r--tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/main.yaml5
-rw-r--r--tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/script-delegate.yaml11
-rw-r--r--tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-localhost/tasks/main.yaml10
5 files changed, 40 insertions, 0 deletions
diff --git a/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-delegate.yaml b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-delegate.yaml
new file mode 100644
index 000000000..0768287e9
--- /dev/null
+++ b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-delegate.yaml
@@ -0,0 +1,3 @@
+- hosts: all
+ roles:
+ - raw-test-delegate
diff --git a/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-localhost.yaml b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-localhost.yaml
new file mode 100644
index 000000000..8c2970229
--- /dev/null
+++ b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-localhost.yaml
@@ -0,0 +1,11 @@
+- hosts: localhost
+ roles:
+ - raw-test-localhost
+
+- hosts: 127.0.0.1
+ roles:
+ - raw-test-localhost
+
+- hosts: "::1"
+ roles:
+ - raw-test-localhost
diff --git a/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/main.yaml b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/main.yaml
new file mode 100644
index 000000000..ccdf9a422
--- /dev/null
+++ b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/main.yaml
@@ -0,0 +1,5 @@
+- include: script-delegate.yaml
+ with_items:
+ - ::1
+ - 127.0.0.1
+ - localhost
diff --git a/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/script-delegate.yaml b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/script-delegate.yaml
new file mode 100644
index 000000000..339c1b724
--- /dev/null
+++ b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-delegate/tasks/script-delegate.yaml
@@ -0,0 +1,11 @@
+- name: Raw
+ raw: echo 123
+ delegate_to: "{{ item }}"
+ register: result
+ ignore_errors: true
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'Executing local code is prohibited' in result.msg"
+ msg: Raw must fail due to local code execution restriction
diff --git a/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-localhost/tasks/main.yaml b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-localhost/tasks/main.yaml
new file mode 100644
index 000000000..5b0f8c68d
--- /dev/null
+++ b/tests/fixtures/config/remote-action-modules/git/org_project/playbooks/roles/raw-test-localhost/tasks/main.yaml
@@ -0,0 +1,10 @@
+- name: Raw
+ raw: echo 123
+ register: result
+ ignore_errors: true
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'Executing local code is prohibited' in result.msg"
+ msg: Script must fail due to local code execution restriction