You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a trusted fact to the inventory page. As an example, I want "pp_role" to show on the inventory page.
Output from the "facts" page
trusted :
{
"domain": "example.org",
"certname": "test.server.example.org",
"external": {},
"hostname": "test",
"extensions": {
"pp_role": "server",
being clueless I've tried adding the following in the "settings.py" section:
I'm trying to add a trusted fact to the inventory page. As an example, I want "pp_role" to show on the inventory page.
Output from the "facts" page
trusted :
{
"domain": "example.org",
"certname": "test.server.example.org",
"external": {},
"hostname": "test",
"extensions": {
"pp_role": "server",
being clueless I've tried adding the following in the "settings.py" section:
INVENTORY_FACTS =
...,
('Role', 'role'),
...,
INVENTORY_FACT_TEMPLATES =
...,
'role': "{{ value.trusted['extensions']['pp_role'] }}",
...,
Other things i've tried:
'role': "{{ value.trusted.extensions.pp_role' }}",
'role': "{{ value.pp_role' }}",
Any advice/help/Guidance is appreciated.
EDIT: whoops corrected for 'role"
I added:
INVENTORY_FACTS = [('Hostname', 'trusted'),
...,
('Role', 'trusted'),
...,
INVENTORY_FACT_TEMPLATES =
'trusted': (
...,
"""{{value.hostname}}"""
...,
'trusted': "{{ value.extensions.pp_role }}",
Now both "hostname and role" have the same value -> the role value
The text was updated successfully, but these errors were encountered: