2017-08-02 21:57:58 +02:00
|
|
|
---
|
|
|
|
- name: Running with fact caching enabled but with cache flushed
|
|
|
|
hosts: localhost
|
|
|
|
tasks:
|
|
|
|
- name: show ansible_foobar fact
|
|
|
|
debug:
|
|
|
|
var: ansible_foobar
|
|
|
|
|
|
|
|
- name: assert ansible_foobar is correct value
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_foobar is undefined
|
|
|
|
|
|
|
|
- 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
|
2020-11-03 14:51:31 +01:00
|
|
|
|
|
|
|
- name: show ansible_foobar fact (FQCN)
|
|
|
|
debug:
|
|
|
|
var: ansible_foobar_fqcn
|
|
|
|
|
|
|
|
- name: assert ansible_foobar is correct value (FQCN)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_foobar_fqcn is undefined
|
|
|
|
|
|
|
|
- name: show ansible_foobar_not_cached fact (FQCN)
|
|
|
|
debug:
|
|
|
|
var: ansible_foobar_fqcn_not_cached
|
|
|
|
|
|
|
|
- name: assert ansible_foobar_not_cached is not cached (FQCN)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_foobar_fqcn_not_cached is undefined
|