The Wait for SSH task in the create.yml playbook makes some assumptions:
ansible host is always directly accessible from the control node
port 22 is always used for connection
Both of them are not always true, especially the first one. Especially in cloud environments a bastion node / jumphost is used very often to connect to the VMs. Such a scenario can't be used with the current implementation.
Therefore I would suggest to move this task to the prepare.yml playbook. We can use wait_for_connection then, which respects the ssh config (jumphost, ports, ...) and the ansible config for these hosts. So both described use cases are now possible.
This can break existing configurations, if the prepare.yml is overridden within the actual molecule test.
The
Wait for SSH
task in thecreate.yml
playbook makes some assumptions:Both of them are not always true, especially the first one. Especially in cloud environments a bastion node / jumphost is used very often to connect to the VMs. Such a scenario can't be used with the current implementation.
Therefore I would suggest to move this task to the
prepare.yml
playbook. We can usewait_for_connection
then, which respects the ssh config (jumphost, ports, ...) and the ansible config for these hosts. So both described use cases are now possible.This can break existing configurations, if the
prepare.yml
is overridden within the actual molecule test.