Skip to content

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

Open
@BigBadBassMan

Description

@BigBadBassMan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions