spurs

Flight Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024
01:48 AM
- 1,490 Views
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']
1 Solution
Accepted Solutions

Community Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024
07:34 PM
- 1,460 Views
2 Replies

Community Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024
07:34 PM
- 1,461 Views
spurs

Flight Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024
07:26 PM
- 1,378 Views
Thank you so much!
Join the discussion
You must log in to join this conversation.