Consider this hosts.yaml:
provider:
hosts:
private-host-01:
ansible_host: 127.0.0.1
ansible_user: root
ansible_password:
_meta:
_auth_type: IdentityAgent
_auth_path: ~/.1password/agent.sock
_aliases: []
provider:
hosts:
my-private-host-01:
ansible_host: 127.0.01
ansible_user: root
ansible_password:
_meta:
_auth_type: IdentityAgent
_auth_path: ~/.1password/agent.sock
_aliases: []
sshgen will fail with a long exception like:
File "/home/user/.cache/uv/archive-v0/gPnlXI4ewKabvm2j/lib/python3.14/site-packages/ruamel/yaml/constructor.py", line 281, in check_mapping_key
raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
Consider this hosts.yaml:
sshgen will fail with a long exception like: