File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
src/ansible_creator/resources/common/patterns/sample_pattern/playbooks Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ short_description : Display weather forecast
3
+ description : This playbook retrieves and displays a weather forecast from a specific airport location
4
+ argument_specs :
5
+ weather_forecast :
6
+ short_description : Get weather forecast
7
+ description :
8
+ - Use an airport code to retrieve and display weather forecast data
9
+ author :
10
+ - developer (@developer)
11
+ options :
12
+ airport_code :
13
+ type : str
14
+ required : true
15
+ examples : |
16
+ - import_playbook: site.yml
17
+ vars:
18
+ airport_code: RDU
19
+ return : ~
Original file line number Diff line number Diff line change 11
11
12
12
- name : Ensure the airport code has been defined
13
13
ansible.builtin.validate_argument_spec :
14
- argument_spec : " {{ airport_code_argspec }}"
14
+ argument_spec : " {{ (lookup('ansible.builtin.file', filename) | from_yaml)['argument_specs']['weather_forecast']['options'] }}"
15
15
vars :
16
- airport_code_argspec :
17
- airport_code :
18
- type : str
19
- required : true
16
+ filename : " site.meta.yml"
20
17
21
18
- name : Clone the latitude longtude repo locally
22
19
ansible.scm.git_retrieve :
You can’t perform that action at this time.
0 commit comments