diff --git a/tests/integration/targets/vyos_config/tests/cli/confirm.yaml b/tests/integration/targets/vyos_config/tests/cli/confirm.yaml index bee57869..a7a3cff4 100644 --- a/tests/integration/targets/vyos_config/tests/cli/confirm.yaml +++ b/tests/integration/targets/vyos_config/tests/cli/confirm.yaml @@ -1,56 +1,55 @@ --- - debug: msg="START cli/confirm.yaml on connection={{ ansible_connection }}" - name: setup vyos.vyos.vyos_config: lines: set system host-name {{ inventory_hostname_short }} match: none - name: configure with confirm (manual) register: result vyos.vyos.vyos_config: lines: set system host-name foo comment: confirm manual test confirm: manual confirm_timeout: 1 - assert: that: - result.changed == true - "'set system host-name foo' in result.commands" - name: verify hostname changed to foo register: hostname_after vyos.vyos.vyos_command: commands: show host name - assert: that: - "'foo' in hostname_after.stdout[0]" - name: pause to allow confirm timeout to elapse and device to revert/reboot pause: seconds: 75 - name: reset connection to avoid stale ssh channel after device reboot meta: reset_connection - name: wait until config auto-reverts (no confirmation) register: hostname_reverted vyos.vyos.vyos_command: commands: show host name retries: 18 delay: 10 until: hostname_reverted is succeeded and inventory_hostname_short in hostname_reverted.stdout[0] ignore_unreachable: true - ignore_errors: true - name: reset connection after device reboot recovery meta: reset_connection - name: teardown vyos.vyos.vyos_config: lines: set system host-name {{ inventory_hostname_short }} match: none - debug: msg="END cli/confirm.yaml on connection={{ ansible_connection }}"