- hosts: - numquam roles: - role: timezone tags: timezone - role: lusers tags: lusers - role: superusers tags: superusers - role: apt-repos tags: apt-repos become: yes - role: unattended-upgrades tags: unattended-upgrades - role: postgresql-server tags: postgresql-server become: yes - role: rosin tags: rosin become: yes - hosts: - numquam handlers: - name: reload nginx become: yes service: name: nginx state: reloaded tasks: - become: yes apt: name: - docker-ce - docker-ce-cli install_recommends: no tags: packages - become: yes systemd: unit: docker.service enabled: yes state: started - become: yes copy: dest: /etc/nginx/sites-enabled/odoo.trygvis.io content: | # Managed by Ansible server { server_name odoo.trygvis.io; listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/odoo.trygvis.io/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/odoo.trygvis.io/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot location / { # try_files $uri @proxy; # } # # location @proxy { proxy_set_header Host $host; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:8069; proxy_connect_timeout 10s; proxy_read_timeout 300s; proxy_send_timeout 300s; } location /longpolling { proxy_pass http://127.0.0.1:8070; } # # cache some static data in memory for 60mins # location ~* /web/static/ { # proxy_cache_valid 200 60m; # proxy_buffering on; # expires 864000; # proxy_pass http://127.0.0.1:8069; # } } server { if ($host = odoo.trygvis.io) { return 301 https://$host$request_uri; } server_name odoo.trygvis.io; listen 80; return 404; } tags: x notify: reload nginx