Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDM does not recognize the facts. syntax in hiera.yaml file #17

Closed
tuxmea opened this issue Mar 25, 2022 · 2 comments
Closed

HDM does not recognize the facts. syntax in hiera.yaml file #17

tuxmea opened this issue Mar 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tuxmea
Copy link
Member

tuxmea commented Mar 25, 2022

In hiera.yaml file one can specify a fact in multiple ways.

  1. Top Scope Variable (Using :: syntax like %{::customer})
  2. Facts Hash (Using facts. syntax like %{facts.customer})

At the moment HDM only recognizes option 1.
HDM should be able to also understand and parse the option 2.

Some people might use %{::environment} in Hiera.yaml.
This is not a fact but should have the content from the selected environment.

@tuxmea tuxmea added the bug Something isn't working label Mar 25, 2022
@rwaffen
Copy link
Member

rwaffen commented Apr 11, 2022

names to get facts from in hiera.yaml:

  • facts (facts.customer)
  • server_facts (server_facts.)
  • trusted (trusted.certname)
  • :: (top scope)

hierachies can be mixed:

customer/%{facts.customer}/%{trusted.certname}.yaml

oneiros added a commit that referenced this issue May 2, 2022
@rwaffen
Copy link
Member

rwaffen commented May 3, 2022

Gültige Formulierungen

::facts.customer
facts.customer
::trusted.irgendetwas
trusted.irgendetwas

::customer

  • kann man nicht feststellen was es wirklich ist, ob nun fact oder wirklich eine top scope variable
  • erstmal ausklammern, da kompliziert zu filtern

note for betadots

(- für jedes environment alle facts für all hosts holen und alles was dort nicht genannt wird ist eine top scope variable)

oneiros added a commit that referenced this issue Jun 2, 2022
rwaffen added a commit that referenced this issue Jun 3, 2022
Interpolate facts with a `facts.` or `trusted.` scope #17
@rwaffen rwaffen closed this as completed Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants