Skip to content
lemano ansible discover

lemano ansible discover

Run lemano discover on the hosts of an Ansible inventory

Description

Run lemano discover on the hosts of an Ansible inventory, reached with
the inventory's own settings: the same as recording a playbook run does,
with no target file to keep. With -i, the inventory is read as Ansible
reads it (repeatable); without, Ansible's configured inventory is used.
With HOST names, only those hosts are read; without, every host of the
inventory. A host with no Lemano target gets one. The vault options of
ansible-playbook, --vault-id, --vault-password-file (both repeatable) and
--ask-vault-pass (-J), are given to every Ansible command below this
one, so that a vaulted group_vars file is read; ANSIBLE_VAULT_PASSWORD_FILE
and ansible.cfg apply as for Ansible, and are what a later lemano
discover or a timer uses. Every other flag goes to lemano discover,
whose output and exit code are this command's.

A host key Lemano has not pinned is checked against your known_hosts
files when they have the host. A host that neither has is refused (exit
code 4, with its fingerprint): check the fingerprint, then give
--accept-new-host-key to pin it. A changed key is always refused.

Synopsis

lemano ansible discover [-i INVENTORY]... [HOST]... [lemano discover flags]

Examples

lemano ansible discover -i inventories/prod/hosts.yml
lemano ansible discover -i hosts.ini web1 web2
lemano ansible discover -i hosts.ini --limit 'web:&eu' --detailed-exitcode
lemano ansible discover -i hosts.ini --vault-password-file .vault-pass

Exit codes

See exit codes.

See also