-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpalo-add-vwire-interfaces.yaml
51 lines (46 loc) · 1.26 KB
/
palo-add-vwire-interfaces.yaml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## PLAYBOOK
# Playbook to create virtual wire interfaces
## DESCRIPTION
# Example playbook that will connect to the firewall using credentials provided saved in host var file
## REQUIREMENTS
# pip install ansible
# ansible-galaxy install PaloAltoNetworks.paloaltonetworks
## EXECUTE
# ansible-playbook palo-add-vwire-interfaces.yaml
---
- name: Configure eth1/1 and eth1/2 in Vwire mode
hosts: PA-VM-02
connection: local
gather_facts: False
collections:
- paloaltonetworks.panos
tasks:
- name: Set ethernet1/1 in virtual-wire mode
panos_interface:
provider: '{{ provider }}'
if_name: "ethernet1/1"
mode: "virtual-wire"
zone_name: "external"
enable_dhcp: false
vr_name:
- name: Set ethernet1/2 in virtual-wire mode
panos_interface:
provider: '{{ provider }}'
if_name: "ethernet1/2"
mode: "virtual-wire"
enable_dhcp: false
zone_name: "internal"
vr_name:
- name: Create Vwire
panos_virtual_wire:
provider: '{{ provider }}'
name: 'vwire1'
interface1: 'ethernet1/1'
interface2: 'ethernet1/2'
tag: 100
multicast: 'true'
pass_through: 'true'
- name: Commit the changes to the firewall
panos_commit:
provider: '{{ provider }}'
...