mirror of https://github.com/ansible/ansible.git
Unfrack extra vars (#75127)
* Ensure we keep teh original path as per cli fixes #75126 Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>pull/75151/head
parent
d9eb846534
commit
60c9f045cc
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Ensure we get full path for extra vars into cliargs to avoid realpath issues after initial load.
|
@ -0,0 +1,19 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
conditions:
|
||||
- my is defined
|
||||
- my == 'var'
|
||||
- "'webservers' in groups"
|
||||
- "'web_host.example.com' in groups['webservers']"
|
||||
tasks:
|
||||
- name: Make sure all is loaded
|
||||
assert:
|
||||
that: '{{conditions}}'
|
||||
|
||||
- name: Reload inventory, forces extra vars re-eval from diff basedir
|
||||
meta: refresh_inventory
|
||||
|
||||
- name: Make sure all is loaded, again
|
||||
assert:
|
||||
that: '{{conditions}}'
|
@ -0,0 +1,3 @@
|
||||
plugin: constructed
|
||||
groups:
|
||||
webservers: inventory_hostname.startswith('web')
|
@ -0,0 +1 @@
|
||||
my: var
|
Loading…
Reference in New Issue