#!/usr/bin/env bash

# {{ ansible_managed }}

# Lookup SSH public keys

username="${1}"

if [ -d /etc/ssh/authorized_keys_lookup.d ] ; then
    keys="$(/bin/run-parts --arg="${username}" /etc/ssh/authorized_keys_lookup.d)"

    if [ -n "${keys}" ] ; then
        echo "${keys}"
    fi
fi
