-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add distribution detection logic #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rtorrero,
I guess that this approach is good enough if the differences are so small.
There are other strategies like having specific variables files per distro for more advanced use cases.
My unique concern again is the PR environment, which I think we start failing again.
What do you have in mind for that?
playbook.yml
Outdated
@@ -3,79 +3,87 @@ | |||
- name: Install thirdparties | |||
hosts: trento-server | |||
become: true | |||
pre_tasks: | |||
- name: Check SLES distribution and version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check if we need to accept openSUSE leap as well.
Otherwise the PR environment workflow will start failing, as It is not based on SLES4SAP (but i'm not sure if it is based in Leap neither)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, let's discuss it today in the daily 👍
playbook.yml
Outdated
- gcc | ||
- python3-devel | ||
- sudo | ||
- name: Install installation prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need some yaml linter here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go for the double-space indenting that is used more extensively. Should we enforce this in the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care, as long as we don't do this "out of the blue" changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as @arbulu89, also we need to support LEAP, for the pr env itself and also for Vagrant usage/testing
We can go with the latest leap version, changing the Vagrant box ofc
@CDimonaco @arbulu89 changes applies, except for the linting. I would like to address that separately as we need to change more than a few existing files. I will do that next and add https://github.com/marketplace/actions/yaml-lint to the CI, wdyt? |
Please check locally on the machine if yaml lint and ansible-lint conficts, ansible lint has already some rules on formatting the yaml files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would personally remove all the linting changes, and apply them once we have some linting rules
playbook.yml
Outdated
- gcc | ||
- python3-devel | ||
- sudo | ||
- name: Install installation prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care, as long as we don't do this "out of the blue" changes
This PR adds:
expect
workaround that manually installs the user/group for prometheus. This conditional will ensure that the workaround is only executed when needed (SP4 and SP5)I've checked the logic in all 3 supported targets and it works as expected