Initial commit (with nginx...)

This commit is contained in:
2026-02-24 18:28:01 +01:00
commit 0d5bd926e2
10 changed files with 147 additions and 0 deletions

25
playbooks/webservers.yml Normal file
View File

@@ -0,0 +1,25 @@
- name: Configure webserver with nginx
hosts: debian
become: true
tasks:
- name: Ensure nginx is installed
ansible.builtin.package:
name: nginx
state: present
update_cache: yes
- name: Copy nginx config file
ansible.builtin.copy:
src: nginx.conf
dest: /etc/nginx/conf.d/test.conf
owner: root
group: root
mode: '0644'
notify: Restart nginx
handlers:
- name: Restart nginx
ansible.builtin.service:
name: nginx
state: restarted