summaryrefslogtreecommitdiffstats
path: root/test/schemas/test/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'test/schemas/test/playbooks')
-rw-r--r--test/schemas/test/playbooks/block.yml10
-rw-r--r--test/schemas/test/playbooks/defaults/foo.yml3
-rw-r--r--test/schemas/test/playbooks/environment.yml7
-rw-r--r--test/schemas/test/playbooks/failed_when.yml18
-rw-r--r--test/schemas/test/playbooks/full-jinja.yml16
-rw-r--r--test/schemas/test/playbooks/gather_facts.yml6
-rw-r--r--test/schemas/test/playbooks/gather_subset.yml15
-rw-r--r--test/schemas/test/playbooks/ignore_errors..yml9
-rw-r--r--test/schemas/test/playbooks/import_playbook.yml9
-rw-r--r--test/schemas/test/playbooks/included.yml1
-rw-r--r--test/schemas/test/playbooks/integers.yml23
-rw-r--r--test/schemas/test/playbooks/local_action_dict.yml5
-rw-r--r--test/schemas/test/playbooks/local_action_string.yml3
-rw-r--r--test/schemas/test/playbooks/loop.yml9
-rw-r--r--test/schemas/test/playbooks/no_log.yml11
-rw-r--r--test/schemas/test/playbooks/roles.yml13
-rw-r--r--test/schemas/test/playbooks/run.yml42
-rw-r--r--test/schemas/test/playbooks/run_once.yml6
-rw-r--r--test/schemas/test/playbooks/tags.yml23
-rw-r--r--test/schemas/test/playbooks/tasks.yml5
-rw-r--r--test/schemas/test/playbooks/tasks/args.yml4
-rw-r--r--test/schemas/test/playbooks/tasks/become_method.yml7
-rw-r--r--test/schemas/test/playbooks/tasks/changed_when.yml10
-rw-r--r--test/schemas/test/playbooks/tasks/diff.yml4
-rw-r--r--test/schemas/test/playbooks/tasks/empty_tasks.yml2
-rw-r--r--test/schemas/test/playbooks/tasks/ignore_errors.yml7
-rw-r--r--test/schemas/test/playbooks/tasks/local_action_dict.yml3
-rw-r--r--test/schemas/test/playbooks/tasks/local_action_string.yml1
-rw-r--r--test/schemas/test/playbooks/tasks/loop.yml6
-rw-r--r--test/schemas/test/playbooks/tasks/no_log.yml11
-rw-r--r--test/schemas/test/playbooks/tasks/notify.yml11
-rw-r--r--test/schemas/test/playbooks/tasks/run_once.yml9
-rw-r--r--test/schemas/test/playbooks/tasks/some_tasks.yml8
-rw-r--r--test/schemas/test/playbooks/tasks/tags.yml29
-rw-r--r--test/schemas/test/playbooks/tasks/templated_become.yml12
-rw-r--r--test/schemas/test/playbooks/tasks/templated_integers.yml5
-rw-r--r--test/schemas/test/playbooks/tasks/throttled.yml5
-rw-r--r--test/schemas/test/playbooks/tasks/until.yml14
-rw-r--r--test/schemas/test/playbooks/tasks/when.yml10
-rw-r--r--test/schemas/test/playbooks/tasks/with_items.yml16
-rw-r--r--test/schemas/test/playbooks/templated_become.yml16
-rw-r--r--test/schemas/test/playbooks/user_valid.yml3
-rw-r--r--test/schemas/test/playbooks/var_files.yml18
-rw-r--r--test/schemas/test/playbooks/vars/empty_vars.yml2
-rw-r--r--test/schemas/test/playbooks/vars/encrypted.yml6
-rw-r--r--test/schemas/test/playbooks/vars/myvars.yml9
-rw-r--r--test/schemas/test/playbooks/vars_prompt.yml11
-rw-r--r--test/schemas/test/playbooks/when.yml11
-rw-r--r--test/schemas/test/playbooks/with_.yml34
49 files changed, 518 insertions, 0 deletions
diff --git a/test/schemas/test/playbooks/block.yml b/test/schemas/test/playbooks/block.yml
new file mode 100644
index 0000000..631242b
--- /dev/null
+++ b/test/schemas/test/playbooks/block.yml
@@ -0,0 +1,10 @@
+- hosts: localhost
+ tasks:
+ - debug:
+ msg: task under no block
+ - block:
+ - debug:
+ msg: task under one level of block
+ - block:
+ - debug:
+ msg: task under two levels of block
diff --git a/test/schemas/test/playbooks/defaults/foo.yml b/test/schemas/test/playbooks/defaults/foo.yml
new file mode 100644
index 0000000..47d9438
--- /dev/null
+++ b/test/schemas/test/playbooks/defaults/foo.yml
@@ -0,0 +1,3 @@
+# defaults have same format as vars
+in_is_reserved: ...
+ss: ss
diff --git a/test/schemas/test/playbooks/environment.yml b/test/schemas/test/playbooks/environment.yml
new file mode 100644
index 0000000..d25fd1b
--- /dev/null
+++ b/test/schemas/test/playbooks/environment.yml
@@ -0,0 +1,7 @@
+---
+- hosts: localhost
+ environment: # <- valid
+ FOO: BAR
+
+- hosts: localhost
+ environment: "{{ foo }}" # <- valid
diff --git a/test/schemas/test/playbooks/failed_when.yml b/test/schemas/test/playbooks/failed_when.yml
new file mode 100644
index 0000000..14c942a
--- /dev/null
+++ b/test/schemas/test/playbooks/failed_when.yml
@@ -0,0 +1,18 @@
+- hosts: localhost
+ tasks:
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ failed_when: false # <- valid
+
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ failed_when: "string is valid too" # <- valid
+
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ failed_when: # <- lists are valid too
+ - foo
+ - bar
diff --git a/test/schemas/test/playbooks/full-jinja.yml b/test/schemas/test/playbooks/full-jinja.yml
new file mode 100644
index 0000000..22eaafe
--- /dev/null
+++ b/test/schemas/test/playbooks/full-jinja.yml
@@ -0,0 +1,16 @@
+---
+- name: Test that schema allows multiline-jinja
+ hosts: localhost
+ # https://github.com/ansible/ansible-lint/issues/2772
+ become: >-
+ {{
+ true
+ }}
+ tasks:
+ - name: Test more complex jinja is also allowed
+ ansible.builtin.debug:
+ msg: "{{ item }}"
+ # that below is valid and show be allowed:
+ with_items: >-
+ {%- set ns = [1, 1, 2] -%}
+ {{- ns | unique -}}
diff --git a/test/schemas/test/playbooks/gather_facts.yml b/test/schemas/test/playbooks/gather_facts.yml
new file mode 100644
index 0000000..598188d
--- /dev/null
+++ b/test/schemas/test/playbooks/gather_facts.yml
@@ -0,0 +1,6 @@
+---
+- hosts: localhost
+ gather_facts: false
+ tasks:
+ - ansible.builtin.debug:
+ msg: foo
diff --git a/test/schemas/test/playbooks/gather_subset.yml b/test/schemas/test/playbooks/gather_subset.yml
new file mode 100644
index 0000000..de0e689
--- /dev/null
+++ b/test/schemas/test/playbooks/gather_subset.yml
@@ -0,0 +1,15 @@
+---
+- hosts: localhost
+ gather_subset:
+ - all
+ - "!network"
+ tasks:
+ - ansible.builtin.debug:
+ msg: foo
+
+- hosts: localhost
+ gather_subset:
+ - all
+ tasks:
+ - ansible.builtin.debug:
+ msg: bar
diff --git a/test/schemas/test/playbooks/ignore_errors..yml b/test/schemas/test/playbooks/ignore_errors..yml
new file mode 100644
index 0000000..6c92046
--- /dev/null
+++ b/test/schemas/test/playbooks/ignore_errors..yml
@@ -0,0 +1,9 @@
+- hosts: localhost
+ tasks:
+ - command: echo 123
+ ignore_errors: true
+
+ - command: echo 123
+ vars:
+ should_ignore_errors: true
+ ignore_errors: "{{ should_ignore_errors }}"
diff --git a/test/schemas/test/playbooks/import_playbook.yml b/test/schemas/test/playbooks/import_playbook.yml
new file mode 100644
index 0000000..efd8787
--- /dev/null
+++ b/test/schemas/test/playbooks/import_playbook.yml
@@ -0,0 +1,9 @@
+- ansible.builtin.import_playbook: other.yml
+
+- import_playbook: other.yml
+ tags:
+ - foo
+
+- import_playbook: other.yml
+ when:
+ - foo is true
diff --git a/test/schemas/test/playbooks/included.yml b/test/schemas/test/playbooks/included.yml
new file mode 100644
index 0000000..468a17c
--- /dev/null
+++ b/test/schemas/test/playbooks/included.yml
@@ -0,0 +1 @@
+- hosts: localhost
diff --git a/test/schemas/test/playbooks/integers.yml b/test/schemas/test/playbooks/integers.yml
new file mode 100644
index 0000000..861acee
--- /dev/null
+++ b/test/schemas/test/playbooks/integers.yml
@@ -0,0 +1,23 @@
+---
+- hosts: localhost
+ vars:
+ some: 0
+ gather_timeout: "{{ some }}"
+ tasks:
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ async: 0
+ poll: 0
+ delay: 0
+ timeout: 0
+ port: 0
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ async: "{{ some }}"
+ poll: "{{ some }}"
+ delay: "{{ some }}"
+ timeout: "{{ some }}"
+ port: "{{ some }}"
+
+- hosts: localhost
+ gather_timeout: 0
diff --git a/test/schemas/test/playbooks/local_action_dict.yml b/test/schemas/test/playbooks/local_action_dict.yml
new file mode 100644
index 0000000..05b3129
--- /dev/null
+++ b/test/schemas/test/playbooks/local_action_dict.yml
@@ -0,0 +1,5 @@
+- hosts: localhost
+ tasks:
+ - local_action:
+ module: ansible.builtin.debug
+ msg: hello
diff --git a/test/schemas/test/playbooks/local_action_string.yml b/test/schemas/test/playbooks/local_action_string.yml
new file mode 100644
index 0000000..e7dacc4
--- /dev/null
+++ b/test/schemas/test/playbooks/local_action_string.yml
@@ -0,0 +1,3 @@
+- hosts: localhost
+ tasks:
+ - local_action: "ansible.builtin.debug msg=hello"
diff --git a/test/schemas/test/playbooks/loop.yml b/test/schemas/test/playbooks/loop.yml
new file mode 100644
index 0000000..c0e1734
--- /dev/null
+++ b/test/schemas/test/playbooks/loop.yml
@@ -0,0 +1,9 @@
+---
+- hosts: localhost
+ tasks:
+ - name: that should pass
+ ansible.builtin.debug:
+ var: item
+ loop:
+ - foo
+ - bar
diff --git a/test/schemas/test/playbooks/no_log.yml b/test/schemas/test/playbooks/no_log.yml
new file mode 100644
index 0000000..e1944dd
--- /dev/null
+++ b/test/schemas/test/playbooks/no_log.yml
@@ -0,0 +1,11 @@
+- hosts: localhost
+ vars:
+ some_var: true
+ tasks:
+ - ansible.builtin.debug:
+ msg: foo
+ no_log: true
+
+ - ansible.builtin.debug:
+ msg: foo
+ no_log: "{{ some_var }}"
diff --git a/test/schemas/test/playbooks/roles.yml b/test/schemas/test/playbooks/roles.yml
new file mode 100644
index 0000000..a996ce0
--- /dev/null
+++ b/test/schemas/test/playbooks/roles.yml
@@ -0,0 +1,13 @@
+- hosts: localhost
+ roles: []
+
+- hosts: localhost
+ roles:
+ - foo
+ - role: "path/to/role"
+ vars:
+ FOO: bar
+ tags:
+ - foo
+ - role: bar
+ tags: string_tag
diff --git a/test/schemas/test/playbooks/run.yml b/test/schemas/test/playbooks/run.yml
new file mode 100644
index 0000000..52e7001
--- /dev/null
+++ b/test/schemas/test/playbooks/run.yml
@@ -0,0 +1,42 @@
+- name: foo
+ ansible.builtin.import_playbook: included.yml
+
+- hosts: # to check if lists are allowed:
+ - localhost
+ - webservers
+ # validate serial allows strings like percentage value
+ serial: 10%
+ handlers:
+ - name: handler 1
+ ansible.builtin.debug:
+ msg: "I am handler 1"
+ listen: "always handler"
+
+ - name: handler 2
+ ansible.builtin.debug:
+ msg: "I am handler 2"
+ listen: # to check if lists are allowed:
+ - "list listening handler"
+ - "other listening topic"
+
+- hosts: localhost
+ serial: 1 # validate serial allows integer
+
+- hosts: localhost
+ serial: "{{ 1 }}" # jinja also ok
+
+- hosts: localhost
+ serial: # validate serial allows these too:
+ - 123
+ - 10%
+ - "{{ some }}" # jinja also ok
+
+- hosts: localhost
+ tasks:
+ - debug:
+ msg: "failed_when should accept booleans"
+ failed_when: false
+
+ - debug:
+ msg: "failed_when should allow strings"
+ failed_when: "'foo' in 'foobar'"
diff --git a/test/schemas/test/playbooks/run_once.yml b/test/schemas/test/playbooks/run_once.yml
new file mode 100644
index 0000000..be36c8e
--- /dev/null
+++ b/test/schemas/test/playbooks/run_once.yml
@@ -0,0 +1,6 @@
+- hosts: localhost
+ tasks:
+ - name: foo2
+ ansible.builtin.debug:
+ msg: foo!
+ run_once: "{{ true }}" # valid
diff --git a/test/schemas/test/playbooks/tags.yml b/test/schemas/test/playbooks/tags.yml
new file mode 100644
index 0000000..b758257
--- /dev/null
+++ b/test/schemas/test/playbooks/tags.yml
@@ -0,0 +1,23 @@
+- hosts: localhost
+ roles:
+ - role: foo
+ tags: foo # <-- allowed
+ - role: foo
+ tags: # <-- allowed
+ - foo
+ - bar
+ tags: # <-- allowed
+ - foo
+ - bar
+ tasks:
+ - ansible.builtin.debug:
+ msg: "..."
+ tags: # <-- allowed
+ - foo
+ - bar
+ - ansible.builtin.debug:
+ msg: "..."
+ tags: # <-- allowed
+ - foo
+- hosts: localhost
+ tags: foo # <-- allowed
diff --git a/test/schemas/test/playbooks/tasks.yml b/test/schemas/test/playbooks/tasks.yml
new file mode 100644
index 0000000..b01cf8c
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks.yml
@@ -0,0 +1,5 @@
+- hosts: localhost
+ pre_tasks: []
+ post_tasks: []
+ tasks: []
+ handlers: []
diff --git a/test/schemas/test/playbooks/tasks/args.yml b/test/schemas/test/playbooks/tasks/args.yml
new file mode 100644
index 0000000..1e25e1d
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/args.yml
@@ -0,0 +1,4 @@
+- action: foo
+ args: {}
+- action: foo
+ args: "{{ {} }}"
diff --git a/test/schemas/test/playbooks/tasks/become_method.yml b/test/schemas/test/playbooks/tasks/become_method.yml
new file mode 100644
index 0000000..9d63a76
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/become_method.yml
@@ -0,0 +1,7 @@
+- command: echo 123
+ become_method: sudo
+
+- command: echo 123
+ vars:
+ sudo_var: doo
+ become_method: "{{ sudo_var }}" # templating is ok
diff --git a/test/schemas/test/playbooks/tasks/changed_when.yml b/test/schemas/test/playbooks/tasks/changed_when.yml
new file mode 100644
index 0000000..7887ac7
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/changed_when.yml
@@ -0,0 +1,10 @@
+- command: echo 123
+ changed_when: false
+
+- command: echo 123
+ changed_when: '"1" in ["1", "2", "3"]'
+
+- command: echo 123
+ changed_when: # valid, all items must evaluate as true (AND)
+ - "foo is defined"
+ - '"1" in ["1", "2", "3"]'
diff --git a/test/schemas/test/playbooks/tasks/diff.yml b/test/schemas/test/playbooks/tasks/diff.yml
new file mode 100644
index 0000000..cc0bebc
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/diff.yml
@@ -0,0 +1,4 @@
+- action: foo
+ diff: true
+- action: foo
+ diff: "{{ true }}"
diff --git a/test/schemas/test/playbooks/tasks/empty_tasks.yml b/test/schemas/test/playbooks/tasks/empty_tasks.yml
new file mode 100644
index 0000000..7ee1211
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/empty_tasks.yml
@@ -0,0 +1,2 @@
+---
+# this is a valid tasks file, loaded as 'null' document.
diff --git a/test/schemas/test/playbooks/tasks/ignore_errors.yml b/test/schemas/test/playbooks/tasks/ignore_errors.yml
new file mode 100644
index 0000000..2f253f2
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/ignore_errors.yml
@@ -0,0 +1,7 @@
+- command: echo 123
+ ignore_errors: true
+
+- command: echo 123
+ vars:
+ should_ignore_errors: true
+ ignore_errors: "{{ should_ignore_errors }}"
diff --git a/test/schemas/test/playbooks/tasks/local_action_dict.yml b/test/schemas/test/playbooks/tasks/local_action_dict.yml
new file mode 100644
index 0000000..5351ab9
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/local_action_dict.yml
@@ -0,0 +1,3 @@
+- local_action:
+ module: ansible.builtin.debug
+ msg: hello
diff --git a/test/schemas/test/playbooks/tasks/local_action_string.yml b/test/schemas/test/playbooks/tasks/local_action_string.yml
new file mode 100644
index 0000000..93d98e0
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/local_action_string.yml
@@ -0,0 +1 @@
+- local_action: "ansible.builtin.debug msg=hello"
diff --git a/test/schemas/test/playbooks/tasks/loop.yml b/test/schemas/test/playbooks/tasks/loop.yml
new file mode 100644
index 0000000..33c6130
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/loop.yml
@@ -0,0 +1,6 @@
+- name: that should pass
+ ansible.builtin.debug:
+ var: item
+ loop:
+ - foo
+ - bar
diff --git a/test/schemas/test/playbooks/tasks/no_log.yml b/test/schemas/test/playbooks/tasks/no_log.yml
new file mode 100644
index 0000000..83a12d0
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/no_log.yml
@@ -0,0 +1,11 @@
+- ansible.builtin.debug:
+ msg: foo
+ no_log: true # valid
+ vars:
+ some_var: true
+
+- ansible.builtin.debug:
+ msg: foo
+ no_log: "{{ some_var }}" # valid too
+ vars:
+ some_var: true
diff --git a/test/schemas/test/playbooks/tasks/notify.yml b/test/schemas/test/playbooks/tasks/notify.yml
new file mode 100644
index 0000000..88432d9
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/notify.yml
@@ -0,0 +1,11 @@
+- name: notify single handler
+ ansible.builtin.debug:
+ msg: task with single handler
+ notify: handler1
+
+- name: notify multiple handlers
+ ansible.builtin.debug:
+ msg: task with multiple handlers
+ notify:
+ - handler1
+ - handler2
diff --git a/test/schemas/test/playbooks/tasks/run_once.yml b/test/schemas/test/playbooks/tasks/run_once.yml
new file mode 100644
index 0000000..0f3f6f7
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/run_once.yml
@@ -0,0 +1,9 @@
+- name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ run_once: true # valid
+
+- name: foo2
+ ansible.builtin.debug:
+ msg: foo!
+ run_once: "{{ true }}" # valid
diff --git a/test/schemas/test/playbooks/tasks/some_tasks.yml b/test/schemas/test/playbooks/tasks/some_tasks.yml
new file mode 100644
index 0000000..2430d52
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/some_tasks.yml
@@ -0,0 +1,8 @@
+- name: foo
+ debug:
+ msg: bar
+ delegate_facts: true
+
+- block:
+ - debug:
+ msg: "block under one level of block"
diff --git a/test/schemas/test/playbooks/tasks/tags.yml b/test/schemas/test/playbooks/tasks/tags.yml
new file mode 100644
index 0000000..a0b7454
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/tags.yml
@@ -0,0 +1,29 @@
+- command: echo 123
+ tags:
+ - foo
+ - bar
+
+- command: echo 123
+ tags: foo
+
+- block:
+ - command: echo 123
+ tags:
+ - foo
+ - bar
+
+ - command: echo 123
+ tags: foo
+ tags:
+ - foo
+ - bar
+
+- block:
+ - command: echo 123
+ tags:
+ - foo
+ - bar
+
+ - command: echo 123
+ tags: foo
+ tags: foo
diff --git a/test/schemas/test/playbooks/tasks/templated_become.yml b/test/schemas/test/playbooks/tasks/templated_become.yml
new file mode 100644
index 0000000..a8cfad3
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/templated_become.yml
@@ -0,0 +1,12 @@
+- name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ become: "{{ firewalld_become }}" # <- valid
+
+- name: foo block
+ become: "{{ firewalld_become }}" # <- valid
+ block:
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ become: "{{ firewalld_become }}" # <- valid
diff --git a/test/schemas/test/playbooks/tasks/templated_integers.yml b/test/schemas/test/playbooks/tasks/templated_integers.yml
new file mode 100644
index 0000000..59c4530
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/templated_integers.yml
@@ -0,0 +1,5 @@
+- debug:
+ msg: foo
+ retries: "{{ 2 }}" # <-- valid
+ port: "{{ 80 }}" # <-- valid
+ poll: "{{ 2 }}" # <-- valid
diff --git a/test/schemas/test/playbooks/tasks/throttled.yml b/test/schemas/test/playbooks/tasks/throttled.yml
new file mode 100644
index 0000000..e1be471
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/throttled.yml
@@ -0,0 +1,5 @@
+- action: foo
+ throttle: 1 # valid
+
+- action: foo
+ throttle: "{{ 1 }}" # valid
diff --git a/test/schemas/test/playbooks/tasks/until.yml b/test/schemas/test/playbooks/tasks/until.yml
new file mode 100644
index 0000000..2146a9d
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/until.yml
@@ -0,0 +1,14 @@
+- ansible.builtin.debug:
+ msg: "valid"
+ until: true
+
+- ansible.builtin.debug:
+ msg: "valid"
+ until:
+ - "foo not in bar"
+
+- ansible.builtin.debug:
+ msg: "valid"
+ until:
+ - "'1' in ['1', '2', '3']"
+ - "foo is not defined"
diff --git a/test/schemas/test/playbooks/tasks/when.yml b/test/schemas/test/playbooks/tasks/when.yml
new file mode 100644
index 0000000..7874329
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/when.yml
@@ -0,0 +1,10 @@
+- action: foo
+ when: true # valid
+
+- action: foo 2
+ when: foo in bar # valid
+
+- action: foo 3
+ when: # valid
+ - foo in bar
+ - apple is orange
diff --git a/test/schemas/test/playbooks/tasks/with_items.yml b/test/schemas/test/playbooks/tasks/with_items.yml
new file mode 100644
index 0000000..07c72aa
--- /dev/null
+++ b/test/schemas/test/playbooks/tasks/with_items.yml
@@ -0,0 +1,16 @@
+- command: echo 123
+ with_items: []
+
+- command: echo 123
+ with_items:
+ - 1
+ - foo
+ - {}
+ - []
+
+- command: echo 123
+ vars:
+ my_list:
+ - 1
+ - 2
+ with_items: "{{ my_list }}"
diff --git a/test/schemas/test/playbooks/templated_become.yml b/test/schemas/test/playbooks/templated_become.yml
new file mode 100644
index 0000000..518e46b
--- /dev/null
+++ b/test/schemas/test/playbooks/templated_become.yml
@@ -0,0 +1,16 @@
+---
+- hosts: localhost
+ become: "{{ firewalld_become }}" # <- valid
+ tasks:
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ become: "{{ firewalld_become }}" # <- valid
+
+ - name: foo block
+ become: "{{ firewalld_become }}" # <- valid
+ block:
+ - name: foo
+ ansible.builtin.debug:
+ msg: foo!
+ become: "{{ firewalld_become }}" # <- valid
diff --git a/test/schemas/test/playbooks/user_valid.yml b/test/schemas/test/playbooks/user_valid.yml
new file mode 100644
index 0000000..bc6a5e6
--- /dev/null
+++ b/test/schemas/test/playbooks/user_valid.yml
@@ -0,0 +1,3 @@
+- hosts: localhost
+ user: foo # <-- allowed, alias to remote_user
+ tasks: []
diff --git a/test/schemas/test/playbooks/var_files.yml b/test/schemas/test/playbooks/var_files.yml
new file mode 100644
index 0000000..2630287
--- /dev/null
+++ b/test/schemas/test/playbooks/var_files.yml
@@ -0,0 +1,18 @@
+---
+- name: var_files should accept null
+ hosts: localhost
+ vars_files: null
+
+- name: var_files should accept string
+ hosts: localhost
+ vars_files: /dev/null
+
+- name: var_files should accept array[string]
+ hosts: localhost
+ vars_files:
+ - /dev/null
+
+- name: var_files should accept array of array[string]
+ hosts: localhost
+ vars_files:
+ - ["/dev/null"]
diff --git a/test/schemas/test/playbooks/vars/empty_vars.yml b/test/schemas/test/playbooks/vars/empty_vars.yml
new file mode 100644
index 0000000..a6e3ce7
--- /dev/null
+++ b/test/schemas/test/playbooks/vars/empty_vars.yml
@@ -0,0 +1,2 @@
+---
+# Ensure we allow empty var files, matching Ansible behavior
diff --git a/test/schemas/test/playbooks/vars/encrypted.yml b/test/schemas/test/playbooks/vars/encrypted.yml
new file mode 100644
index 0000000..7808fec
--- /dev/null
+++ b/test/schemas/test/playbooks/vars/encrypted.yml
@@ -0,0 +1,6 @@
+$ANSIBLE_VAULT;1.2;AES256;dev
+66373266323161346330626137613862653935343634366636353266323966363665636266363739
+6436363237626633653139636232663131613832336266310a323766643264306436306266663930
+66666238346132373766623932356530333165613835623863653837306130383065323138333034
+6265313861613761620a393663616265633637343534346533366437653839623239396366366330
+3165
diff --git a/test/schemas/test/playbooks/vars/myvars.yml b/test/schemas/test/playbooks/vars/myvars.yml
new file mode 100644
index 0000000..8698380
--- /dev/null
+++ b/test/schemas/test/playbooks/vars/myvars.yml
@@ -0,0 +1,9 @@
+foo: bar
+_foo: bar
+foo_var_xxx: "{{ sss }}"
+in_job: ...
+nested:
+ pear: fruit
+ apple: fruit
+sso_force_handlers: ...
+force_handlers_foo: ...
diff --git a/test/schemas/test/playbooks/vars_prompt.yml b/test/schemas/test/playbooks/vars_prompt.yml
new file mode 100644
index 0000000..1bf65c3
--- /dev/null
+++ b/test/schemas/test/playbooks/vars_prompt.yml
@@ -0,0 +1,11 @@
+- name: Fixture
+ hosts: localhost
+ vars_prompt:
+ - name: username
+ prompt: What is your username?
+ private: false
+ unsafe: false
+
+ - name: password
+ prompt: What is your password?
+ default: "secret"
diff --git a/test/schemas/test/playbooks/when.yml b/test/schemas/test/playbooks/when.yml
new file mode 100644
index 0000000..93b7781
--- /dev/null
+++ b/test/schemas/test/playbooks/when.yml
@@ -0,0 +1,11 @@
+---
+- name: Test for when (passing)
+ hosts: localhost
+ gather_facts: false
+ tasks:
+ - name: Testing for when is passed a list
+ ansible.builtin.debug:
+ msg: "this is ok"
+ when:
+ - true
+ - "foo"
diff --git a/test/schemas/test/playbooks/with_.yml b/test/schemas/test/playbooks/with_.yml
new file mode 100644
index 0000000..b3a3748
--- /dev/null
+++ b/test/schemas/test/playbooks/with_.yml
@@ -0,0 +1,34 @@
+---
+# https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#with-flattened
+- hosts: localhost
+ tasks:
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_list: [] # <-- valid
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_items: [] # <-- valid
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_indexed_items: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_together: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_dict: {}
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_sequence: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_subelements: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_nested: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_random_choice: []
+ - ansible.builtin.debug:
+ msg: "{{ item }}"
+ with_fileglob: []