24 lines
437 B
YAML
24 lines
437 B
YAML
---
|
|
|
|
- name: Install needed packages.
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- nginx
|
|
state: present
|
|
|
|
- name: Enable and start nginx service.
|
|
ansible.builtin.service:
|
|
name: nginx
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Install nginx configuration file.
|
|
ansible.builtin.template:
|
|
src: nginx.conf.j2
|
|
dest: /etc/nginx/nginx.conf
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify:
|
|
- Reload nginx service.
|