forked from mitogen-hq/mitogen
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Regression test for add_host with host_key_checking
refs mitogen-hq#1066
- Loading branch information
Showing
6 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/ansible/regression/issue_1066__add_host__host_key_checking.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- name: regression/issue_1066__add_host__host_key_checking.yml | ||
hosts: test-targets[0] | ||
gather_facts: false | ||
become: false | ||
vars: | ||
issue_1066_ansible_host: "{{ hostvars[groups['test-targets'][0]].ansible_host }}" | ||
tasks: | ||
# The host key might be in ~/.ssh/known_hosts. If it's removed then no | ||
# problem - test-targets hosts have host_key_checking=false. | ||
# See also: | ||
# - hosts/group_vars/test-targets.yml | ||
- name: Remove existing host keys | ||
known_hosts: | ||
name: "{{ issue_1066_ansible_host }}" | ||
state: absent | ||
delegate_to: localhost | ||
|
||
- name: Add host dynamically | ||
add_host: | ||
name: issue-1066-host | ||
ansible_host_key_checking: false | ||
ansible_host: "{{ issue_1066_ansible_host }}" | ||
delegate_to: localhost | ||
|
||
tags: | ||
- issue_1066 | ||
|
||
- name: regression/issue_1066__add_host__host_key_checking.yml | ||
hosts: issue-1066-host | ||
gather_facts: false | ||
become: false | ||
tasks: | ||
- name: Confirm new host can be reached | ||
ping: | ||
tags: | ||
- issue_1066 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters