summaryrefslogtreecommitdiffstats
path: root/ansible_collections/inspur/sm/playbooks/modules/examples-edit_vlan.yml
blob: 2b2aa001fe78bd96f93cec4e581224f45a1715ac (plain)
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: vlan test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "set vlan information"
    inspur.sm.edit_vlan:
      interface_name: "eth0"
      vlan_status: "disable"
      provider: "{{ ism }}"

  - name: "set vlan information"
    inspur.sm.edit_vlan:
      interface_name: "eth0"
      vlan_status: "enable"
      vlan_id: 2
      vlan_priority: 1
      provider: "{{ ism }}"