public-health-ch/ansible/roles/nginxinc.nginx/tasks/amplify/install-amplify.yml

24 lines
722 B
YAML
Raw Normal View History

2020-05-15 22:14:14 +00:00
---
2021-02-20 14:00:27 +00:00
- name: Configure NGINX Amplify agent repository
include_tasks: "{{ role_path }}/tasks/amplify/setup-{{ ansible_facts['os_family'] | lower }}.yml"
when: ansible_facts['os_family'] in ['Debian', 'RedHat']
2020-05-15 22:14:14 +00:00
2021-02-20 14:00:27 +00:00
- name: Install NGINX Amplify agent
2020-05-15 22:14:14 +00:00
package:
name: nginx-amplify-agent
state: present
2021-02-20 14:00:27 +00:00
- name: Copy NGINX configurator agent configuration template
2020-05-15 22:14:14 +00:00
copy:
remote_src: yes
src: /etc/amplify-agent/agent.conf.default
dest: /etc/amplify-agent/agent.conf
2021-02-20 14:00:27 +00:00
mode: 0644
2020-05-15 22:14:14 +00:00
2021-02-20 14:00:27 +00:00
- name: Configure NGINX Amplify agent API key
2020-05-15 22:14:14 +00:00
lineinfile:
dest: /etc/amplify-agent/agent.conf
regexp: api_key =.*
line: "api_key = {{ nginx_amplify_api_key }}"
2021-02-20 14:00:27 +00:00
notify: (Handler) Start NGINX Amplify agent