Fix Include_vars example (#69966)

* Remove incorrect var in first_found docs
* Fix include_vars example using lookup
pull/70032/head
Falcon Taylor-Carter 6 years ago committed by GitHub
parent 8c3eb7ae4a
commit f5df702b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,12 +95,15 @@ EXAMPLES = r'''
when: x == 0
- name: Load a variable file based on the OS type, or a default if not found. Using free-form to specify the file.
include_vars: "{{ lookup('first_found', possible_files) }}"
include_vars: "{{ lookup('first_found', params) }}"
vars:
possible_files:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- default.yaml
params:
files:
- '{{ansible_distribution}}.yaml'
- '{{ansible_os_family}}.yaml'
- default.yaml
paths:
- 'vars'
- name: Bare include (free-form)
include_vars: myvars.yaml

@ -88,7 +88,7 @@ EXAMPLES = """
vars:
params:
files:
- '{{ansible_os_distribution}}.yml'
- '{{ansible_distribution}}.yml'
- '{{ansible_os_family}}.yml'
- default.yml
paths:

Loading…
Cancel
Save