[GH-ISSUE #871] Autoconfig hosts via ansible #737

Closed
opened 2026-02-26 06:34:12 +03:00 by kerem · 7 comments
Owner

Originally created by @Secarius on GitHub (Feb 7, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/871

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

Originally created by @Secarius on GitHub (Feb 7, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/871 **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
kerem 2026-02-26 06:34:12 +03:00
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

Maybe looking at the api could help you write an ansible script for this

<!-- gh-comment-id:840151096 --> @chaptergy commented on GitHub (May 12, 2021): Maybe looking at the [api](https://github.com/jc21/nginx-proxy-manager/issues/341) could help you write an ansible script for this
Author
Owner

@m-chingis commented on GitHub (Feb 15, 2022):

Hello @Secarius , I have almost the same task to accomplish. Did you find a suitable solution?

<!-- gh-comment-id:1040273487 --> @m-chingis commented on GitHub (Feb 15, 2022): Hello @Secarius , I have almost the same task to accomplish. Did you find a suitable solution?
Author
Owner

@Secarius commented on GitHub (Feb 15, 2022):

@m-chingis no sorry, i had no time to look into the api

<!-- gh-comment-id:1040757113 --> @Secarius commented on GitHub (Feb 15, 2022): @m-chingis no sorry, i had no time to look into the api
Author
Owner

@m-chingis commented on GitHub (Feb 28, 2022):

@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.

<!-- gh-comment-id:1053838078 --> @m-chingis commented on GitHub (Feb 28, 2022): @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.
Author
Owner

@DenAV commented on GitHub (Sep 28, 2022):

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?

<!-- gh-comment-id:1261044208 --> @DenAV commented on GitHub (Sep 28, 2022): **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?
Author
Owner

@github-actions[bot] commented on GitHub (Mar 19, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2005593492 --> @github-actions[bot] commented on GitHub (Mar 19, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Apr 30, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2840630396 --> @github-actions[bot] commented on GitHub (Apr 30, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#737
No description provided.