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

[FEATURE] merge lookup-data into pillar-data before creating any users or user-files #233

Open
BigBadBassMan opened this issue Apr 26, 2024 · 0 comments

Comments

@BigBadBassMan
Copy link

Is your feature request related to a problem?

The users-formula:lookup allows only a limited, predefined set of default values for users. This makes writing user pillar data very tedious, when one wants to apply the same defaults over several dozen entries.

I.e. setting the default primary group to an already defined group requires one to add to each user definition a block like this:

users:
  some.user:
    # ...
    prime_group:
      name: users
      gid: 100
    # ...

Also, same goes for sudo_defaults, homedir-permissions etc.

Describe the solution you'd like

users-formula:lookup should, on execution, be merged into each separate user-definition so that one can supply global defaults via the lookup-key while stil allowing to deviate on a case-per-case basis.

Describe alternatives you've considered

Repeating the same statements all over the pillar, very tedious and error-prone.

Additional context

I have tried to use defaults.update() to enrich pillar.users but had no luck due to type confusions.

@BigBadBassMan BigBadBassMan changed the title [FEATURE] [FEATURE] merge lookup-data into pillar-data before creating any users or user-files Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant