Hi all,
I’m struggling with the following conditional check:
`
-
set_fact:
url: “{{ url | default(‘www.search.ch’) }}”
url_points_to: “‘{{ lookup(‘dig’, ‘{{ url }}’) }}’” -
block:
-
name: “Check if {{ url }} points to our Liferay Webserver”
fail:
msg: “DNS doesn’t point to our Liferay webserver. Let’s encrypt won’t work!” -
meta: end_play
when: -
url_points_to != “lr_public_ip”
-
deploy_type == “goinglive”
`
Although I provide the IP, which points to www.search.ch in this example, it always fails.
From the debugger I see:
(debug) p vars['deploy_type'] u'goinglive' (debug) p vars['lr_public_ip'] u'195.141.85.90' (debug) p vars['url_points_to'] u"'195.141.85.90'"
I see quotes on url_points_to, but I was not able to remove them.
Any help kindly appreciated.
Marc