initial commit

This commit is contained in:
Tom
2026-02-10 12:15:27 +01:00
commit 1ad367e1f7
3 changed files with 66 additions and 0 deletions

39
README.org Normal file
View File

@@ -0,0 +1,39 @@
#+TITLE: Nginx Web Server Installer Role
#+AUTHOR: DeadSwitch | The Silent Architect
#+OPTIONS: toc:nil num:nil \n:t
* ds-nginx
This Ansible role installs the Nginx web server.
- Disables the =default= site.
- No other site configuration.
- No additional hardening.
* Requirements
- Debian 12+ or compatible.
- Sudo access or root.
- Port 80 (and 443) are reachable.
* Example Playbook
#+begin_src yaml
- name: Install the Nginx web server
hosts: webservers
become: true
roles:
- role: ds-nginx
#+end_src
* Handlers
- =Reload_nginx=
- =Restart_nginx=
* License
MIT License
=[ Fear the Silence. Fear the Switch. ]=

10
handlers/main.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: Reload_nginx
ansible.builtin.systemd_service:
name: nginx
state: reloaded
- name: Restart_nginx
ansible.builtin.systemd_service:
name: nginx
state: restarted

17
tasks/main.yml Normal file
View File

@@ -0,0 +1,17 @@
---
- name: Install the nginx server
ansible.builtin.apt:
name: nginx
state: present
- name: Disable the default nginx site
ansible.builtin.file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: Reload_nginx
- name: Enable and start the nginx
ansible.builtin.service:
name: nginx
state: started
enabled: true