diff --git a/test/integration/targets/nxos_logging/tasks/main.yaml b/test/integration/targets/nxos_logging/tasks/main.yaml index 4b0f8c64d9..f6c7fec17e 100644 --- a/test/integration/targets/nxos_logging/tasks/main.yaml +++ b/test/integration/targets/nxos_logging/tasks/main.yaml @@ -1,3 +1,13 @@ --- -- { include: cli.yaml, tags: ['cli'] } -- { include: nxapi.yaml, tags: ['nxapi'] } +# Use block to ensure that the baude rate gets set +# back to 9600 even if there are failures or errors. +- block: + - { include: cli.yaml, tags: ['cli'] } + - { include: nxapi.yaml, tags: ['nxapi'] } + always: + - name: Set Baud Rate Back to 9600 so our tests don't break + nxos_config: + lines: + - speed 9600 + parents: line console + connection: network_cli diff --git a/test/integration/targets/nxos_logging/tests/common/basic.yaml b/test/integration/targets/nxos_logging/tests/common/basic.yaml index 1e60b4e0ea..6e490b5d3a 100644 --- a/test/integration/targets/nxos_logging/tests/common/basic.yaml +++ b/test/integration/targets/nxos_logging/tests/common/basic.yaml @@ -3,6 +3,15 @@ - debug: msg="Using provider={{ connection.transport }}" when: ansible_connection == "local" +# This task is needed to clear out any previous logfile +# size settings. +- name: Workaround to clear logging logfile size + nxos_config: + lines: + - logging logfile test 1 size 4194304 + provider: "{{ connection }}" + ignore_errors: yes + - name: Set up console logging nxos_logging: &clog dest: console @@ -46,7 +55,7 @@ - name: Set Baud Rate to less than 38400 nxos_config: lines: - - speed 9600 + - speed 19200 parents: line console provider: "{{ connection }}"