File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # ` sshd ` promise type
2-
31Configures sshd and restarts the service when configuration changes.
42
53## Promiser
4+
65The sshd configuration keyword to manage (e.g. ` PermitRootLogin ` , ` AllowUsers ` ).
76Each promise manages a single directive in the drop-in config file.
87
98## Attributes
9+
1010- ` value ` (required) — the value for the directive, either a string or an slist
1111
1212## What the module manages internally
13+
13141 . ** Include directive** — ensures the base ` sshd_config ` includes the drop-in directory (` sshd_config.d/ ` ) as its first non-comment directive
14152 . ** Drop-in directory** — creates the drop-in directory if it doesn't exist
15163 . ** Drop-in file** — writes directives to ` sshd_config.d/00-cfengine.conf `
16174 . ** Service restart** — restarts sshd if configuration was changed and the service is already running
17185 . ** Verification** — verifies the desired directive appears in the effective sshd config (` sshd -T ` )
1819
1920## Conflicting promisers
21+
2022Having multiple promises with the same sshd keyword is not recommended.
2123In case of conflicting promisers, the agent will attempt to converge the correct state for each one in the order they are evaluated.
2224This means the last promise wins and determines the final value in the configuration file.
2325It will also cause multiple restarts of the sshd service, which may be disruptive.
2426
2527## What the module does NOT do
28+
2629- Install sshd — that is a ` packages: ` promise
2730- Ensure sshd is running — that is a ` services: ` promise
2831- Manage match blocks — those are a policy-level concern
2932
3033## Policy
34+
3135``` cf3
3236bundle agent sshd_config
3337{
You can’t perform that action at this time.
0 commit comments