Skip to content

Commit fe4ddc7

Browse files
asm0deyphp-coder
authored andcommitted
ci: fixes E602 Don't compare to empty string
Should work regardless of ansible/ansible-lint#457 because `monitorid` and `apikey` are fields of uptimerobot object, not plain variables
1 parent 7480636 commit fe4ddc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scripts/ci/ansible/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
monitorid: "{{ uptimerobot.monitorid }}"
3232
apikey: "{{ uptimerobot.apikey }}"
3333
state: paused
34-
when: uptimerobot is defined and uptimerobot.monitorid != '' and uptimerobot.apikey != ''
34+
when: uptimerobot is defined and uptimerobot.monitorid and uptimerobot.apikey
3535

3636
# we can't use service module here because our sudoers allows to execute only exact commands
3737
- name: Stopping service
@@ -57,5 +57,5 @@
5757
monitorid: "{{ uptimerobot.monitorid }}"
5858
apikey: "{{ uptimerobot.apikey }}"
5959
state: started
60-
when: uptimerobot is defined and uptimerobot.monitorid != '' and uptimerobot.apikey != ''
60+
when: uptimerobot is defined and uptimerobot.monitorid and uptimerobot.apikey
6161

0 commit comments

Comments
 (0)