enable nginx dev

This commit is contained in:
=
2025-04-05 02:38:17 -04:00
parent f843c7eaa3
commit 230d830612
3 changed files with 19 additions and 9 deletions

View File

@ -69,6 +69,7 @@
notify: Restart nginx
- name: Template out nginx reverse proxy configs
when: item.type == "proxy"
ansible.builtin.template:
src: nginx-proxy.conf.j2
dest: /etc/nginx/sites-available/{{ item.name }}.conf
@ -76,10 +77,10 @@
group: root
mode: "0644"
loop: "{{ nginx_sites }}"
when: item.type == "proxy"
notify: Restart nginx
- name: Template out nginx site configs
when: item.type == "site"
ansible.builtin.template:
src: nginx-site.conf.j2
dest: /etc/nginx/sites-available/{{ item.name }}.conf
@ -87,7 +88,6 @@
group: root
mode: "0644"
loop: "{{ nginx_sites }}"
when: item.type == "site"
notify: Restart nginx
- name: Enable site configs
@ -98,12 +98,12 @@
loop: "{{ nginx_sites }}"
notify: Restart nginx
- name: Run certbot role to install certificates
ansible.builtin.include_role:
name: certbot
vars:
certbot_domains: "{{ nginx_sites | map(attribute='name') }}"
certbot_notify: "Restart nginx"
# - name: Run certbot role to install certificates
# ansible.builtin.include_role:
# name: certbot
# vars:
# certbot_domains: "{{ nginx_sites | map(attribute='name') }}"
# certbot_notify: "Restart nginx"
- name: Start and enable nginx
ansible.builtin.service: