Files
devops-platform/ansible/playbooks/install_nginx.yml
T
2026-10-21 11:59:49 +03:00

26 lines
541 B
YAML

---
- name: Install and configure Nginx
hosts: targets
become: true
tasks:
- name: Install Nginx
ansible.builtin.apt:
name: nginx
state: present
update_cache: true
- name: Ensure Nginx is running
ansible.builtin.service:
name: nginx
state: started
enabled: true
- name: Deploy index page
ansible.builtin.template:
src: ../templates/index.html.j2
dest: /var/www/html/index.html
owner: root
group: root
mode: '0644'