datastax / pulsar-ansible

Apache License 2.0
4 stars 9 forks source link

[ENHANCEMENT] Increase portability of buildAnsiHostInvFile.sh #30

Open MMirelli opened 2 years ago

MMirelli commented 2 years ago

buildAnsiHostInvFile.sh has been developed and tested on MacOS, ideally this should work on standard Linux distros (such as Ubuntu). A safe way to achieve this would be by transforming https://github.com/datastax/pulsar-ansible/blob/master/cluster_topology/%3Cpulsar_cluster_name%3E/clusterDefRaw into the hosts file by only using GNU sed and awk.

Avoiding associative arrays (adding the requirement of bash >= 4.3) would be preferable.

MMirelli commented 1 year ago

Using yaml plugin is a direction to experiment. This would allow having a yaml-based inventory, easier to manage than the ini one.

I found out about this from the OReilly course Ansible: From Basics to Guru - module 11.6.

More on yaml plugin: ansible-doc -t inventory yaml.