less than 1 minute read

How to set persistent fact in Tower?

The playbook set_fact task must set “cacheable: true”

  - name: set cached fact
      my_var1: 'this is a fact'
      my_var2: 'it is cacheable'
      cacheable: true

In Tower, check option “Use Fact Cache” for the job template. The facts will be store with the host.

To retrieve the stored facts, recall the hostvars.

  - name: Get cached fact
      msg: "The cached fact are:   "

Leave a comment