test_eth_mtu.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Get running config and reload PS
  16. hosts: ethernet
  17. connection: network_cli
  18. gather_facts: no
  19. collections:
  20. - dellemc.os10
  21. vars_files:
  22. - test_vars/test_ethernet_vars.yml
  23. tasks:
  24. - name: Set facts
  25. set_fact:
  26. ansible_ssh_user: "{{ username }}"
  27. ansible_ssh_pass: "{{ password }}"
  28. tags: mtu,reload
  29. - name: View running configurations
  30. dellos10_command:
  31. commands: show interface ethernet {{ validation_port }}
  32. register: var1
  33. tags: mtu
  34. - name: Print config
  35. debug:
  36. msg: "{{ var1 }}"
  37. tags: mtu
  38. - name: Reload switch
  39. dellos10_command:
  40. commands:
  41. - command: 'reload'
  42. prompt: '\[confirm yes/no\]:?$'
  43. answer: 'yes'
  44. tags: reload