Skip to content

Commit 2ed7799

Browse files
Sample playbook updates
1 parent 5de3477 commit 2ed7799

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
- name: Test Playbook
3+
hosts: '{{ target | default("host_labfw") }}'
4+
gather_facts: false
5+
connection: local
6+
7+
vars:
8+
device:
9+
ip_address: "{{ ip_address }}"
10+
username: "{{ username | default(omit) }}"
11+
password: "{{ password | default(omit) }}"
12+
13+
tasks:
14+
- name: Get API key
15+
paloaltonetworks.panos.panos_api_key:
16+
provider: '{{ device }}'
17+
register: auth
18+
19+
- name: Set API key for future task usage
20+
ansible.builtin.set_fact:
21+
device:
22+
api_key: '{{ auth.api_key }}'
23+
ip_address: '{{ ip_address }}'
24+
25+
- name: Get the system info
26+
paloaltonetworks.panos.panos_op:
27+
provider: '{{ device }}'
28+
cmd: 'show system info'
29+
register: res
30+
31+
- name: Show the system info
32+
ansible.builtin.debug:
33+
msg: '{{ res.stdout }}'
File renamed without changes.

0 commit comments

Comments
 (0)