Verified Commit d99f2fc0 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Fix hosts key check

Resolve the users.hosts key not being defined when rolling out the
root_ssh role.
parent e04536c4
Pipeline #6386 passed with stage
in 34 seconds
#jinja2: lstrip_blocks: True
{% for user in root_ssh_keys | sort(attribute="key") -%}
{% if not user.hosts or inventory_hostname in user.hosts -%}
{% if user.hosts is not defined or inventory_hostname in user.hosts -%}
{{ lookup('file', '../pubkeys/' + user.key ) }}
{% endif %}
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment