Skip to content
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

Fix installation playbooks running on incompatible OSs #202

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Fix installation playbooks running on incompatible OSs #202

merged 2 commits into from
Dec 4, 2023

Conversation

sanatsathaye
Copy link
Contributor

The Almalinux playbook runs on Ubuntu and Debian, because the current fail logic is only succesful when both these conditions are true:

  1. Not RHEL
  2. Version < 9

So, it will only fail on some obscure system like Ubuntu 8 (side note, if you are trying to install Lemmy on a server with Ubuntu 8 I need answers).

To fix this I changed the fail to an assert and inverted the conditions. Changing the current "and" clause in the fail to an "or" would also make this work but IMO an assertion works better here.

@codyro
Copy link
Collaborator

codyro commented Dec 3, 2023

What a fun catch! When I created the playbook, I tried to avoid it running on unsupported RHEL systems. I hadn't considered anyone would try the RHEL/Alma playbook on Ubuntu/Debian systems.

I'll get this checked and merged once I'm home :).

@sanatsathaye
Copy link
Contributor Author

Yeah I did this by accident haha. It does eventually fail on one of the early RHEL exclusive steps (I think epel-release install?) so nothing major happens but let's not even allow this playbook to reach that stage shall we

@sanatsathaye sanatsathaye marked this pull request as draft December 3, 2023 20:08
@sanatsathaye sanatsathaye changed the title Fix Alma playbook running on non-Alma system Fix installation playbooks running on incompatible OSs Dec 3, 2023
@sanatsathaye sanatsathaye marked this pull request as ready for review December 3, 2023 20:16
@sanatsathaye
Copy link
Contributor Author

sanatsathaye commented Dec 3, 2023

Turns out the debian playbook also had the same issue so I added a check there as well. Haven't put a version check there though as there are still steps in the rest of the playbook for if version < 22.04. This can always be added later if the OS requirements change as Lemmy develops.

Also, I've clarified the fail_msg a bit in case people think it's for their system from where they're running ansible.

@ticoombs ticoombs added this to the 1.3.0 milestone Dec 4, 2023
@codyro codyro self-assigned this Dec 4, 2023
@codyro codyro merged commit d00ab06 into LemmyNet:main Dec 4, 2023
1 check passed
@codyro
Copy link
Collaborator

codyro commented Dec 4, 2023

Thanks!

(Thanks @ticoombs for tagging this, I promise I'm trying to be mindful of it!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants