-
Notifications
You must be signed in to change notification settings - Fork 16
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
Simplify package installation process #74
base: master
Are you sure you want to change the base?
Simplify package installation process #74
Conversation
Currently, `warn` is passed to `args` argument in a few places. `warn` was removed in ansible 2.14[1] which makes it impossible to use ara_api role with ansible >=2.14. Patch proposes an easier way to install required packages on all package managers and ensure that their cache is updated. [1] ansible/ansible#70504
Build failed. ❌ ara-role-api-distributed-sqlite FAILURE in 11m 07s |
Hi @damiandabrowski5 and thanks for the PR! We're in the middle of refreshing the collection as it ran out of maintenance so it will be a good idea to include something like this as well. My priority is to land #71 first which will get the CI back in shape and we will eventually circle back to this. Thanks for your patience in the meantime. |
set_fact: | ||
ara_api_missing_packages: "{{ ara_api_required_packages | difference(ansible_facts['packages'].keys()) }}" | ||
|
||
# Only attempt to elevate privileges if there are any missing packages |
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'd rather not remove the logic around detecting whether or not packages are already installed and the reason why is in that comment.
In other words, the role is designed to be executable under an unprivileged user if the necessary packages have already been installed: ara can be set up and run within a user's home directory without relying on root or sudo privileges.
By removing this logic, ansible will try to elevate privileges (become: true
) and it will not work if Ansible isn't running with root or sudo.
We can remove warn: false
if it is an issue, which leaves the fix looking like this instead: Thulium-Drake@91ae432 (thanks @Thulium-Drake).
Hi @damiandabrowski5, sorry for the delay. I hope my explanation makes sense. We can either update this PR or submit a new one. Let us know if you would like to do it or we can take care of it. Thanks. |
@dmsimard thanks for an update, feel free to either update my PR or abandon it and create new one ;) I'm fine with both solutions |
Currently,
warn
is passed toargs
argument in a few places.warn
was removed in ansible 2.14[1] which makes it impossible to use ara_api role with ansible >=2.14.Patch proposes an easier way to install required packages on all package managers and ensure that their cache is updated.
[1] ansible/ansible#70504