ansible-roles/nginx/tasks/packages.yml
Brice Waegeneire 71879b999c nginx: Start server once.
Nginx is already started at the end of the main task. Starting the
service before we configure it correctly can put the role as failed if
the default configuration don't work on the host.
2022-07-05 15:57:41 +02:00

19 lines
392 B
YAML

- set_fact:
nginx_default_package_name: nginx-light
when: nginx_minimal | bool
- include: packages_backports.yml
when: nginx_backports | bool
# TODO: install "nginx" + only necessary modules, instead of "nginx-full"
- name: Nginx is installed
apt:
name: "{{ nginx_package_name | default(nginx_default_package_name) }}"
state: present
tags:
- nginx
- packages