-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EC2 public_ip_address not always set after ec2_instance creation #43
Comments
@kuwv did you come up with any workaround for this, such as adding an additional query after instance creation? |
@Aftermath I had to shift my attention to other work. I don't remember if there was an existing issue or if I submitted one for the ec2_instance module. LMC. |
I think you just need to add the following to the create.yml
According to this https://stackoverflow.com/a/71269582 |
@Tjhayhay yeah it definitely seems it's just as simple as that. One correction though is that the molecule role needs to set it correctly. |
Agreed, this seems to resolve the issue. |
Ran into this recently - is anyone working on a patch for the default cookiecutter? In case nobody's got the bandwidth, I'd be happy to make a PR for this as well. |
@danielpodwysocki sure that would be great. I've been waiting for some free time to do it but just haven't had time. |
Overview
While creating EC2 instances with the default create playbook the "Collect instance configs" task will fail randomly. This is due to the ec2_instance (set with assign_public_ip) being created but not waiting to be populated with the public IP address. The register attribute is then undefined when that above task is run.
I attempted downgrading from molecule 0.4.* to 0.3.5. with corresponding downgrade for molecule-ec2 also. It did not work.
This issue is obviously with ec2_instance itself but since it directly effects molecule-ec2 I submitted this issue for tracking purposes. Also, this could potentially be resolved with different designs without directly modify ec2_instance.
The text was updated successfully, but these errors were encountered: