-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.yml
26 lines (20 loc) · 953 Bytes
/
interfaces.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- name: Example for Configuration Interfaces
hosts: test1
gather_facts: no
connection: local
tasks:
- name: ensure these interfaces are routed
comware_interface: name={{ item }} type=routed username={{ username }} password={{ password }} hostname={{ inventory_hostname }}
with_items:
- GigabitEthernet3/0
- GigabitEthernet4/0
- GigabitEthernet5/0
- GigabitEthernet6/0
- name: ensure the description for 1/0/3 is set
comware_interface: name=GigabitEthernet3/0 description='ANSIBLE CONFIGURED THIS' username={{ username }} password={{ password }} hostname={{ inventory_hostname }}
- name: ensure these interfaces are bridged
comware_interface: name={{ item }} type=bridged username={{ username }} password={{ password }} hostname={{ inventory_hostname }}
with_items:
- GigabitEthernet7/0
- GigabitEthernet8/0