debloated

This commit is contained in:
lulzette 2021-02-27 15:01:00 +03:00
parent 9eaf3ecda9
commit e86592a768
3 changed files with 48 additions and 42 deletions

View 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

View 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

View File

@ -4,46 +4,6 @@
name: nginx
state: present
- name: Install certbot package
apt:
name: ['certbot', 'python3-certbot-nginx']
state: present
- include_tasks: configure.yml
- 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: stop nginx
service:
name: nginx
state: stopped
- name: Get certs using certbot
shell: echo "cock"
- name: start nginx
service:
name: nginx
state: started
# - include_tasks: certbot.yml