amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

Request - Feature parity with "expand_csv_tags" functionality of ec2 inventory script

Open dmhii opened this issue 4 years ago • 6 comments

SUMMARY

Request - Feature parity with "expand_csv_tags" functionality of ec2 inventory script.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

aws_ec2.py

ADDITIONAL INFORMATION

It would be useful to have the expand_csv_tags functionality from the old inventory script ported to the plugin. That is currently our only blocker from migrating to the ec2 plugin.

I was following a separate issue that awx raised (as they listed this as a potential blocker as well), but it looks like they might have moved on.

https://github.com/ansible/awx/issues/3472

dmhii avatar Jul 02 '20 12:07 dmhii

I don't have time to finish this right now and get it in shape for merging, but it can be done fairly easily with a custom filter: https://github.com/flowerysong/ansible-amazon.aws/commit/72f998ea5ba39ba078be517c205106fdf77f62fc

flowerysong avatar Jul 02 '20 18:07 flowerysong

Thank you @flowerysong for your contribution. We agree this is the right way to address the problen. This being said, your filter is generical enough to be included in a more common collection. Like community.general for instance.

waiting_on_contributor

goneri avatar Dec 04 '20 21:12 goneri

This is a very specific set of transformations and I don't see any way in which it would be generically useful, but feel free to do whatever. Since this isn't functionality I need it's not likely to be something I work on myself in the foreseeable future.

flowerysong avatar Dec 17 '20 18:12 flowerysong

Yes indeed, the module is more specific than I initially thought.

goneri avatar Dec 18 '20 17:12 goneri

We can address this with either @flowerysong filter plugin, or a new use_contrib_script_compatible_expand_csv_tags for the inventory plugin that would reproduce the same behaviour.

@jillr, @tadeboro, @tremble, do you have an opinion?

goneri avatar Apr 19 '21 17:04 goneri

We can address this with either @flowerysong filter plugin, or a new use_contrib_script_compatible_expand_csv_tags for the inventory plugin that would reproduce the same behaviour.

I would probably go with the custom filter option because it keeps the inventory plugin free of custom data processing logic.

tadeboro avatar Apr 19 '21 18:04 tadeboro