enable nginx dev
This commit is contained in:
parent
f843c7eaa3
commit
230d830612
@ -0,0 +1,9 @@
|
|||||||
|
# code: language=ansible
|
||||||
|
|
||||||
|
nginx_sites:
|
||||||
|
- name: repo.balsillie.house
|
||||||
|
type: site
|
||||||
|
autoindex: 'on'
|
||||||
|
root: /var/www/aur
|
||||||
|
|
||||||
|
nginx_user: "http"
|
@ -5,5 +5,6 @@
|
|||||||
become: true
|
become: true
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
- certbot
|
# - certbot
|
||||||
|
- nginx
|
||||||
# - aur_repo_host
|
# - aur_repo_host
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Template out nginx reverse proxy configs
|
- name: Template out nginx reverse proxy configs
|
||||||
|
when: item.type == "proxy"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: nginx-proxy.conf.j2
|
src: nginx-proxy.conf.j2
|
||||||
dest: /etc/nginx/sites-available/{{ item.name }}.conf
|
dest: /etc/nginx/sites-available/{{ item.name }}.conf
|
||||||
@ -76,10 +77,10 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ nginx_sites }}"
|
loop: "{{ nginx_sites }}"
|
||||||
when: item.type == "proxy"
|
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Template out nginx site configs
|
- name: Template out nginx site configs
|
||||||
|
when: item.type == "site"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: nginx-site.conf.j2
|
src: nginx-site.conf.j2
|
||||||
dest: /etc/nginx/sites-available/{{ item.name }}.conf
|
dest: /etc/nginx/sites-available/{{ item.name }}.conf
|
||||||
@ -87,7 +88,6 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ nginx_sites }}"
|
loop: "{{ nginx_sites }}"
|
||||||
when: item.type == "site"
|
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Enable site configs
|
- name: Enable site configs
|
||||||
@ -98,12 +98,12 @@
|
|||||||
loop: "{{ nginx_sites }}"
|
loop: "{{ nginx_sites }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Run certbot role to install certificates
|
# - name: Run certbot role to install certificates
|
||||||
ansible.builtin.include_role:
|
# ansible.builtin.include_role:
|
||||||
name: certbot
|
# name: certbot
|
||||||
vars:
|
# vars:
|
||||||
certbot_domains: "{{ nginx_sites | map(attribute='name') }}"
|
# certbot_domains: "{{ nginx_sites | map(attribute='name') }}"
|
||||||
certbot_notify: "Restart nginx"
|
# certbot_notify: "Restart nginx"
|
||||||
|
|
||||||
- name: Start and enable nginx
|
- name: Start and enable nginx
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user