Skip to content

Commit 13d23fe

Browse files
committed
sshd/README.md: formatted markdown file
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 3220bb2 commit 13d23fe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

promise-types/sshd/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,37 @@
33
Configures sshd and restarts the service when configuration changes.
44

55
## Promiser
6+
67
The sshd configuration keyword to manage (e.g. `PermitRootLogin`, `AllowUsers`).
78
Each promise manages a single directive in the drop-in config file.
89

910
## Attributes
11+
1012
- `value` (required) — the value for the directive, either a string or an slist
1113

1214
## What the module manages internally
15+
1316
1. **Include directive** — ensures the base `sshd_config` includes the drop-in directory (`sshd_config.d/`) as its first non-comment directive
1417
2. **Drop-in directory** — creates the drop-in directory if it doesn't exist
1518
3. **Drop-in file** — writes directives to `sshd_config.d/00-cfengine.conf`
1619
4. **Service restart** — restarts sshd if configuration was changed and the service is already running
1720
5. **Verification** — verifies the desired directive appears in the effective sshd config (`sshd -T`)
1821

1922
## Conflicting promisers
23+
2024
Having multiple promises with the same sshd keyword is not recommended.
2125
In case of conflicting promisers, the agent will attempt to converge the correct state for each one in the order they are evaluated.
2226
This means the last promise wins and determines the final value in the configuration file.
2327
It will also cause multiple restarts of the sshd service, which may be disruptive.
2428

2529
## What the module does NOT do
30+
2631
- Install sshd — that is a `packages:` promise
2732
- Ensure sshd is running — that is a `services:` promise
2833
- Manage match blocks — those are a policy-level concern
2934

3035
## Policy
36+
3137
```cf3
3238
bundle agent sshd_config
3339
{

0 commit comments

Comments
 (0)