ansible-role-nginx/tasks/amplify/install-amplify.yml
2018-09-12 14:03:20 -07:00

25 lines
732 B
YAML

---
- import_tasks: setup-debian.yml
when: ansible_os_family == "Debian"
- import_tasks: setup-redhat.yml
when: ansible_os_family == "RedHat"
- 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
src: /etc/amplify-agent/agent.configurator.conf.default
dest: /etc/amplify-agent/agent.configurator.conf
- name: "(Setup: All OSs) Configure NGINX Amplify Agent API Key"
lineinfile:
dest: /etc/amplify-agent/agent.conf
regexp: api_key =.*
line: "api_key = {{ amplify_api_key }}"
notify: "(Handler: All OSs) Start NGINX Amplify Agent"