Skip to content

Fix improper 'local_action' syntax #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions ansible/boot_onie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,37 @@
real_ansible_host: "{{ ansible_ssh_host }}"

- name: Wait for switch to come back (to ONIE)
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: started
delay: 60
timeout: 300
become: false
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: started
delay: 60
timeout: 300
changed_when: false

- name: Wait for switch to reboot again
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: stopped
delay: 5
timeout: 600
become: false
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: stopped
delay: 5
timeout: 600
changed_when: false

- name: Wait for switch to come back (to SONiC)
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
delay: 30
timeout: 600
become: false
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
delay: 30
timeout: 600
changed_when: false

- name: Wait for the SONiC initialization process
Expand Down
14 changes: 7 additions & 7 deletions ansible/roles/sonic-common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@
tags: unsafe

- name: After rebooting, wait for switch to come back
local_action:
wait_for:
host: "{{ inventory_hostname }}"
port: 22
state: started
delay: 30
timeout: 300
become: false
local_action: wait_for
args:
host: "{{ inventory_hostname }}"
port: 22
state: started
delay: 30
timeout: 300
when: reboot_required is defined
tags: unsafe
16 changes: 8 additions & 8 deletions ansible/roles/test/tasks/common_tasks/reboot_sonic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
pause: minutes=1

- name: Wait for switch to come back
local_action:
wait_for:
host: "{{ ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH_[\w\.]+ Debian"
delay: 10
timeout: 180
become: false
local_action: wait_for
args:
host: "{{ ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH_[\w\.]+ Debian"
delay: 10
timeout: 180
changed_when: false

- name: wait for 2 minute for prcesses and interfaces to be stable
Expand Down
26 changes: 13 additions & 13 deletions ansible/roles/test/tasks/service_acl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
# Note that the timeout here should be sufficiently long enough to allow
# config_service_acls.sh to apply the new service ACLs
- name: Ensure the SSH port on the DuT becomes closed to us
local_action:
wait_for:
host: "{{ ansible_host }}"
port: 22
state: stopped
timeout: 15
local_action: wait_for
args:
host: "{{ ansible_host }}"
port: 22
state: stopped
timeout: 15

# Gather facts with SNMP version 2
- name: Ensure attempt to gather basic SNMP facts about the device now times out
Expand All @@ -51,13 +51,13 @@
# Note that the timeout here should be sufficiently long enough to allow
# config_service_acls.sh to reset the ACLs to their original configuration
- name: Wait until the original service ACLs are reinstated and the SSH port on the DUT is open to us once again
local_action:
wait_for:
host: "{{ ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
timeout: 60
local_action: wait_for
args:
host: "{{ ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
timeout: 60

- name: Delete config_service_acls.sh from the DuT
become: true
Expand Down
44 changes: 22 additions & 22 deletions ansible/upgrade_sonic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
ignore_errors: true

- name: Wait for switch to come back (to ONIE)
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: started
delay: 60
timeout: 300
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: started
delay: 60
timeout: 300
changed_when: false

- name: Stop onie discovery
Expand All @@ -55,13 +55,13 @@
ignore_errors: true

- name: Wait for switch to reboot again (ONIE installation finishes)
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: stopped
delay: 5
timeout: 600
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: stopped
delay: 5
timeout: 600
changed_when: false

when: upgrade_type == "onie"
Expand All @@ -86,14 +86,14 @@
when: upgrade_type == "sonic"

- name: Wait for switch {{ inventory_hostname }} to come back (to SONiC)
local_action:
wait_for:
host: "{{ real_ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
delay: 30
timeout: 600
local_action: wait_for
args:
host: "{{ real_ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH"
delay: 30
timeout: 600
changed_when: false

- name: Wait for SONiC initialization
Expand Down