# Role: ssh

## Description

Installs and configures ssh client.

https://www.openssh.com/

## Usage

Using in a playbook:

```yaml
- name: Play
  gather_facts: true
  gather_subset:
    - distribution
  hosts:
    - all
  roles:
    - samuliy.ansible.ssh
  vars:
    ...
```

### Vars

`ssh_config_dir`:

Configuration directory.

`ssh_user`:

SSH user.

`ssh_group`:

SSH group.

`ssh_authorized_keys`:

Authorized keys to install.

`ssh_hosts`:

List of SSH host configs to install.
Objects can have fields:
- 'host'
- 'hostname'
- 'user'
- 'port'
- 'identity_file'

`ssh_keys`:

List SSH keys to generate. List items are arguments passed for `community.crypto.openssh_keypair`.

`ssh_add_keys_to_agent`:

Add config to add SSH keys to agent.
