Skip to content

Commit

Permalink
ansible: decommission nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Oct 11, 2024
1 parent b11d946 commit 0a1908c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
roles:
- buildmaster
- unacmetool
- unnginx

- hosts: buildslave
become: yes
Expand Down
37 changes: 37 additions & 0 deletions ansible/roles/unnginx/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
- name: Create the webroot
file:
path: /srv/www
state: directory
owner: root
group: root
mode: 0755

- name: Disable nginx
runit:
name: nginx
enabled: false

- name: Unconfigure nginx firewall rules
file:
path: /etc/iptables.d/nginx.rules
state: absent
notify:
- iptables

- name: Unconfigure nginx firewall rules
file:
path: /etc/ip6tables.d/nginx.6rules
state: absent
notify:
- iptables

- name: Remove nginx files
file:
path: /etc/nginx
state: absent

- name: Remove nginx
xbps:
pkg: nginx
state: present

0 comments on commit 0a1908c

Please sign in to comment.