2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-06-30 18:59:53 +02:00
|
|
|
- include_tasks: "{{ role_path }}/tasks/amplify/setup-{{ ansible_os_family | lower }}.yml"
|
|
|
|
when:
|
|
|
|
- ansible_os_family == "Debian"
|
|
|
|
or ansible_os_family == "Redhat"
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2018-09-12 23:03:20 +02:00
|
|
|
- name: "(Install: All OSs) Install NGINX Amplify Agent"
|
|
|
|
package:
|
|
|
|
name: nginx-amplify-agent
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: "(Setup: All OSs) Copy NGINX Configurator Agent Configuration Template"
|
|
|
|
copy:
|
|
|
|
remote_src: yes
|
2019-04-08 15:27:36 +02:00
|
|
|
src: /etc/amplify-agent/agent.conf.default
|
|
|
|
dest: /etc/amplify-agent/agent.conf
|
2018-09-12 23:03:20 +02:00
|
|
|
|
|
|
|
- name: "(Setup: All OSs) Configure NGINX Amplify Agent API Key"
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/amplify-agent/agent.conf
|
|
|
|
regexp: api_key =.*
|
2019-04-08 15:27:36 +02:00
|
|
|
line: "api_key = {{ nginx_amplify_api_key }}"
|
2018-09-12 23:03:20 +02:00
|
|
|
notify: "(Handler: All OSs) Start NGINX Amplify Agent"
|