File tree 7 files changed +47
-15
lines changed 7 files changed +47
-15
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ modules:
225
225
# Requires access to either the NGINX stub status or the NGINX Plus REST API.
226
226
# Default is null.
227
227
amplify_enable : false
228
- amplify_key : null
228
+ amplify_api_key : null
229
229
230
230
# Install NGINX Controller.
231
231
# Use your NGINX Controller API key and NGINX Controller API endpoint.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ modules:
58
58
# Requires access to either the NGINX stub status or the NGINX Plus REST API.
59
59
# Default is null.
60
60
amplify_enable : false
61
- amplify_key : null
61
+ amplify_api_key : null
62
62
63
63
# Install NGINX Controller.
64
64
# Use your NGINX Controller API key and NGINX Controller API endpoint.
Original file line number Diff line number Diff line change 10
10
name : nginx
11
11
state : reloaded
12
12
13
+ - name : " (Handler: All OSs) Start NGINX Amplify Agent"
14
+ service :
15
+ name : amplify-agent
16
+ state : started
17
+
18
+ - name : " (Handler: All OSs) Start NGINX Controller Agent"
19
+ service :
20
+ name : controller-agent
21
+ state : started
22
+
13
23
- name : " (Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
14
24
service :
15
25
name : unit
21
31
name : unitd
22
32
state : started
23
33
enabled : yes
24
-
25
- - name : " (Handler: All OSs) Start NGINX Controller Agent"
26
- service :
27
- name : controller-agent
28
- state : started
Original file line number Diff line number Diff line change 1
1
---
2
- - import_tasks : ../conf/setup-status.yml
2
+ - import_tasks : setup-debian.yml
3
+ when : ansible_os_family == "Debian"
3
4
4
- - name : " (Install: All NGINX) Download NGINX Amplify Script"
5
- get_url :
6
- url : https://github.com/nginxinc/nginx-amplify-agent/raw/master/packages/install.sh
7
- dest : /tmp/install.sh
5
+ - import_tasks : setup-redhat.yml
6
+ when : ansible_os_family == "RedHat"
8
7
9
- - name : " (Install: All NGINX) Install NGINX Amplify"
10
- shell : API_KEY='{{ amplify_key }}' sh /tmp/install.sh -y
8
+ - name : " (Install: All OSs) Install NGINX Amplify Agent"
9
+ package :
10
+ name : nginx-amplify-agent
11
+ state : present
12
+
13
+ - name : " (Setup: All OSs) Copy NGINX Configurator Agent Configuration Template"
14
+ copy :
15
+ remote_src : yes
16
+ src : /etc/amplify-agent/agent.configurator.conf.default
17
+ dest : /etc/amplify-agent/agent.configurator.conf
18
+
19
+ - name : " (Setup: All OSs) Configure NGINX Amplify Agent API Key"
20
+ lineinfile :
21
+ dest : /etc/amplify-agent/agent.conf
22
+ regexp : api_key =.*
23
+ line : " api_key = {{ amplify_api_key }}"
24
+ notify : " (Handler: All OSs) Start NGINX Amplify Agent"
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : " (Install: Debian/Ubuntu) Add NGINX Amplify Agent Repository"
3
+ apt_repository :
4
+ filename : nginx-amplify
5
+ repo : deb http://packages.amplify.nginx.com/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release|lower }} amplify-agent
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : " (Install: CentOS/RedHat/Amazon Linux) Add NGINX Amplify Agent Repository"
3
+ yum_repository :
4
+ name : nginx-amplify
5
+ baseurl : http://packages.amplify.nginx.com/{{ (ansible_distribution == "Amazon") | ternary('amzn/', 'centos/') }}/$releasever/$basearch/
6
+ description : NGINX Amplify Agent
7
+ enabled : yes
8
+ gpgcheck : yes
Original file line number Diff line number Diff line change 34
34
when : nginx_enable
35
35
36
36
- import_tasks : amplify/install-amplify.yml
37
- when : amplify_enable and amplify_key is defined and amplify_key
37
+ when : amplify_enable and amplify_api_key is defined and amplify_api_key
38
38
39
39
- import_tasks : controller/install-controller.yml
40
40
when : controller_enable and controller_api_key is defined and controller_api_key and controller_api_endpoint is defined and controller_api_endpoint
You can’t perform that action at this time.
0 commit comments