Open Secarius opened 3 years ago
Maybe looking at the api could help you write an ansible script for this
Hello @Secarius , I have almost the same task to accomplish. Did you find a suitable solution?
@m-chingis no sorry, i had no time to look into the api
@Secarius in on of the threads related to this topic I found this repo https://github.com/Xantios/nginx-proxy-manager-assistant it is written in JavaScript, so very easy to understand how to work with API. already tried to adapt as bash script. Later will make ansible wrapper.
Hello @chaptergy ,
I tried to create a script.
Almost everything worked, only I can't find how to enter email for certbot.
warning Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-1" --agree-tos --authenticator webroot --email "undefined" --preferred-challenges "dns,http" --domains "site-2.xxx.net" Saving debug log to /var/log/letsencrypt/letsencrypt.log Unable to register an account with ACME server
Script: https://github.com/DenAV/nginx-proxy-manager-ansible
If I have created a first certificate with WebUI, then I can create the next certificates, no longer shows an error.
info Command: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-6" --agree-tos --authenticator webroot --email "undefined" --preferred-challenges "dns,http" --domains "site-2.xxx.net" success Requesting a certificate for site-2.xxx.net
what have I missed?
Issue is now considered stale. If you want to keep it open, please comment :+1:
Describe the solution you'd like We are using ansible to deploy hosts and configs, is there a way to have an ansible plugin to add proxy hosts via ansible?
Describe alternatives you've considered a simple way to add an new proxy host via ansible playbook