Magnum playbook flushes handlers(that cause service restart) and then
it starts creating magnum resources right away.
In some cases(for ex. magnum tls upgrade job), magnum haproxy endpoint
is down before playbook flushes handlers. It means that after flushing
them, haproxy healthchecks need some time to rise magnum endpoint.
In this case, there is a high chance that playbook will try to connect
to magnum endpoint before haproxy marks it as alive.
To solve this issue, this patch implements an extra task to ensure
that magnum endpoint is reachable before playbook tries to reach it.
This patch also fixing linters issue in an example playbook to resolve
circular dependency.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I36cf9f4b71daa107e27e966ebe25816c7bffa42a