debloated
This commit is contained in:
parent
9eaf3ecda9
commit
e86592a768
14
1/roles/nginx/tasks/certbot.yml
Normal file
14
1/roles/nginx/tasks/certbot.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install certbot package
|
||||||
|
apt:
|
||||||
|
name: ['certbot', 'python3-certbot-nginx']
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Get certs using certbot
|
||||||
|
shell: echo "cock"
|
||||||
|
|
||||||
|
- name: start nginx
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
32
1/roles/nginx/tasks/configure.yml
Normal file
32
1/roles/nginx/tasks/configure.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: install nginx config
|
||||||
|
template:
|
||||||
|
src: files/nginx.conf
|
||||||
|
dest: /etc/nginx/nginx.conf
|
||||||
|
owner: www-data
|
||||||
|
|
||||||
|
- name: remove default config
|
||||||
|
file:
|
||||||
|
path: /etc/nginx/sites-enabled/default
|
||||||
|
state: absent
|
||||||
|
owner: www-data
|
||||||
|
|
||||||
|
- name: install site's configs
|
||||||
|
template:
|
||||||
|
src: files/sites-enabled/{{ item }}
|
||||||
|
dest: /etc/nginx/sites-enabled/{{ item }}
|
||||||
|
owner: www-data
|
||||||
|
loop: ['wiki.conf', 'root.conf', 'pma.conf', 'default_server.conf', 'cloud.conf']
|
||||||
|
|
||||||
|
- name: create dirs
|
||||||
|
file:
|
||||||
|
path: /var/www/{{item}}
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
loop: ['pma','cloud','wiki','default','root']
|
||||||
|
|
||||||
|
- name: reload nginx
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
@ -4,46 +4,6 @@
|
|||||||
name: nginx
|
name: nginx
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Install certbot package
|
- include_tasks: configure.yml
|
||||||
apt:
|
|
||||||
name: ['certbot', 'python3-certbot-nginx']
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: install nginx config
|
# - include_tasks: certbot.yml
|
||||||
template:
|
|
||||||
src: files/nginx.conf
|
|
||||||
dest: /etc/nginx/nginx.conf
|
|
||||||
owner: www-data
|
|
||||||
|
|
||||||
- name: remove default config
|
|
||||||
file:
|
|
||||||
path: /etc/nginx/sites-enabled/default
|
|
||||||
state: absent
|
|
||||||
owner: www-data
|
|
||||||
|
|
||||||
- name: install site's configs
|
|
||||||
template:
|
|
||||||
src: files/sites-enabled/{{ item }}
|
|
||||||
dest: /etc/nginx/sites-enabled/{{ item }}
|
|
||||||
owner: www-data
|
|
||||||
loop: ['wiki.conf', 'root.conf', 'pma.conf', 'default_server.conf', 'cloud.conf']
|
|
||||||
|
|
||||||
- name: create dirs
|
|
||||||
file:
|
|
||||||
path: /var/www/{{item}}
|
|
||||||
state: directory
|
|
||||||
owner: www-data
|
|
||||||
loop: ['pma','cloud','wiki','default','root']
|
|
||||||
|
|
||||||
- name: stop nginx
|
|
||||||
service:
|
|
||||||
name: nginx
|
|
||||||
state: stopped
|
|
||||||
|
|
||||||
- name: Get certs using certbot
|
|
||||||
shell: echo "cock"
|
|
||||||
|
|
||||||
- name: start nginx
|
|
||||||
service:
|
|
||||||
name: nginx
|
|
||||||
state: started
|
|
Loading…
Reference in New Issue
Block a user