[DOC] Include list-hosts in command to be used

This commit is contained in:
Jorge Enrique Gómez Gómez 2020-09-30 01:18:46 -05:00
parent c6c376524d
commit 80efcc1b77
4 changed files with 20 additions and 4 deletions

View File

@ -8,6 +8,7 @@ ansible-pull \
-U ssh://git@gitea.agofer.net:22001/jegomez/ansible-role-launch-container.git \
-e nombre=<newodoocontainer> \
--vault-password-file ~/.vault_pass.txt \
-l localhost,nginx \
-i hosts
```

View File

@ -25,4 +25,4 @@
dominio: agofer.net
ansible_python_interpreter: python3
ansible_connection: lxd
ansible_host: nginx
ansible_host: local:nginx

View File

@ -8,7 +8,8 @@
- name: Launch LXD container
lxd_container:
name: '{{ container }}'
ephemeral: yes
ephemeral: no
profiles: ['odoo8']
source:
type: image
mode: pull
@ -16,7 +17,6 @@
protocol: simplestreams
fingerprint: 39a93d0b3552
# profiles: ['odoo8']
# alias: ubuntu/18.04
- name: Register DNS CNAME alias using Dreamhost API

View File

@ -24,8 +24,23 @@
- name: Request Let's Encrypt certificate
command:
cmd: 'certbot --redirect --agree-tos -m {{ email }} --hsts --nginx -n -d {{ nombre | lower }}.{{ dominio }}'
cmd: 'certbot --redirect --agree-tos -m {{ email }} --hsts --nginx -n -d {{ container }}.{{ dominio }}'
# Certbot doesn't add proxy_protocol.
# (https://github.com/certbot/certbot/issues/8057)
- name: Use Proxy protocol in port 443
lineinfile:
path: '/etc/nginx/conf.d/{{ container }}.{{ dominio }}.conf'
line: ' listen 443 ssl proxy_protocol;'
regexp: '^ listen 443'
- name: Use Proxy protocol in port 443 IPv6
lineinfile:
path: '/etc/nginx/conf.d/{{ container }}.{{ dominio }}.conf'
line: ' listen [::]:443 ssl proxy_protocol;'
regexp: '^ listen .....443'
- name: Restart Nginx again
systemd:
name: nginx