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/hosts_field/test_hosts_field.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream.tar.xz ansible-core-upstream.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/hosts_field/test_hosts_field.yml')
-rw-r--r-- | test/integration/targets/hosts_field/test_hosts_field.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/integration/targets/hosts_field/test_hosts_field.yml b/test/integration/targets/hosts_field/test_hosts_field.yml new file mode 100644 index 0000000..568d702 --- /dev/null +++ b/test/integration/targets/hosts_field/test_hosts_field.yml @@ -0,0 +1,62 @@ +--- +#- name: Host in playbook is an integer +# hosts: 42 +# tags: numeric_host +# tasks: +# - command: echo 'Running on {{ inventory_hostname }}' + +#- name: Host in playbook is a string of digits +# hosts: "42" +# tags: string_digit_host +# tasks: +# - command: echo 'Running on {{ inventory_hostname }}' + +#- name: Host in playbook is a list of integer +# hosts: +# - 42 +# tags: numeric_host_in_list +# tasks: +# - command: echo 'Running on {{ inventory_hostname }}' + +- name: Host in playbook is a list of strings of digits + hosts: + - "42" + gather_facts: False + tags: string_digit_host_in_list + tasks: + - command: echo 'Running on {{ inventory_hostname }}' + +- name: Hosts taken from kv extra_var on the CLI + hosts: "{{ target_kv }}" + gather_facts: False + tags: hosts_from_kv_string + tasks: + - command: echo 'Running on {{ inventory_hostname }}' + +- name: Hosts taken from a json string on the CLI + hosts: "{{ target_json_cli }}" + gather_facts: False + tags: hosts_from_cli_json_string + tasks: + - command: echo 'Running on {{ inventory_hostname }}' + +- name: Hosts taken from a json list on the CLI + hosts: "{{ target_json_cli_list }}" + gather_facts: False + tags: hosts_from_cli_json_list + tasks: + - command: echo 'Running on {{ inventory_hostname }}' + +- name: Hosts is taken from a json string in an extra_vars file + hosts: "{{ target_json_file }}" + gather_facts: False + tags: hosts_from_json_file_string + tasks: + - command: echo 'Running on {{ inventory_hostname }}' + +- name: Hosts is taken from a json list in an extra_vars file + hosts: "{{ target_json_file_list }}" + gather_facts: False + tags: hosts_from_json_file_list + tasks: + - command: echo 'Running on {{ inventory_hostname }}' |