File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments