line
Part of a text file: a line that should, or should not, be there.
step "example" { line { path = "..." }}Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
create |
bool | No | Create the file when it is missing. Otherwise a missing file is an error. |
insert_after |
string | No | When adding, insert after the last line matching this regexp, or “EOF” (default). |
insert_before |
string | No | When adding, insert before the first line matching this regexp, or “BOF”. |
line |
string | No | The line. Required unless state is “absent” with a regexp. |
on_remove |
string | No | “forget” (default) leaves the file as it is, “delete” takes the edit back out. |
path |
string | Yes | Absolute path of the file. |
regexp |
string | No | Replace the last line matching this; with state “absent”, remove every match. |
state |
string | No | “present” (default) or “absent”. |
Read-only attributes
Section titled “Read-only attributes”Conn3x sets these; reference them as conn3x_line.<circuit>__<step>["<host>"].<name>.
| Name | Type | Description |
|---|---|---|
in_sync |
bool | Whether the file already matches. |
A step lowers to the conn3x_line resource, one instance per host, and connects with its circuit’s ssh block.