mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Reduce stormssh searches based on host (#2568)
* Reduce stormssh searches based on host Due to the stormssh searches in the whole config values, we need to reduce the search results based on the full matching of the hosts * Removed whitespaces in the blank line * Added changelog fragment and tests for the fix. * Added newline at the end of the changelog fragment * Added newline at the end of the tests * Fixed bug with name in tests * Changed assertion for the existing host * Update changelogs/fragments/2568-ssh_config-reduce-stormssh-searches-based-on-host.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Adjusted tests * New line at the end of the tests Co-authored-by: Anton Nikolaev <anikolaev@apple.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
c49a384a65
commit
1a4af9bfc3
3 changed files with 40 additions and 0 deletions
|
@ -209,6 +209,8 @@ class SSHConfig():
|
|||
hosts_removed = []
|
||||
hosts_added = []
|
||||
|
||||
hosts_result = [host for host in hosts_result if host['host'] == self.host]
|
||||
|
||||
if hosts_result:
|
||||
for host in hosts_result:
|
||||
if state == 'absent':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue