mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user