From c0828bb77e5da5f12c4adf3dc1e5edbef2f27790 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Fri, 26 Jun 2020 01:47:12 +0000 Subject: [PATCH] [service_acl] Wait until SSH is stopped rather than waiting for start to timeout --- ansible/roles/test/tasks/service_acl.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ansible/roles/test/tasks/service_acl.yml b/ansible/roles/test/tasks/service_acl.yml index ad4aca4dd06..0fa0e99046e 100644 --- a/ansible/roles/test/tasks/service_acl.yml +++ b/ansible/roles/test/tasks/service_acl.yml @@ -21,20 +21,14 @@ become: true shell: "nohup /tmp/config_service_acls.sh < /dev/null > /dev/null 2>&1 &" -- name: Sleep a bit to allow config_service_acls.sh to apply the new service ACLs - pause: - seconds: 5 - - name: Ensure the SSH port on the DuT becomes closed to us local_action: wait_for args: host: "{{ ansible_host }}" port: 22 - state: started + state: stopped search_regex: "OpenSSH" timeout: 10 - register: result - failed_when: "'Timeout when waiting for search string OpenSSH' not in result.msg" # Gather facts with SNMP version 2 - name: Ensure attempt to gather basic SNMP facts about the device now times out