nginx/tasks/install.yml
2024-12-17 17:20:50 +01:00

31 lines
518 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- 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