This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support nginx amplify. * Updated readme. * Added missing Ansible tags. * Fixed comments related to PR review. * Limited installation of Nginx Amplify to the list of supported operating systems, as stated by Nginx's documentation. * Add nginx tag
- Loading branch information
1 parent
bafaf81
commit e67951b
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
- name: Check if Amplify Agent is installed | ||
package: | ||
name: nginx-amplify-agent | ||
state: present | ||
ignore_errors: true | ||
register: amplify_agent_installed | ||
tags: [packages] | ||
|
||
- name: Install Amplify Agent if not installed | ||
block: | ||
- name: Download Amplify Agent script | ||
get_url: | ||
url: "{{ nginx_amplify_script_url }}" | ||
dest: "{{ nginx_amplify_script_path }}" | ||
|
||
- name: Run Amplify Agent install.sh script | ||
command: "sh /tmp/install-amplify-agent.sh -y" | ||
environment: | ||
API_KEY: "{{ amplify.api_key }}" | ||
become: true | ||
become_user: root | ||
become_method: sudo | ||
|
||
- name: Remove installation script | ||
file: | ||
path: "{{ nginx_amplify_script_path }}" | ||
state: absent | ||
|
||
when: amplify_agent_installed.failed == true | ||
tags: [configuration, packages] | ||
|
||
- name: Update Amplify Agent if already installed and update flag is enabled | ||
package: | ||
name: nginx-amplify-agent | ||
state: latest | ||
when: amplify_agent_installed.failed == false and nginx_amplify_update_agent == true | ||
tags: [packages] | ||
|
||
- name: Verify Amplify agent is up and running | ||
service: | ||
name: amplify-agent | ||
state: started | ||
enabled: true | ||
tags: [service] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters