StackStorm / ansible-st2

Ansible Roles and Playbooks to deploy StackStorm
https://galaxy.ansible.com/StackStorm/stackstorm/
Apache License 2.0
100 stars 77 forks source link

Drop U16 and add U20 support #298

Closed winem closed 3 years ago

winem commented 3 years ago

This PR drops the support for Ubuntu 16 (xenial) and adds support for Ubuntu 20 (focal).

In addition this PR also adds meta/main.yml files for the redis and smoketests role which weren't there yet. This is rather a matter of consistency than of functionality but it seems a good chance to get this done.

It also removes support for MongoDB-Versions that are already EoL as there are 3.2 and 3.4.

Tests with st2repo_name = unstable were successful.

arm4b commented 3 years ago

Looks like we'll also need to add U20 to CI, per https://travis-ci.org/github/StackStorm/ansible-st2/builds/773942784 list

winem commented 3 years ago

Will update the ci files (travis, kitchen, etc.) till tomorrow evening.

cognifloyd commented 3 years ago

mongodb_version needs to change for debian 20. You added an extra vars file and tasks to load that. I think it would be cleaner to consolidate the version choice in the defaults file, which looks like:

https://github.com/StackStorm/ansible-st2/blob/94e3c4f37e023b2783b0de4294f2dc154d73150f/roles/StackStorm.mongodb/defaults/main.yml#L2-L3

But you could do this:

 # MongoDB default version
-mongodb_version: "4.0" 
+mongodb_version: "{% if ansible_facts.os_family == 'Debian' and ansible_facts.distribution_major_version == '20' %}4.4{% else %}4.0{% endif %}" 
winem commented 3 years ago

mongodb_version needs to change for debian 20. You added an extra vars file and tasks to load that. I think it would be cleaner to consolidate the version choice in the defaults file, which looks like:

https://github.com/StackStorm/ansible-st2/blob/94e3c4f37e023b2783b0de4294f2dc154d73150f/roles/StackStorm.mongodb/defaults/main.yml#L2-L3

But you could do this:

 # MongoDB default version
-mongodb_version: "4.0" 
+mongodb_version: "{% if ansible_facts.os_family == 'Debian' and ansible_facts.distribution_major_version == '20' %}4.4{% else %}4.0{% endif %}" 

I did it like that now. Guess that's the smartest solution to the issue and does not break with any common pattern or best practices.

arm4b commented 3 years ago

All green, great work everyone!