2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Configure NGINX Amplify agent repository
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.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
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.package:
|
2018-09-12 23:03:20 +02:00
|
|
|
name: nginx-amplify-agent
|
|
|
|
state: present
|
|
|
|
|
2022-02-16 18:51:41 +01:00
|
|
|
- name: Copy NGINX Amplify configurator agent configuration template
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.copy:
|
2021-06-02 17:47:44 +02:00
|
|
|
remote_src: true
|
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
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.lineinfile:
|
2018-09-12 23:03:20 +02:00
|
|
|
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
|