You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.6 KiB
YAML
95 lines
2.6 KiB
YAML
7 months ago
|
# Each case is followed by mitogen_via= case to test hostvars method.
|
||
|
|
||
|
- name: integration/transport_config/host_key_checking.yml
|
||
|
hosts: tc-hkc-unset
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 1
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "ignore"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|
||
|
|
||
|
- hosts: tc-hkc-unset
|
||
|
vars:
|
||
|
mitogen_via: tc-hkc-host-key-checking
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 2
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "enforce"
|
||
|
- out.result[1].method == "ssh"
|
||
|
- out.result[1].kwargs.check_host_keys == "ignore"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|
||
|
|
||
|
|
||
|
- hosts: tc-hkc-host-key-checking
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 1
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "enforce"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|
||
|
|
||
|
- hosts: tc-hkc-host-key-checking
|
||
|
vars:
|
||
|
mitogen_via: tc-hkc-unset
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 2
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "ignore"
|
||
|
- out.result[1].method == "ssh"
|
||
|
- out.result[1].kwargs.check_host_keys == "enforce"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|
||
|
|
||
|
|
||
|
- hosts: tc-hkc-ssh-host-key-checking
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 1
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "enforce"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|
||
|
|
||
|
- hosts: tc-hkc-ssh-host-key-checking
|
||
|
vars:
|
||
|
mitogen_via: tc-hkc-unset
|
||
|
tasks:
|
||
|
- include_tasks: ../_mitogen_only.yml
|
||
|
- {mitogen_get_stack: {}, register: out}
|
||
|
- assert:
|
||
|
that:
|
||
|
- out.result | length == 2
|
||
|
- out.result[0].method == "ssh"
|
||
|
- out.result[0].kwargs.check_host_keys == "ignore"
|
||
|
- out.result[1].method == "ssh"
|
||
|
- out.result[1].kwargs.check_host_keys == "enforce"
|
||
|
fail_msg: out={{ out }}
|
||
|
tags:
|
||
|
- mitogen_only
|