You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
395 B
17 lines
395 B
---
|
|
|
|
- name: A cacheable fact can be defined and used between invocations / playbooks
|
|
gather_facts: no
|
|
hosts: localhost
|
|
tasks:
|
|
- debug:
|
|
var: myfact456
|
|
- set_fact:
|
|
myfact456: test
|
|
cacheable: true
|
|
when: myfact456 is not defined
|
|
- assert:
|
|
that:
|
|
- "myfact456 == 'test'"
|
|
- "'myfact456' in ansible_facts"
|
|
- "ansible_facts.myfact456 == 'test'"
|
|
|