Clean up some cruft
This commit is contained in:
32
playbooks/reset_port.yml
Normal file
32
playbooks/reset_port.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
- name: Reset Port
|
||||
hosts: switch01
|
||||
become_method: enable
|
||||
become: yes
|
||||
connection: network_cli
|
||||
gather_facts: no
|
||||
vars:
|
||||
switch_port: GigabitEthernet2/0/13
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Simple Debug Task
|
||||
debug:
|
||||
msg: "Hello World"
|
||||
|
||||
- name: Shut down port
|
||||
ios_interface:
|
||||
name: "{{ switch_port }}"
|
||||
enabled: False
|
||||
state: down
|
||||
delay: 20
|
||||
|
||||
- name: Pause for 5 seconds
|
||||
pause:
|
||||
seconds: 5
|
||||
|
||||
- name: Bring up port
|
||||
ios_interface:
|
||||
name: "{{ switch_port }}"
|
||||
enabled: True
|
||||
delay: 20
|
||||
|
||||
Reference in New Issue
Block a user