ansible-role-nginx/tasks/amplify/install-amplify.yml

24 lines
731 B
YAML
Raw Normal View History

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"
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
package:
name: nginx-amplify-agent
state: present
- name: Copy NGINX Amplify configurator agent configuration template
copy:
remote_src: true
src: /etc/amplify-agent/agent.conf.default
dest: /etc/amplify-agent/agent.conf
mode: 0644
2020-09-19 17:32:17 +02:00
- name: Configure NGINX Amplify agent API key
lineinfile:
dest: /etc/amplify-agent/agent.conf
regexp: api_key =.*
line: "api_key = {{ nginx_amplify_api_key }}"
2020-09-19 17:32:17 +02:00
notify: (Handler) Start NGINX Amplify agent