-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpalo-bgp-peer-group.yaml
52 lines (48 loc) · 1.32 KB
/
palo-bgp-peer-group.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
52
## PLAYBOOK
# Playbook to configure BGP Peer Group
## DESCRIPTION
# Playbook that will connect to the firewall using credentials provided saved in host var file
# add vr_name to host var file
## REQUIREMENTS
# pip install ansible
# ansible-galaxy install PaloAltoNetworks.paloaltonetworks
## EXECUTE
# ansible-playbook palo-bgp-peer-group.yaml
---
- name: Configure BGP Peer Group
hosts: PA-VM-02
connection: local
gather_facts: False
collections:
- paloaltonetworks.panos
tasks:
- name: Configure BGP Peer Group
panos_bgp_peer_group:
provider: '{{ provider }}'
state: present
name: peer-group-1
vr_name: '{{ vr_name }}'
enable: false
commit: true
- name: Update BGP Peer Group
panos_bgp_peer_group:
provider: '{{ provider }}'
state: present
name: peer-group-1
vr_name: '{{ vr_name }}'
enable: true
aggregated_confed_as_path: true
export_nexthop: use-self
import_nexthop: original
remove_private_as: false
soft_reset_with_stored_info: false
type: ebgp
commit: true
- name: Remove BGP Peer Group
panos_bgp_peer_group:
provider: '{{ provider }}'
state: absent
name: peer-group-1
vr_name: '{{ vr_name }}'
commit: true
...