Skip to content

Commit 21e4624

Browse files
committed
Ping var evalution has been updated to latest ansible commands
1 parent 5a22065 commit 21e4624

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ansible/deploy-apigee-proxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
APIGEE_ORGANIZATION: "{{ lookup('env', 'APIGEE_ORGANIZATION') }}"
1111
APIGEE_ACCESS_TOKEN: "{{ lookup('env', 'APIGEE_ACCESS_TOKEN') }}"
1212
PROXY_DIR: "{{ lookup('env', 'PROXY_DIR') }}"
13-
PING: "{{ (lookup('env', 'PING') | length > 0) | ternary(lookup('env', 'PING'), 'true') }}"
13+
PING: "{{ (lookup('env', 'PING') | default('true')) | bool }}"
1414

1515
pre_tasks:
1616
- name: check FULLY_QUALIFIED_SERVICE_NAME

ansible/roles/deploy-apigee-proxy/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@
5757
url: "{{ api_uri }}/_ping"
5858
return_content: yes
5959
register: proxy_ping_response
60-
when: PING | bool
60+
when: PING
6161

6262
- name: set proxy_deployed_revision
6363
set_fact:
6464
proxy_deployed_revision: "{{ (proxy_ping_response.content | from_json).revision }}"
65-
when: PING | bool
65+
when: PING
6666

6767
- name: check correct revision was deployed
6868
fail:
6969
msg: "Incorrect revision {{ proxy_deployed_revision }}, was expecting {{ revision }}"
70-
when: PING | bool and proxy_deployed_revision != revision
70+
when: PING and proxy_deployed_revision != revision

0 commit comments

Comments
 (0)