cancel
Showing results for 
Search instead for 
Did you mean: 
spurs
Flight Engineer
Flight Engineer
  • 284 Views

ansible custom fact file

Jump to solution

Hi 

if i create the custom fact file in /etc/ansible/facts.d/custom.fact

custom.fact is like this

[general]

package = httpd

service = httpd

state = started

enabled = true

 

The package variable will be like

{{ ansible_facts['ansible_local']['custom']['general']['package']

i think this bold part is default, but is [custom] name of the file?

 

Assume that filename is example then should variable be like 

{{ ansible_facts['ansible_local']['example']['general']['package']

Labels (1)
1 Solution
2 Replies
spurs
Flight Engineer
Flight Engineer
  • 172 Views

Thank you so much!

Join the discussion
You must log in to join this conversation.