[ADD] Uses a variable for the CNAME endpoint
This commit is contained in:
parent
3c524456ba
commit
4dc5f2c911
10
README.md
10
README.md
@ -15,8 +15,9 @@ ansible-pull \
|
|||||||
|
|
||||||
* Launches a new LXD container called **newodoocontainer**, that uses a LXD profile to download
|
* Launches a new LXD container called **newodoocontainer**, that uses a LXD profile to download
|
||||||
and setup Odoo v14.
|
and setup Odoo v14.
|
||||||
* Creates a DNS alias for **externo.agofer.net** called
|
* Creates a DNS alias for **externo.agofer.net** or **externo2.agofer.net**
|
||||||
**newodoocontainer.agofer.net**.
|
(see role variables in `local.yml` file), called
|
||||||
|
**<newodoocontainer>.agofer.net**.
|
||||||
* Registers this container in the existing Nginx Proxy container.
|
* Registers this container in the existing Nginx Proxy container.
|
||||||
* Requests an SSL certificate to _Let's Encrypt_ for the new domain, storing
|
* Requests an SSL certificate to _Let's Encrypt_ for the new domain, storing
|
||||||
the certificates in the Nginx Proxy container.
|
the certificates in the Nginx Proxy container.
|
||||||
@ -33,4 +34,7 @@ A container called **nginx** should exist, with these packages already installed
|
|||||||
lxc exec nginx -- apt -y install nginx certbot python3-certbot-nginx
|
lxc exec nginx -- apt -y install nginx certbot python3-certbot-nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
This container should listen to external connections, in order to allow **Let's Encrypt** certificates to be assigned and renewed. It's strongly suggested to protect it using **fail2ban**, Geo-IP restrictions, or other security measures.
|
This container should listen to external connections, in order to allow
|
||||||
|
**Let's Encrypt** certificates to be assigned and renewed. It's strongly
|
||||||
|
suggested to protect it using **fail2ban**, Geo-IP restrictions, or
|
||||||
|
other security measures.
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
- lxchost
|
- lxchost
|
||||||
vars:
|
vars:
|
||||||
dominio: agofer.net
|
dominio: agofer.net
|
||||||
|
dnsalias: externo2
|
||||||
|
|
||||||
- hosts: nginx
|
- hosts: nginx
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
|
|||||||
@ -27,5 +27,5 @@
|
|||||||
|
|
||||||
- name: Register DNS CNAME alias using Dreamhost API
|
- name: Register DNS CNAME alias using Dreamhost API
|
||||||
uri:
|
uri:
|
||||||
url: 'https://api.dreamhost.com/?key={{ apikey }}&cmd=dns-add_record&record={{ container }}.{{ dominio }}&type=CNAME&value=externo.{{ dominio }}.'
|
url: 'https://api.dreamhost.com/?key={{ apikey }}&cmd=dns-add_record&record={{ container }}.{{ dominio }}&type=CNAME&value={{ dnsalias }}.{{ dominio }}.'
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user