Skip to content

Commit a7d3164

Browse files
cblancgdzien
authored andcommitted
Amplify installation fixes (#113)
* Remove syntax error When evaluated (i.e. when nginx_amplify_enable=true and nginx_amplify_api_key is defined) this line causes a syntax error To check for empty string, opted for temporary solution outlined in ansible/ansible-lint#457 * Fix reference to amplify api key Previously was labelled `amplify_api_key`. Changed to `nginx_amplify_api_key` in #a55a50d * Fix reference to default config file On my system at least (bionic), the default configuration file is `/etc/amplify-agent/agent.conf.default` This is also assumed be to the case on the amplify install shell script https://github.com/nginxinc/nginx-amplify-agent/blob/master/packages/install.sh#L526
1 parent e658031 commit a7d3164

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tasks/amplify/install-amplify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
- name: "(Setup: All OSs) Copy NGINX Configurator Agent Configuration Template"
1414
copy:
1515
remote_src: yes
16-
src: /etc/amplify-agent/agent.configurator.conf.default
17-
dest: /etc/amplify-agent/agent.configurator.conf
16+
src: /etc/amplify-agent/agent.conf.default
17+
dest: /etc/amplify-agent/agent.conf
1818

1919
- name: "(Setup: All OSs) Configure NGINX Amplify Agent API Key"
2020
lineinfile:
2121
dest: /etc/amplify-agent/agent.conf
2222
regexp: api_key =.*
23-
line: "api_key = {{ amplify_api_key }}"
23+
line: "api_key = {{ nginx_amplify_api_key }}"
2424
notify: "(Handler: All OSs) Start NGINX Amplify Agent"

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
when:
5959
- nginx_amplify_enable
6060
- nginx_amplify_api_key is defined
61-
- nginx_amplify_api_key
61+
- nginx_amplify_api_key | length > 0
6262

6363
- import_tasks: controller/install-controller.yml
6464
when:

0 commit comments

Comments
 (0)