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

Support dict keys in patterns #27

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

lkubb
Copy link
Member

@lkubb lkubb commented Dec 12, 2023

What does this PR do?

Adds support for using dict keys in patterns.

Example pillar:

roles:
  web:
    some: config
  mail:
    other: stuff

Example pattern:

vault:
  policies:
    assign:
      - salt_minion
      - 'salt_role_{pillar[roles]}'

Example output:

- salt_minion
- salt_role_web
- salt_role_mail

What issues does this PR fix or reference?

Fixes: #26

Previous Behavior

Renders the whole dictionary as a single policy

New Behavior

Renders dictionary keys like lists

Merge requirements satisfied?

Commits signed with GPG?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants