egjiri.ssh-check

Ansible Role: egjiri.ssh-check

A common issue when creating new VM instances is trying to set them up with Ansible before you can connect via SSH. This role helps you wait for SSH to be ready before continuing with your tasks.

Instructions

Installation

ansible-galaxy install egjiri.ssh-check

Usage

Add the hosts you want to wait for SSH connection to the ssh_check inventory group and set the ssh_check_active variable to true. This will make these hosts keep trying to connect via SSH while skipping others. A good practice is to keep ssh_check_active as the default false when running the playbooks after the hosts have been running for some time. Only set it to true during the initial setup when you are unsure if the instance is ready or still starting up.

Example

# Ensure your hosts are part of the `ssh_check` group before this step.
# Here’s how to use the role in your Playbook

- hosts: localhost
  gather_facts: False
  vars:
    ssh_check_active: True
  roles:
  - egjiri.ssh-check
Informazioni sul progetto

Ansible Role to check if hosts are ready to connect to via ssh

Installa
ansible-galaxy install egjiri.ssh-check
Licenza
Unknown
Download
70
Proprietario