nginx/tasks/install.yml

31 lines
518 B
YAML
Raw Normal View History

2024-12-17 17:20:50 +01:00
---
- name: "nginx | apt update cache"
apt:
update_cache: yes
cache_valid_time: 86400 #One day
tags:
- nginx
- nginx_install
- name: "nginx | install packages"
apt:
name: "{{ item }}"
update_cache: true
state: present
with_items:
- nginx-common
- nginx-full
register: is_nginx
tags:
- nginx
- nginx_install
- name: "nginx | remove default vhost"
file:
path: "/etc/nginx/sites-enabled/default"
state: absent
tags:
- nginx
- nginx_install