2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Configure NGINX Amplify agent repository
|
2020-09-15 21:27:06 +02:00
|
|
|
include_tasks: "{{ role_path }}/tasks/amplify/setup-{{ ansible_facts['os_family'] | lower }}.yml"
|
2020-09-18 15:09:59 +02:00
|
|
|
when: ansible_facts['os_family'] in ['Debian', 'RedHat']
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Install NGINX Amplify agent
|
2018-09-12 23:03:20 +02:00
|
|
|
package:
|
|
|
|
name: nginx-amplify-agent
|
|
|
|
state: present
|
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Copy NGINX configurator agent configuration template
|
2018-09-12 23:03:20 +02:00
|
|
|
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
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0644
|
2018-09-12 23:03:20 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Configure NGINX Amplify agent API key
|
2018-09-12 23:03:20 +02:00
|
|
|
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 }}"
|
2020-09-19 17:32:17 +02:00
|
|
|
notify: (Handler) Start NGINX Amplify agent
|