Skip to content

Commit a6e8d38

Browse files
committed
Normalize DNS and connectivity plugin namespaces
1 parent ae54910 commit a6e8d38

20 files changed

Lines changed: 177 additions & 345 deletions

docs/guides/ssh-smoke.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ remote user. It covers:
4949
- `fs.object.find`, `fs.permission.mode`
5050
- `archive.tar`, `archive.untar`, `archive.zip`, `archive.unzip`
5151
- `transfer.upload`, `transfer.download`, `transfer.sync`
52-
- `wait.process`
53-
- `assert.disk`, `assert.tcp`
52+
- `process.wait`
53+
- `assert.disk`, `network.connectivity.port_check`
5454
- artifact capture for stdout/stderr/data
5555
- resume helpers through the normal run state store
5656

docs/plugins/generated.md

Lines changed: 59 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -613,40 +613,6 @@ with:
613613
path: /tmp/automax-demo
614614
```
615615

616-
### `assert.tcp`
617-
618-
Assert that a TCP host/port is reachable from the controller.
619-
620-
- Remote session: `false`
621-
- Dry-run support: `true`
622-
- Check mode support: `false`
623-
624-
| Parameter | Required | Type | Default | Description |
625-
|---|---:|---|---|---|
626-
| `host` | yes | `string` | | Hostname or IP address to check from the controller. |
627-
| `port` | yes | `integer` | | TCP port number. |
628-
| `connect_timeout` | no | `number` | `3` | Per-attempt TCP connect timeout in seconds. |
629-
630-
Result fields:
631-
632-
- `changed`: Whether the plugin changed the target or controller state.
633-
- `message`: Human-readable result message.
634-
- `rc`: Process or command return code when applicable.
635-
- `stdout`: Captured standard output when applicable.
636-
- `stderr`: Captured standard error when applicable.
637-
- `data`: Plugin-specific structured result data.
638-
- `data.host`: Checked host.
639-
- `data.port`: Checked TCP port.
640-
641-
Example:
642-
643-
```yaml
644-
use: assert.tcp
645-
with:
646-
host: 127.0.0.1
647-
port: 22
648-
```
649-
650616
## auditd
651617

652618
### `auditd.backlog_assert`
@@ -5862,6 +5828,8 @@ Result fields:
58625828
- `stdout`: Captured standard output when applicable.
58635829
- `stderr`: Captured standard error when applicable.
58645830
- `data`: Plugin-specific structured result data.
5831+
- `data.host`: Checked host.
5832+
- `data.port`: Checked TCP port.
58655833

58665834
Example:
58675835

@@ -5872,25 +5840,57 @@ with:
58725840
port: 22
58735841
```
58745842

5875-
### `network.dns`
5843+
### `network.connectivity.port_wait`
58765844

5877-
Configure DNS resolver settings using the backend-aware resolver implementation.
5845+
Wait for TCP or UDP connectivity from the remote target.
58785846

58795847
- Remote session: `true`
58805848
- Dry-run support: `true`
5881-
- Check mode support: `false`
5849+
- Check mode support: `true`
5850+
5851+
| Parameter | Required | Type | Default | Description |
5852+
|---|---:|---|---|---|
5853+
| `host` | yes | `string` | | Hostname or IP address to check from the controller. |
5854+
| `port` | yes | `integer` | | TCP port number. |
5855+
| `protocol` | no | `string` | `tcp` | Network protocol such as tcp or udp. |
5856+
| `timeout` | no | `number` | | Operation timeout in seconds. |
5857+
| `interval` | no | `number` | `2` | Polling interval in seconds. |
5858+
| `retries` | no | `integer` | `12` | Maximum polling attempts before a wait operation fails. |
5859+
| `sudo` | no | `boolean` | `False` | Run the remote operation through sudo -n when supported. |
5860+
5861+
Result fields:
5862+
5863+
- `changed`: Whether the plugin changed the target or controller state.
5864+
- `message`: Human-readable result message.
5865+
- `rc`: Process or command return code when applicable.
5866+
- `stdout`: Captured standard output when applicable.
5867+
- `stderr`: Captured standard error when applicable.
5868+
- `data`: Plugin-specific structured result data.
5869+
- `data.host`: Checked host.
5870+
- `data.port`: Checked TCP port.
5871+
5872+
Example:
5873+
5874+
```yaml
5875+
use: network.connectivity.port_wait
5876+
with:
5877+
host: 127.0.0.1
5878+
port: 22
5879+
```
5880+
5881+
### `network.dns.check`
5882+
5883+
Assert resolver nameserver, search and option entries from /etc/resolv.conf.
5884+
5885+
- Remote session: `true`
5886+
- Dry-run support: `true`
5887+
- Check mode support: `true`
58825888

58835889
| Parameter | Required | Type | Default | Description |
58845890
|---|---:|---|---|---|
5885-
| `backend` | no | `string` | | Operation backend such as auto, runtime, networkmanager, systemd-networkd, ifcfg, plain-file, systemd-resolved or resolvconf. |
58865891
| `nameservers` | no | `list` | | Resolver nameserver addresses. |
58875892
| `search` | no | `list` | | Resolver search domains. |
58885893
| `options` | no | `list` | | Resolver options. |
5889-
| `path` | no | `path` | | Remote or local path, depending on the plugin. |
5890-
| `nm_connection` | no | `string` | | NetworkManager connection profile used for persistent DNS changes. |
5891-
| `force` | no | `boolean` | `False` | Force the operation when supported. |
5892-
| `backup` | no | `boolean` | `False` | Create a backup before modifying an existing file. |
5893-
| `backup_suffix` | no | `string` | `.bak` | Suffix appended to the original path when backup is enabled. |
58945894
| `sudo` | no | `boolean` | `False` | Run the remote operation through sudo -n when supported. |
58955895

58965896
Result fields:
@@ -5905,26 +5905,33 @@ Result fields:
59055905
Example:
59065906

59075907
```yaml
5908-
use: network.dns
5908+
use: network.dns.check
59095909
with:
5910-
backend: auto
59115910
nameservers:
59125911
- 192.0.2.53
5912+
search:
5913+
- example.com
59135914
```
59145915

5915-
### `network.dns_assert`
5916+
### `network.dns.config`
59165917

5917-
Assert resolver nameserver, search and option entries from /etc/resolv.conf.
5918+
Configure DNS resolver settings using the backend-aware resolver implementation.
59185919

59195920
- Remote session: `true`
59205921
- Dry-run support: `true`
5921-
- Check mode support: `true`
5922+
- Check mode support: `false`
59225923

59235924
| Parameter | Required | Type | Default | Description |
59245925
|---|---:|---|---|---|
5926+
| `backend` | no | `string` | | Operation backend such as auto, runtime, networkmanager, systemd-networkd, ifcfg, plain-file, systemd-resolved or resolvconf. |
59255927
| `nameservers` | no | `list` | | Resolver nameserver addresses. |
59265928
| `search` | no | `list` | | Resolver search domains. |
59275929
| `options` | no | `list` | | Resolver options. |
5930+
| `path` | no | `path` | | Remote or local path, depending on the plugin. |
5931+
| `nm_connection` | no | `string` | | NetworkManager connection profile used for persistent DNS changes. |
5932+
| `force` | no | `boolean` | `False` | Force the operation when supported. |
5933+
| `backup` | no | `boolean` | `False` | Create a backup before modifying an existing file. |
5934+
| `backup_suffix` | no | `string` | `.bak` | Suffix appended to the original path when backup is enabled. |
59285935
| `sudo` | no | `boolean` | `False` | Run the remote operation through sudo -n when supported. |
59295936

59305937
Result fields:
@@ -5939,15 +5946,14 @@ Result fields:
59395946
Example:
59405947

59415948
```yaml
5942-
use: network.dns_assert
5949+
use: network.dns.config
59435950
with:
5951+
backend: auto
59445952
nameservers:
59455953
- 192.0.2.53
5946-
search:
5947-
- example.com
59485954
```
59495955

5950-
### `network.dns_facts`
5956+
### `network.dns.facts`
59515957

59525958
Detect the active DNS resolver backend without changing resolver configuration.
59535959

@@ -5971,7 +5977,7 @@ Result fields:
59715977
Example:
59725978

59735979
```yaml
5974-
use: network.dns_facts
5980+
use: network.dns.facts
59755981
with:
59765982
sudo: true
59775983
```
@@ -11607,74 +11613,3 @@ use: user.unlock
1160711613
with:
1160811614
name: nginx
1160911615
```
11610-
11611-
## wait
11612-
11613-
### `wait.process`
11614-
11615-
Wait until a remote process condition is true.
11616-
11617-
- Remote session: `true`
11618-
- Dry-run support: `true`
11619-
- Check mode support: `false`
11620-
11621-
| Parameter | Required | Type | Default | Description |
11622-
|---|---:|---|---|---|
11623-
| `pattern` | yes | `string` | | Regex, process pattern or search pattern. |
11624-
| `state` | no | `string` | | Desired state such as present, absent, started or stopped. |
11625-
| `timeout` | no | `number` | | Operation timeout in seconds. |
11626-
| `interval` | no | `number` | `2` | Polling interval in seconds. |
11627-
| `sudo` | no | `boolean` | `False` | Run the remote operation through sudo -n when supported. |
11628-
11629-
Result fields:
11630-
11631-
- `changed`: Whether the plugin changed the target or controller state.
11632-
- `message`: Human-readable result message.
11633-
- `rc`: Process or command return code when applicable.
11634-
- `stdout`: Captured standard output when applicable.
11635-
- `stderr`: Captured standard error when applicable.
11636-
- `data`: Plugin-specific structured result data.
11637-
11638-
Example:
11639-
11640-
```yaml
11641-
use: wait.process
11642-
with:
11643-
pattern: KEY=.*
11644-
```
11645-
11646-
### `wait.tcp`
11647-
11648-
Wait until a TCP host/port is reachable from the controller.
11649-
11650-
- Remote session: `false`
11651-
- Dry-run support: `true`
11652-
- Check mode support: `false`
11653-
11654-
| Parameter | Required | Type | Default | Description |
11655-
|---|---:|---|---|---|
11656-
| `host` | yes | `string` | | Hostname or IP address to check from the controller. |
11657-
| `port` | yes | `integer` | | TCP port number. |
11658-
| `timeout` | no | `number` | | Operation timeout in seconds. |
11659-
| `interval` | no | `number` | `2` | Polling interval in seconds. |
11660-
| `connect_timeout` | no | `number` | `3` | Per-attempt TCP connect timeout in seconds. |
11661-
11662-
Result fields:
11663-
11664-
- `changed`: Whether the plugin changed the target or controller state.
11665-
- `message`: Human-readable result message.
11666-
- `rc`: Process or command return code when applicable.
11667-
- `stdout`: Captured standard output when applicable.
11668-
- `stderr`: Captured standard error when applicable.
11669-
- `data`: Plugin-specific structured result data.
11670-
- `data.host`: Checked host.
11671-
- `data.port`: Checked TCP port.
11672-
11673-
Example:
11674-
11675-
```yaml
11676-
use: wait.tcp
11677-
with:
11678-
host: 127.0.0.1
11679-
port: 22
11680-
```

docs/plugins/index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ archive.untar
3535
archive.unzip
3636
archive.zip
3737
assert.disk
38-
assert.tcp
3938
auditd.backlog_assert
4039
auditd.reload
4140
auditd.rule
@@ -188,9 +187,10 @@ multipath.flush
188187
multipath.reload
189188
multipath.status
190189
network.connectivity.port_check
191-
network.dns
192-
network.dns_assert
193-
network.dns_facts
190+
network.connectivity.port_wait
191+
network.dns.config
192+
network.dns.check
193+
network.dns.facts
194194
network.firewall.firewalld.forward_port
195195
network.firewall.firewalld.icmp_block
196196
network.firewall.firewalld.list
@@ -356,8 +356,6 @@ user.remove
356356
user.set_password
357357
user.shell_assert
358358
user.unlock
359-
wait.process
360-
wait.tcp
361359
```
362360

363361
## Manuals by category

docs/plugins/linux-operations.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ pam.access / pam.faillock / pam.pwhistory / pam.succeed_if
6565
pam.service_line / pam.validate / pam.stack_facts / pam.authselect
6666
hosts.entry
6767
hostname.set
68-
network.dns
68+
network.dns.config
6969
chrony.servers / chrony.sources_assert
7070
```
7171

72-
`network.dns` is deliberately careful: with `backend: auto`, it refuses to
72+
`network.dns.config` is deliberately careful: with `backend: auto`, it refuses to
7373
replace a symlinked `/etc/resolv.conf` unless `force: true` or an explicit backend
7474
is provided. This avoids corrupting systems managed by systemd-resolved,
7575
NetworkManager, resolvconf or cloud-init.
@@ -108,9 +108,9 @@ structured `plan --diff` previews before applying storage changes.
108108
## Runtime network operations
109109

110110
Use `network.link.interface`, `network.link.bond`, `network.link.bridge`, `network.link.vlan`,
111-
`network.route.add`, `network.route.remove` and `network.dns` for runtime network setup
111+
`network.route.add`, `network.route.remove` and `network.dns.config` for runtime network setup
112112
and DNS resolver changes. DNS handling is
113-
backend-aware through the same safety rules as `network.dns`: managed or
113+
backend-aware through the same safety rules as `network.dns.config`: managed or
114114
symlinked resolver files are not overwritten silently.
115115

116116

@@ -187,7 +187,7 @@ Useful families include:
187187

188188
```text
189189
platform.facts
190-
network.dns_facts
190+
network.dns.facts
191191
network.link.facts / network.route.facts
192192
pkg.version_pin / pkg.repo_priority
193193
network.link.interface / network.link.bond / network.link.vlan / network.route.add / network.route.remove with persist/backend
@@ -224,7 +224,7 @@ existing configuration files.
224224
## Network checks, facts and bridge operations
225225

226226
Use `network.link.bridge` for explicit runtime bridge creation/removal. Use
227-
`network.link.check`, `network.route.check`, `network.dns_assert` and
227+
`network.link.check`, `network.route.check`, `network.dns.check` and
228228
`network.connectivity.port_check` as precheck/postcheck guards around network operations.
229229
Use `network.link.facts` and `network.route.facts` for read-only iproute2 JSON
230230
readback without treating mismatched state as a failed assertion.

docs/plugins/wait-assert.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ The public `assert.*` / `wait.*` surface is intentionally shrinking. File,
1212
directory and symlink checks now live in the type-specific filesystem families:
1313
`fs.dir.*`, `fs.file.*` and `fs.symlink.*`.
1414

15-
## `wait.tcp` and `assert.tcp`
15+
## `network.connectivity.port_wait` and `network.connectivity.port_check`
1616

17-
TCP checks run from the controller.
17+
Connectivity checks run from the remote target using `nc`.
1818

1919
```yaml
2020
- id: wait_port
21-
use: wait.tcp
21+
use: network.connectivity.port_wait
2222
with:
2323
host: "{{ server.host }}"
2424
port: 443
25-
timeout: 60
25+
retries: 30
2626
interval: 2
2727

2828
- id: assert_port
29-
use: assert.tcp
29+
use: network.connectivity.port_check
3030
with:
3131
host: "{{ server.host }}"
3232
port: 443
@@ -53,13 +53,13 @@ wrong type. `*.wait` polls with `retries` and `interval`.
5353
path: /etc/myapp
5454
```
5555

56-
## `wait.process`
56+
## `process.wait`
5757

5858
Waits for a remote process matching a pattern.
5959

6060
```yaml
6161
- id: wait_worker
62-
use: wait.process
62+
use: process.wait
6363
with:
6464
pattern: "myapp-worker"
6565
state: present

examples/runbooks/runbooks/04-assert.check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tasks:
2020
path: /tmp/automax-demo
2121
min_free_mb: 1
2222
- id: assert_tcp
23-
use: assert.tcp
23+
use: network.connectivity.port_check
2424
with:
2525
host: 127.0.0.1
2626
port: 22

0 commit comments

Comments
 (0)