2018-01-10 23:40:01 +01:00
|
|
|
---
|
2018-08-03 00:56:25 +02:00
|
|
|
- import_tasks: prerequisites/install-prerequisites.yml
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_prerequisites
|
2018-08-03 00:56:25 +02:00
|
|
|
|
2018-01-10 23:40:01 +01:00
|
|
|
- import_tasks: keys/apt-key.yml
|
2018-10-18 08:26:29 +02:00
|
|
|
when:
|
|
|
|
- ansible_os_family == "Debian"
|
2018-12-21 15:17:00 +01:00
|
|
|
- nginx_install_from == "nginx_repository"
|
|
|
|
or nginx_amplify_enable
|
|
|
|
or nginx_controller_enable
|
|
|
|
or nginx_unit_enable
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_aptkey
|
2018-01-10 23:40:01 +01:00
|
|
|
|
|
|
|
- import_tasks: keys/rpm-key.yml
|
2018-10-18 08:26:29 +02:00
|
|
|
when:
|
2018-12-21 15:17:00 +01:00
|
|
|
- ansible_os_family == "RedHat"
|
|
|
|
or ansible_os_family == "Suse"
|
|
|
|
- nginx_install_from == "nginx_repository"
|
|
|
|
or nginx_amplify_enable
|
|
|
|
or nginx_controller_enable
|
|
|
|
or nginx_unit_enable
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_rpmkey
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2019-05-20 18:32:08 +02:00
|
|
|
- import_tasks: keys/apk-key.yml
|
|
|
|
when: ansible_os_family == "Alpine"
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_apkkey
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2018-07-12 00:41:10 +02:00
|
|
|
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
|
|
|
|
block:
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2018-07-12 00:41:10 +02:00
|
|
|
- import_tasks: opensource/install-oss.yml
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_type == "opensource"
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_oss
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2018-07-12 00:41:10 +02:00
|
|
|
- import_tasks: plus/install-plus.yml
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_type == "plus"
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_plus
|
2018-01-19 19:27:47 +01:00
|
|
|
|
2019-02-15 15:51:09 +01:00
|
|
|
- import_tasks: conf/cleanup-config.yml
|
2019-05-20 18:32:08 +02:00
|
|
|
when: nginx_cleanup_config | bool
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_cleanup_config
|
2019-02-15 15:51:09 +01:00
|
|
|
|
2018-10-16 20:52:04 +02:00
|
|
|
- import_tasks: conf/upload-config.yml
|
2018-12-21 15:17:00 +01:00
|
|
|
when: nginx_main_upload_enable
|
|
|
|
or nginx_http_upload_enable
|
|
|
|
or nginx_stream_upload_enable
|
|
|
|
or nginx_html_upload_enable
|
|
|
|
or nginx_ssl_upload_enable
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_upload_config
|
2018-01-26 20:00:26 +01:00
|
|
|
|
2018-07-12 00:41:10 +02:00
|
|
|
- import_tasks: conf/template-config.yml
|
2018-12-21 15:17:00 +01:00
|
|
|
when: nginx_main_template_enable
|
|
|
|
or nginx_http_template_enable
|
|
|
|
or nginx_stream_template_enable
|
2019-02-28 20:27:18 +01:00
|
|
|
or nginx_rest_api_enable
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_template_config
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2018-07-12 00:41:10 +02:00
|
|
|
- import_tasks: conf/setup-status.yml
|
2019-05-20 18:32:08 +02:00
|
|
|
when: nginx_status_enable | bool
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_setup_status
|
2018-01-19 19:27:47 +01:00
|
|
|
|
2019-08-03 12:53:21 +02:00
|
|
|
- import_tasks: modules/install-modules.yml
|
|
|
|
when: true in nginx_modules.values()
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_modules
|
2019-08-03 12:53:21 +02:00
|
|
|
|
2018-10-16 20:52:04 +02:00
|
|
|
- import_tasks: conf/debug-output.yml
|
2019-05-20 18:32:08 +02:00
|
|
|
when: nginx_debug_output | bool
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_debug_output
|
2018-07-12 00:41:10 +02:00
|
|
|
|
2019-10-03 18:10:51 +02:00
|
|
|
- import_tasks: plus/delete-license.yml
|
2019-12-11 21:45:12 +01:00
|
|
|
when:
|
|
|
|
- nginx_type == "plus"
|
|
|
|
- nginx_delete_license
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_delete_license
|
2019-10-03 18:10:51 +02:00
|
|
|
|
2019-05-20 18:32:08 +02:00
|
|
|
when: nginx_enable | bool
|
2018-04-09 23:21:38 +02:00
|
|
|
|
2018-09-11 01:05:25 +02:00
|
|
|
- import_tasks: amplify/install-amplify.yml
|
2018-12-21 15:17:00 +01:00
|
|
|
when:
|
2019-05-20 18:32:08 +02:00
|
|
|
- nginx_amplify_enable | bool
|
2018-12-21 15:17:00 +01:00
|
|
|
- nginx_amplify_api_key is defined
|
2019-04-08 15:27:36 +02:00
|
|
|
- nginx_amplify_api_key | length > 0
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_amplify
|
2018-09-11 01:05:25 +02:00
|
|
|
|
|
|
|
- import_tasks: controller/install-controller.yml
|
2018-12-21 15:17:00 +01:00
|
|
|
when:
|
2019-05-20 18:32:08 +02:00
|
|
|
- nginx_controller_enable | bool
|
2019-12-12 03:25:20 +01:00
|
|
|
- nginx_controller_endpoint is defined
|
|
|
|
- nginx_controller_endpoint | length > 0
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_controller
|
2018-09-11 01:05:25 +02:00
|
|
|
|
2018-04-09 23:21:38 +02:00
|
|
|
- import_tasks: unit/install-unit.yml
|
2019-05-20 18:32:08 +02:00
|
|
|
when: nginx_unit_enable | bool
|
2019-11-19 15:47:29 +01:00
|
|
|
tags: nginx_install_unit
|