user_group

Define secondary group for a user.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
loginUser login.

This parameter is required.
group_nameSecondary group name for the user.

This parameter is required.

Outcome conditions

You need to replace ${login} with its actual canonified value.

  • ✅ Ok: user_group_${login}_ok
    • ☑️ Already compliant: user_group_${login}_kept
    • 🟨 Repaired: user_group_${login}_repaired
  • ❌ Error: user_group_${login}_error

Example

method: user_group
params:
  login: VALUE
  group_name: VALUE

Documentation

Ensure that a user is within a group

Behavior

Ensure that the user belongs in the given secondary group (non-exclusive)

Parameters

login : the user login group_name: secondary group name the user should belong to (non-exclusive)

Examples

To ensure that user test belongs in group dev

 user_group("test", "dev")

Note that it will make sure that user test is in group dev, but won't remove it from other groups it may belong to