-
Notifications
You must be signed in to change notification settings - Fork 897
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
Run ansible-runner with PYTHONPATH set to access additional modules #19118
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.
Seems fine to me. One comment, but I assume you might have addressed this already or we can do it later.
lib/ansible/runner.rb
Outdated
@@ -300,6 +300,19 @@ def fetch_galaxy_roles(playbook_or_role_args) | |||
Ansible::Content.new(playbook_dir).fetch_galaxy_roles | |||
end | |||
|
|||
def python_env | |||
python3_modules_path = "/var/lib/awx/venv/ansible/lib/python3.6/site-packages/" | |||
python2_modules_path = "/var/lib/awx/venv/ansible/lib/python2.7/site-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.
Are the locations for these different on upstream
/downstream
?
Or maybe the proper questions is if we have to install things differently on upstream
/downstream
, if if that affects the location of these packages. Does it make sense that these are configurable vars?
Not a big deal, but something to consider and possibly do in a followup.
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.
Okay, just looked at ManageIQ/manageiq-appliance-build#340 and it seems like most of my questions are answered by that.
On the appliance we will install all the modules that were previously used by awx to utilize the cloud credential roles out of the box. In addition to this fix, we will need to install the modules on the appliance at build time. https://bugzilla.redhat.com/show_bug.cgi?id=1734129
21c79f5
to
50829f0
Compare
Success for this means that instead of complaining that
|
Checked commit carbonin@50829f0 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
We can really merge these in any order since it will be no worse if we don't have the modules installed, but we have this patch in place. Removing WIP since we've decided on where we're going to install the modules. |
Run ansible-runner with PYTHONPATH set to access additional modules (cherry picked from commit 3bedecb) https://bugzilla.redhat.com/show_bug.cgi?id=1734129
Ivanchuk backport details:
|
On the appliance we will install all the modules that were previously used by awx to utilize the cloud credential roles out of the box.
In addition to this fix, we will need to install the modules on the appliance at build time which is done in
ManageIQ/manageiq-appliance-build#340ManageIQ/manageiq-appliance-build#341https://bugzilla.redhat.com/show_bug.cgi?id=1734129