Open geoffo-dev opened 3 years ago
I should have mentioned I was having issues prior to this so installed the molecule_ec2-0.4.dev1 version.
subsequently I have tried on version 0.3 - I still had issues with 'tagged_instance' and the same issue with molecule header.
@geoffo-dev it's because the ec2 module is run async so it always shows change. but it doesn't create ec2 instances all the time so when it dumps config there is nothing to dump.
I think you can just change
when: server.changed |bool
to
when: ec2_jobs.changed |bool
but I just started looking at this myself and have to stop. Will pick it up again maybe later in the week. Essentially, it should only dump config if something really does change but it's picking that up on every task run, this will also break your destroy command so you can manually go delete your instances and start the create again and it will work once. Checking the async status for 'real change' is whats needed here. if you can figure that out you should be good.
also these filters
{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}"}
(molecule_to_yaml and molecule_header) all got dropped some versions back
this PR seems to fix it but misses some stuff https://github.com/ansible-community/molecule-ec2/pull/34/files/f4f4185db69692630667e190a35a55efd16b1a9e
When running a test in molecule I get the following error:
having looked through the create.yml file and debugged the result of
ec2-jobs
it looks like the instances object is emptyIt appears the data is now in the 'tagged_instances' object so have made the change.
Whilst changing this locally fixed the issue, a further issue occurs later:
I will be honest, this is where I start to get a little lost... I am not sure where any of those variables come from so I cannot check whether they are still valid...
Can anyone help?