Open samccann opened 2 years ago
Maybe we just need to detail what the before and after data is? Amazon frequently gives us results that look like:
{
'Key': 'string1',
'Value': 'string2'
},
The use of items2dict here lets us turn that into a dictionary with k:v pairs of {'string1': 'string2'}
which is much easier to work with.
@samccann @jillr yeah, thought of the same, we should generalize the examples using core functionality whenever possible, otherwise, i'm afraid, we have to replicate aws CI here..(as well as CI of other projects in the future which doesn't feel good). I've set up CI here. It runs sanity and integration tests. I also created a primitive test task to test the CI - it works as expected.
OK, I'll think how to extract the item2dict examples (make them general) from those tests and add another dedicated test task.
Done https://github.com/ansible-community/community-examples/pull/9. Any thoughts?
Another set from @jillr https://github.com/ansible-collections/amazon.aws/blob/main/tests/integration/targets/ec2_vpc_dhcp_option/tasks/main.yml
We could extract the item2dict examples from those tests. I do wonder how to 'convert' them to less complexity (focusing on item2dict but not on all the aws fun around it)