Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
main.yml 4.61 KiB
---
# file: webserver/tasks/main.yml
- name: include debian version specific configuration
include_vars:
file: "{{ ansible_distribution_release }}.yml"
tags:
- nginx
- webservices
- name: ensure nginx is installed
apt:
name:
- nginx
- nginx-full
state: present
notify:
- restart nginx
- restart nginx-proxy
tags:
- nginx
- webservices
- name: ensure we got our nginx config
template:
src: nginx.conf
dest: /etc/nginx/nginx.conf
owner: root
group: root
mode: '0644'
notify:
- restart nginx
tags:
- nginx
- webservices
- name: ensure we got our nginx-proxy config
template:
src: nginx-proxy.conf
dest: /etc/nginx/nginx-proxy.conf
owner: root
group: root
mode: '0644'
notify:
- restart nginx-proxy
tags:
- nginx
- webservices
- name: ensure there is the nginx-proxy group
group:
name: nginx-proxy
state: present
system: true
tags:
- nginx
- webservices
- name: ensure there is the nginx-proxy user
user:
name: nginx-proxy
state: present
group: nginx-proxy
system: true
shell: /usr/sbin/nologin
home: /var/www
createhome: false
tags:
- nginx
- webservices