Skip to content

Commit

Permalink
Add sshconfig_extra parameter to the configuration guide
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Mar 15, 2024
1 parent 9489ea5 commit 3491c35
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions docs/guides/configuration-guide/commons/sshconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ sidebar_label: SSH Config
With the `osism.commons.sshconfig` role, it is possible to manage a SSH config
file in the home directory of the operator user.

## Extra config

The `sshconfig_extra` parameter can be used to add any other SSH configuration to the `.ssh/config` file.

```yaml
sshconfig_extra: |
Host github.com
ProxyCommand nc -X connect -x <web-proxy-hostname-or-ip>:<web-proxy-port>> ssh.github.com 443
```
## Example
In the [testbed](https://github.com/osism/testbed)
Expand Down Expand Up @@ -44,11 +54,11 @@ Host testbed-node-2

## Defaults

**Parameter** | **Default** | **Description**
-----------------------------|----------------------------------------|---------------------
`sshconfig_groupname` | `all` | All nodes in this group are included.
`sshconfig_order` | `20` | The `.ssh/config.d` directory is used to prepare the `.ssh/config` file. You can add your own files in this directory. Everything with a filename prefix smaller than `sshconfig_order` is placed at the beginning of the assembled `.ssh/config` file. Anything with a filename prefix greater than `sshconfig_order` goes at the end.
`sshconfig_port` | `22` | The SSH port.
`sshconfig_private_key_file` | `/opt/ansible/secrets/id_rsa.operator` | The identity file to use. The file itself must already exist there. The file is created by the `osism.services.manager` role.
`sshconfig_user` | `"{{ operator_user }}"` | The user in which home directory the `.ssh/config` file will be generated.

| Parameter | Default | Description |
|:-----------------------------|:---------------------------------------|:---------------------|
| `sshconfig_groupname` | `all` | All nodes in this group are included.
| `sshconfig_order` | `20` | The `.ssh/config.d` directory is used to prepare the `.ssh/config` file. You can add your own files in this directory. Everything with a filename prefix smaller than `sshconfig_order` is placed at the beginning of the assembled `.ssh/config` file. Anything with a filename prefix greater than `sshconfig_order` goes at the end. |
| `sshconfig_port` | `22` | The SSH port. |
| `sshconfig_private_key_file` | `/opt/ansible/secrets/id_rsa.operator` | The identity file to use. The file itself must already exist there. The file is created by the `osism.services.manager` role. |
| `sshconfig_user` | `"{{ operator_user }}"` | The user in which home directory the `.ssh/config` file will be generated. |
| `sshconfig_extra` | `""` | Add additional SSH configuration to the end of the `.ssh/config` file. |

0 comments on commit 3491c35

Please sign in to comment.