andreasscherbaum / gpdb-ansible

Ansible scripts for Greenplum Database
Apache License 2.0
8 stars 7 forks source link

Stub out how multi-OS support looks #6

Open kdunn-pivotal opened 7 years ago

kdunn-pivotal commented 7 years ago

Again, love what you've done here - curious to see how the switch/case block fans out when using these detection capabilities.

andreasscherbaum commented 7 years ago

This certainly needs to be improved when support for more OS types is added. Right now I check on the top, so I don't have to add checks down the road in the Playbook.

kdunn-pivotal commented 7 years ago

Yep, seems like the right thing to do at this point. Ideally, the playbook would "key" off of the detected OS type. I'm sure there's an example of this somewhere.... Googling...

https://raymii.org/s/tutorials/Ansible_-_Only_if_on_specific_distribution_or_distribution_version.html

andreasscherbaum commented 7 years ago

That's what main.yml is doing. One could spread it out even further, and have different files for AWS and GPC and such, but they are all similar enough that it should be enough to just detect the platform it is running on.