GHP publish
This commit is contained in:
39
roles/nginx/tasks/configure.yml
Normal file
39
roles/nginx/tasks/configure.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
- block:
|
||||
- name: configure nginx.conf
|
||||
copy:
|
||||
content: "{{ nginx['nginx.conf'] }}"
|
||||
dest: "/etc/nginx/nginx.conf"
|
||||
notify: reload nginx
|
||||
when: nginx['nginx.conf'] is defined
|
||||
|
||||
- name: add configs nginx to conf.d
|
||||
copy:
|
||||
content: "{{ item.data }}"
|
||||
dest: "/etc/nginx/conf.d/{{ item.name }}"
|
||||
loop: "{{ nginx['conf.d'] }}"
|
||||
notify: reload nginx
|
||||
when: nginx['conf.d'] is defined
|
||||
|
||||
- name: add configs nginx to stream.d
|
||||
copy:
|
||||
content: "{{ item.data }}"
|
||||
dest: "/etc/nginx/stream.d/{{ item.name }}"
|
||||
loop: "{{ nginx['stream.d'] }}"
|
||||
notify: reload nginx
|
||||
when: nginx['stream.d'] is defined
|
||||
|
||||
- name: check if ssl dir exist
|
||||
file: path=/etc/nginx/ssl state=directory
|
||||
when: nginx.ssl is defined
|
||||
|
||||
- name: add ssl certs and keys
|
||||
copy:
|
||||
content: "{{ item.data }}"
|
||||
dest: "/etc/nginx/ssl/{{ item.name }}"
|
||||
loop: "{{ nginx.ssl }}"
|
||||
notify: reload nginx
|
||||
when: nginx.ssl is defined
|
||||
|
||||
tags:
|
||||
- nginx-configure
|
Reference in New Issue
Block a user