Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Last active January 11, 2022 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualhobbit/1bf24ded55a5ea01eb63a705f3d38b25 to your computer and use it in GitHub Desktop.
Save virtualhobbit/1bf24ded55a5ea01eb63a705f3d38b25 to your computer and use it in GitHub Desktop.
{% if ansible_os_family == "Windows" %}
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_ip_addresses[0] }}"{% raw %} }}{% endraw %}
{% elif ansible_os_family == "RedHat" %}
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_default_ipv4.address }}"{% raw %} }}{% endraw %}
{% endif %}
{% raw %}
{{ .Data.certificate }}
{{ end }}
{% endraw %}
@afebnyhjg
Copy link

Gay
Birch

@@@@@@@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment