From 0a1908c671652a7b2643bee2245a8046f0d4ad62 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 15 Jul 2024 02:06:51 -0400 Subject: [PATCH] ansible: decommission nginx --- ansible/build.yml | 1 + ansible/roles/unnginx/tasks/main.yml | 37 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ansible/roles/unnginx/tasks/main.yml diff --git a/ansible/build.yml b/ansible/build.yml index 4f194f8..25dd449 100644 --- a/ansible/build.yml +++ b/ansible/build.yml @@ -6,6 +6,7 @@ roles: - buildmaster - unacmetool + - unnginx - hosts: buildslave become: yes diff --git a/ansible/roles/unnginx/tasks/main.yml b/ansible/roles/unnginx/tasks/main.yml new file mode 100644 index 0000000..c0ea5cb --- /dev/null +++ b/ansible/roles/unnginx/tasks/main.yml @@ -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