-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ansible local fact management template
- Loading branch information
Showing
4 changed files
with
9 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% if __ansible__local_facts is defined %} | ||
{{ __ansible__local_facts | to_nice_json }} | ||
{% else %} | ||
{ | ||
} | ||
{% endif %} | ||
{% set facts_ansible_settled = ansible_local[ansible__local_fact_name] | default({}) %} | ||
{% set facts_role_settled = ansible__local_facts | default({}) %} | ||
{% set facts_role_update_settled = ansible__update_local_facts | default({}) %} | ||
{% set list_merge_strategy = ansible__local_fact_list_merge_strategy | default('prepend') %} | ||
{% set final_local_facts = facts_ansible_settled | combine(facts_role_settled, facts_role_update_settled, recursive=true, list_merge=list_merge_strategy) %} | ||
{{ final_local_facts | to_nice_json }} |