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

lookup indicator_exclusions from hiera #127

Closed
vchepkov opened this issue May 6, 2022 · 3 comments · Fixed by #205
Closed

lookup indicator_exclusions from hiera #127

vchepkov opened this issue May 6, 2022 · 3 comments · Fixed by #205
Labels
enhancement New feature or request

Comments

@vchepkov
Copy link
Contributor

vchepkov commented May 6, 2022

Use Case

It would be convenient to be able to store indicator_exclusions in plan hiera
so instead of having to list exclusions in the command line
bolt plan run pe_status_check::infra_summary indicator_exclusions='["S0035"]'
plan could lookup pe_status_check::indicator_exclusions from hiera, similar to the class behavior

@vchepkov vchepkov added the enhancement New feature or request label May 6, 2022
@MartyEwings
Copy link
Collaborator

thanks for the input @vchepkov we will look into this as a feature

@MartyEwings
Copy link
Collaborator

opened sup-3709 for this

@m0dular
Copy link
Contributor

m0dular commented Oct 9, 2023

Spent some time on this today with @Aaronoftheages, and it should be possible to do this with the caveat of having to add the data to a static.yaml at the environment layer. For example, add this to hiera.yaml in Production at /etc/puppetlabs/code/environments/production/data/common.yaml

plan_hierarchy:
  - name: "Static data"
    path: "static.yaml"
    data_hash: yaml_data

Then add the data to static.yaml in production at /etc/puppetlabs/code/environments/production/data/static.yaml, for example

pe_status_check::indicator_exclusions:
  - 'S0001'
  - 'S0003'

Then the data can be looked up. If that works, then @Aaronoftheages you should be able to change the parameter in the two plans to be:

lookup('pe_status_check::indicator_exclusions', undef, undef, [])

and add something to the README about how this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants