Use Ansible to deploy TrueNAS SSL

The goal is to deploy Lets Encrypt Certificate for TrueNAS useing the API and ansible.

All you need is an API-Key and the content of the SSL Key and fullpem, you can also use username & password for the API calls, but this is not covered here.

The process is relatively straightforward first you need the POST the new key and certifcate, then fetch all available certs from the API and set the ID of the certificate which you want to use. The ID is simply always the last, because every time you add a new certificate the ID increase.

[Read More]