Skip to content

Commit

Permalink
adds host_sudoers example to the role spec reference (#46027)
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktate authored Aug 29, 2024
1 parent b453967 commit 0c8d947
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/pages/includes/role-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ spec:
# is not 'off'.
host_groups: [ubuntu, nginx, other]

# List of entries to include in a temporary sudoers file created in
# `/etc/sudoers.d`. The records are removed on session close.
host_sudoers: [
# This line will allow the login user to run `systemctl restart nginx.service`
# as root without requiring a password. The sudoers entry will be prefixed
# with the logged in username.
"ALL = (root) NOPASSWD: /usr/bin/systemctl restart nginx.service"
]

# kubernetes_groups specifies Kubernetes groups a user with this role will assume.
# You can refer to a SAML/OIDC trait via the 'external' property bag.
# This allows you to specify Kubernetes group membership in an identity manager:
Expand Down

0 comments on commit 0c8d947

Please sign in to comment.