GHP publish

This commit is contained in:
ace
2021-01-09 20:54:42 +03:00
commit b4b740a239
173 changed files with 5392 additions and 0 deletions

View 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

View File

@ -0,0 +1,11 @@
---
- block:
- name: installing nginx
package:
name:
- nginx
state: present
notify: start nginx
register: install_nginx_result
tags:
- nginx-install

View File

@ -0,0 +1,8 @@
---
- block:
- import_tasks: install.yml
- import_tasks: configure.yml
become: true
tags:
- nginx