summaryrefslogtreecommitdiffstats
path: root/roles/nginx/tasks/nginx.yml
blob: 6cb2eea432600a140c24b96f33a79b7adb5e0a47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- name: install nginx
  dnf:
    name: nginx
    state: present

- name: Ensure nginx is started and enabled to start at boot.
  service: name=nginx state=started enabled=yes

- name: install nginx logrotation file
  copy:
    src: etc/logrotate.d/nginx
    dest: /etc/logrotate.d/nginx
    owner: root
    group: root
    mode: 0644

- name: install /etc/nginx/nginx.conf
  template:
    src: etc/nginx/nginx.conf.j2
    dest: /etc/nginx/nginx.conf
    owner: root
    group: root
    mode: 0644
  notify: restart nginx

- name: install /etc/nginx/conf.d/default.conf
  copy:
    src: etc/nginx/conf.d/default.conf
    dest: /etc/nginx/conf.d/default.conf
    owner: root
    group: root
    mode: 0644
  notify: restart nginx