-
Notifications
You must be signed in to change notification settings - Fork 660
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
improve ec2 template for molecule #2230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try to point problems I identified so far so you can address them quickly
a) title + description is misleading users because apparently you are improving only the ec2 template without altering the driver itself. that is good because it avoids breaking current users but needs to be clarifier
b) our travis tests are not doing any ec2 testing, so it will very unlikely to get positive feedback
We need to find an way to enable me (or someone else) to test the ec2 at least locally if not on CI. I happen to have personal aws account which I could use to test it (hopefully it will not leave any leftovers after running).
If you can give me some hints on how to test it I will be happy to help you.
Hi Sorin! I have improved title a bit ;) |
While trying it myself I ended up encountering ansible/ansible#60949 |
...rio/driver/ec2/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml
Outdated
Show resolved
Hide resolved
* support multiple Regions * support multiple VPCs in one Region * support CentOS and Debian images * correctly populate instance name via Tags Signed-off-by: Mykola Marzhan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This failed to pass even the most basic use case: molecule init role -d ec2 -r foo
and running create on it.
TASK [Check subnet] ************************************************************
Saturday 12 October 2019 09:44:06 +0100 (0:00:00.270) 0:00:00.270 ******
ok: [localhost] => (item={'name': 'instance', 'image': 'ami-a5b196c0', 'instance_type': 't2.micro', 'vpc_subnet_id': 'subnet-6456fd1f'})
TASK [debug] *******************************************************************
Saturday 12 October 2019 09:44:07 +0100 (0:00:00.914) 0:00:01.184 ******
ok: [localhost] => {
"subnet_facts": {
"changed": false,
"msg": "All items completed",
"results": [
{
"ansible_loop_var": "item",
"changed": false,
"failed": false,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"debug_botocore_endpoint_logs": false,
"ec2_url": null,
"filters": {
"subnet-id": "subnet-6456fd1f"
},
"profile": null,
"region": "eu-west-2",
"security_token": null,
"subnet_ids": [],
"validate_certs": true
}
},
"item": {
"image": "ami-a5b196c0",
"instance_type": "t2.micro",
"name": "instance",
"vpc_subnet_id": "subnet-6456fd1f"
},
"subnets": []
}
]
}
}
TASK [Populate subnet vpc] *****************************************************
Saturday 12 October 2019 09:44:07 +0100 (0:00:00.039) 0:00:01.224 ******
fatal: [localhost]: FAILED! => {}
MSG:
The task includes an option with an undefined variable. The error was: list object has no element 0
The error appears to be in '/Users/ssbarnea/os/molecule/foo-ec2/molecule/default/create.yml': line 42, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Populate subnet vpc
^ here
I am going to close this PR as is clearly breaking the driver. Feel free to raise it again once this sequence does not fail to pass:
|
Hi @ssbarnea, I have double-checked - everything works fine :( Could you please try again? |
changes are backward compatible and shouldn't affect current users
How to test
PR Type