[PATCH v3 19/36] pynfs: Don't install xdrlib3 on older RHEL

Chuck Lever <[email protected]>
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
From: Chuck Lever <[email protected]>

When running the pynfs workflow on RHEL 8:

> :stderr:   Could not find a version that satisfies the requirement
> xdrlib3 (from versions: )
> No matching distribution found for xdrlib3

RHEL 8 sports a version of Python that neither requires or supports
the use of "pip install xdrlib3".

Reviewed-by: Luis Chamberlain <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
---
 playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
index 5139825ea872..6046c84ac4c4 100644
--- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
@@ -27,3 +27,5 @@
 - name: Install xdrlib3
   ansible.builtin.pip:
     name: xdrlib3
+  when:
+    - ansible_distribution == "Fedora" or ansible_distribution_major_version | int > 8
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.