1
0
Fork 0
yatf/ansible/nginx_setup.yml

33 lines
621 B
YAML
Raw Normal View History

---
2025-01-20 00:10:37 +02:00
- name: Wait for ssh
gather_facts: false
hosts: all
tasks:
2025-04-18 20:48:27 +03:00
- name: Check port
2025-01-20 00:10:37 +02:00
ansible.builtin.wait_for:
port: 22
connect_timeout: 30
2025-04-18 20:48:27 +03:00
- name: Configure nginx
2025-01-03 11:33:57 +02:00
become: true
hosts: all
tasks:
2025-04-18 20:48:27 +03:00
- name: Install
ansible.builtin.apt:
name: nginx
state: present
update_cache: true
2025-04-18 20:48:27 +03:00
- name: Config
ansible.builtin.template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
2025-04-18 20:48:27 +03:00
mode: '0644'
2025-05-20 22:04:59 +03:00
owner: root
2025-04-18 20:48:27 +03:00
group: root
2025-04-18 20:48:27 +03:00
- name: Restart
ansible.builtin.service:
name: nginx
state: restarted