21 lines
455 B
YAML
21 lines
455 B
YAML
---
|
|
- name: Configure nginx
|
|
hosts: all
|
|
vars:
|
|
ansible_python_interpreter: /usr/bin/python3
|
|
tasks:
|
|
- name: install nginx
|
|
ansible.builtin.apt:
|
|
name: nginx
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: copy config
|
|
ansible.builtin.template:
|
|
src: nginx.conf.j2
|
|
dest: /etc/nginx/nginx.conf
|
|
|
|
- name: restart service
|
|
ansible.builtin.service:
|
|
name: nginx
|
|
state: restarted
|