Manages the ports for a given dokku application
Supported.
Supported.
Keyed by app. Manages the whole port_mappings collection; entries are identified by scheme and host.
| Parameter | Type | Required | Default | Choices | Description |
|---|---|---|---|---|---|
app |
string | yes | Name of the app | ||
port_mappings |
list | no | Port mappings to set; omit for state 'clear'; under state 'present' and 'set' no two may share a scheme and host port. Each item has: scheme, host, container. | ||
state |
string | no | present | present, absent, set, clear | Desired state of the ports |
dokku_ports:
app: node-js-app
port_mappings:
- scheme: http
host: 80
container: 5000dokku_ports:
app: node-js-app
port_mappings:
- scheme: http
host: 80
container: 5000
- scheme: https
host: 443
container: 5000dokku_ports:
app: node-js-app
port_mappings:
- scheme: http
host: 80
container: 5000
state: absentdokku_ports:
app: node-js-app
port_mappings:
- scheme: https
host: 443
container: 5000
state: setdokku_ports:
app: node-js-app
state: clearAvailable after the task runs when captured with register:, referenced as result.<Key> (or registered.<name>.<Key>).
| Key | Returned | Type | Description |
|---|---|---|---|
Changed |
always | bool | Whether the task changed server state. |
State |
always | string | Resulting state of the resource. |
DesiredState |
always | string | The state the task targeted. |
Message |
always | string | Human-readable result message (may be empty). |
Commands |
when a subprocess ran | list | Resolved dokku command lines executed. |
Stdout |
when a subprocess ran | string | Captured stdout of the final command. |
Stderr |
when a subprocess ran | string | Captured stderr of the final command. |
ExitCode |
when a subprocess ran | int | Exit code of the final command. |