-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpalo-create-security-rule.yaml
36 lines (33 loc) · 1.02 KB
/
palo-create-security-rule.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
# FILENAME
# playbook to create a new policy and apply to the firewall
## DESCRIPTION
# Example playbook that will connect to the firewall using credentials provided saved in either host.yaml or vars.yaml files and create security rule
## REQUIREMENTS
# pip install ansible
# ansible-galaxy install PaloAltoNetworks.paloaltonetworks
## EXECUTE
# ansible-playbook palo-create-security-rule.yaml
---
- name: Palo Alto Provision
hosts: PA-FW-01
connection: local
collections:
- paloaltonetworks.panos
tasks:
- name: Add test rule 1 to the firewall
panos_security_rule:
provider: "{{ provider }}"
rule_name: 'Ansible-test-1'
description: 'An Ansible test rule'
source_zone: ['internal']
destination_zone: ['external']
source_ip: ['1.2.3.4']
source_user: ['any']
destination_ip: ['any']
category: ['any']
application: ['any']
service: ['service-http']
hip_profiles: ['any']
action: 'allow'
commit: False
...