1
0
Fork 0
yatf/ansible/nginx_setup.yml

30 lines
583 B
YAML
Raw Normal View History

---
2025-01-20 00:10:37 +02:00
- name: Wait for ssh
gather_facts: false
hosts: all
tasks:
- name: check 22/tcp
ansible.builtin.wait_for:
port: 22
connect_timeout: 30
- name: Configure nginx
2025-01-03 11:33:57 +02:00
become: true
hosts: all
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