ansible-role-nginx/tasks/main.yml
Christopher Blanchard a7d3164ba1 Amplify installation fixes (#113)
* Remove syntax error

When evaluated (i.e. when nginx_amplify_enable=true and
nginx_amplify_api_key is defined) this line causes a syntax error

To check for empty string, opted for temporary solution outlined in https://github.com/ansible/ansible-lint/issues/457

* Fix reference to amplify api key

Previously was labelled `amplify_api_key`. Changed to
`nginx_amplify_api_key` in #a55a50d

* Fix reference to default config file

On my system at least (bionic), the default configuration file is
`/etc/amplify-agent/agent.conf.default`

This is also assumed be to the case on the amplify install shell script https://github.com/nginxinc/nginx-amplify-agent/blob/master/packages/install.sh#L526
2019-04-08 14:27:36 +01:00

73 lines
2.0 KiB
YAML

---
- import_tasks: prerequisites/install-prerequisites.yml
- import_tasks: keys/apt-key.yml
when:
- ansible_os_family == "Debian"
- nginx_install_from == "nginx_repository"
or nginx_amplify_enable
or nginx_controller_enable
or nginx_unit_enable
- import_tasks: keys/rpm-key.yml
when:
- 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
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
block:
- import_tasks: opensource/install-oss.yml
when: nginx_type == "opensource"
- import_tasks: plus/install-plus.yml
when: nginx_type == "plus"
- import_tasks: conf/cleanup-config.yml
when: nginx_cleanup_config
- import_tasks: modules/install-modules.yml
when: true in nginx_modules.values()
- import_tasks: conf/upload-config.yml
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
- import_tasks: conf/template-config.yml
when: nginx_main_template_enable
or nginx_http_template_enable
or nginx_stream_template_enable
or nginx_rest_api_enable
- import_tasks: conf/setup-status.yml
when: nginx_status_enable
- import_tasks: conf/debug-output.yml
when: nginx_debug_output
when: nginx_enable
- import_tasks: amplify/install-amplify.yml
when:
- nginx_amplify_enable
- nginx_amplify_api_key is defined
- nginx_amplify_api_key | length > 0
- import_tasks: controller/install-controller.yml
when:
- nginx_controller_enable
- nginx_controller_api_key is defined
- nginx_controller_api_key
- nginx_controller_api_endpoint is defined
- nginx_controller_api_endpoint
- import_tasks: unit/install-unit.yml
when: nginx_unit_enable