ansible/test/integration/targets/set_fact/set_fact_cached_2.yml
Pilou 64e1593243 set_fact: handle 'cacheable=value' form (#34871)
* Ensure fact isn't cached when cacheable=val form is used

* Don't cache fact when cacheable=val form is used
2018-01-15 10:02:24 -06:00

30 lines
770 B
YAML

---
- name: A second playbook run with fact caching enabled
hosts: localhost
tasks:
- name: show ansible_foobar fact
debug:
var: ansible_foobar
- name: assert ansible_foobar is correct value when read from cache
assert:
that:
- ansible_foobar == 'foobar_from_set_fact_cacheable'
- name: show ansible_foobar_not_cached fact
debug:
var: ansible_foobar_not_cached
- name: assert ansible_foobar_not_cached is not cached
assert:
that:
- ansible_foobar_not_cached is undefined
- name: show fact_not_cached fact
debug:
var: fact_not_cached
- name: assert fact_not_cached is not cached
assert:
that:
- fact_not_cached is undefined