Checking the fix condition first in the when clause rather than the dynamic condition. Otherwise it will raise issue, especially in multinode env.
For example use
when: - nova_console == 'novnc' - inventory_hostname in groups['nova-novncproxy']
rather than
when: - inventory_hostname in groups['nova-novncproxy'] - nova_console == 'novnc'
Because the nova-novncproxy groups may do not exist.
Checking the fix condition first in the when clause rather than the
dynamic condition. Otherwise it will raise issue, especially in
multinode env.
For example use
when: 'nova-novncprox y']
- nova_console == 'novnc'
- inventory_hostname in groups[
rather than
when: 'nova-novncprox y']
- inventory_hostname in groups[
- nova_console == 'novnc'
Because the nova-novncproxy groups may do not exist.