|
| 1 | +# Each case is followed by mitogen_via= case to test hostvars method. |
| 2 | + |
| 3 | +- name: integration/transport_config/host_key_checking.yml |
| 4 | + hosts: tc-hkc-unset |
| 5 | + tasks: |
| 6 | + - include_tasks: ../_mitogen_only.yml |
| 7 | + - {mitogen_get_stack: {}, register: out} |
| 8 | + - assert: |
| 9 | + that: |
| 10 | + - out.result | length == 1 |
| 11 | + - out.result[0].method == "ssh" |
| 12 | + - out.result[0].kwargs.check_host_keys == "ignore" |
| 13 | + fail_msg: out={{ out }} |
| 14 | + tags: |
| 15 | + - mitogen_only |
| 16 | + |
| 17 | +- hosts: tc-hkc-unset |
| 18 | + vars: |
| 19 | + mitogen_via: tc-hkc-host-key-checking |
| 20 | + tasks: |
| 21 | + - include_tasks: ../_mitogen_only.yml |
| 22 | + - {mitogen_get_stack: {}, register: out} |
| 23 | + - assert: |
| 24 | + that: |
| 25 | + - out.result | length == 2 |
| 26 | + - out.result[0].method == "ssh" |
| 27 | + - out.result[0].kwargs.check_host_keys == "enforce" |
| 28 | + - out.result[1].method == "ssh" |
| 29 | + - out.result[1].kwargs.check_host_keys == "ignore" |
| 30 | + fail_msg: out={{ out }} |
| 31 | + tags: |
| 32 | + - mitogen_only |
| 33 | + |
| 34 | + |
| 35 | +- hosts: tc-hkc-host-key-checking |
| 36 | + tasks: |
| 37 | + - include_tasks: ../_mitogen_only.yml |
| 38 | + - {mitogen_get_stack: {}, register: out} |
| 39 | + - assert: |
| 40 | + that: |
| 41 | + - out.result | length == 1 |
| 42 | + - out.result[0].method == "ssh" |
| 43 | + - out.result[0].kwargs.check_host_keys == "enforce" |
| 44 | + fail_msg: out={{ out }} |
| 45 | + tags: |
| 46 | + - mitogen_only |
| 47 | + |
| 48 | +- hosts: tc-hkc-host-key-checking |
| 49 | + vars: |
| 50 | + mitogen_via: tc-hkc-unset |
| 51 | + tasks: |
| 52 | + - include_tasks: ../_mitogen_only.yml |
| 53 | + - {mitogen_get_stack: {}, register: out} |
| 54 | + - assert: |
| 55 | + that: |
| 56 | + - out.result | length == 2 |
| 57 | + - out.result[0].method == "ssh" |
| 58 | + - out.result[0].kwargs.check_host_keys == "ignore" |
| 59 | + - out.result[1].method == "ssh" |
| 60 | + - out.result[1].kwargs.check_host_keys == "enforce" |
| 61 | + fail_msg: out={{ out }} |
| 62 | + tags: |
| 63 | + - mitogen_only |
| 64 | + |
| 65 | + |
| 66 | +- hosts: tc-hkc-ssh-host-key-checking |
| 67 | + tasks: |
| 68 | + - include_tasks: ../_mitogen_only.yml |
| 69 | + - {mitogen_get_stack: {}, register: out} |
| 70 | + - assert: |
| 71 | + that: |
| 72 | + - out.result | length == 1 |
| 73 | + - out.result[0].method == "ssh" |
| 74 | + - out.result[0].kwargs.check_host_keys == "enforce" |
| 75 | + fail_msg: out={{ out }} |
| 76 | + tags: |
| 77 | + - mitogen_only |
| 78 | + |
| 79 | +- hosts: tc-hkc-ssh-host-key-checking |
| 80 | + vars: |
| 81 | + mitogen_via: tc-hkc-unset |
| 82 | + tasks: |
| 83 | + - include_tasks: ../_mitogen_only.yml |
| 84 | + - {mitogen_get_stack: {}, register: out} |
| 85 | + - assert: |
| 86 | + that: |
| 87 | + - out.result | length == 2 |
| 88 | + - out.result[0].method == "ssh" |
| 89 | + - out.result[0].kwargs.check_host_keys == "ignore" |
| 90 | + - out.result[1].method == "ssh" |
| 91 | + - out.result[1].kwargs.check_host_keys == "enforce" |
| 92 | + fail_msg: out={{ out }} |
| 93 | + tags: |
| 94 | + - mitogen_only |
0 commit comments