Skip to content

Commit 2d86165

Browse files
authored
Use system python3 on centos7-ppc64 (#2275)
It install python 3.6.8. Ansible's previously built python3 wasn't capable of running node's ./configure, it lacked sufficient capabilities (like bzip2).
1 parent 2c43856 commit 2d86165

2 files changed

Lines changed: 20 additions & 32 deletions

File tree

ansible/roles/baselayout/tasks/partials/repo/centos7.yml

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,25 @@
3232
dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo"
3333
mode: 0644
3434

35-
- stat:
36-
path: /usr/local/bin/python3.7
37-
register: build_python37
38-
39-
- name: centos7 | ppc64 | download python 3.7
40-
get_url:
41-
url: https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
42-
dest: /tmp/
43-
when: "arch == 'ppc64' and build_python37.stat.exists == False"
44-
45-
- name: centos7 | ppc64 | unarchive python 3.7
46-
unarchive:
47-
src: /tmp/Python-3.7.3.tgz
48-
remote_src: yes
49-
dest: /tmp/
50-
when: "arch == 'ppc64' and build_python37.stat.exists == False"
51-
52-
- name: centos7 | ppc64 | configure python 3.7
53-
shell: /tmp/Python-3.7.3/configure
54-
args:
55-
chdir: /tmp/Python-3.7.3
56-
when: "arch == 'ppc64' and build_python37.stat.exists == False"
57-
58-
- name: centos7 | ppc64 | install python 3.7
59-
shell: make -j6 install
60-
args:
61-
chdir: /tmp/Python-3.7.3
62-
when: "arch == 'ppc64' and build_python37.stat.exists == False"
63-
35+
# Clean up from when Python 3 was installed from source
6436
- name: centos7 | ppc64 | clean python 3.7
6537
file:
6638
state: absent
67-
path: /tmp/Python-3.7
68-
when: "arch == 'ppc64' and build_python37.stat.exists == False"
39+
path: "{{ item }}"
40+
with_items:
41+
- /tmp/Python-3.7
42+
- /usr/local/bin/2to3
43+
- /usr/local/bin/2to3-3.7
44+
- /usr/local/bin/idle3
45+
- /usr/local/bin/idle3.7
46+
- /usr/local/bin/pydoc3
47+
- /usr/local/bin/pydoc3.7
48+
- /usr/local/bin/python3
49+
- /usr/local/bin/python3.7
50+
- /usr/local/bin/python3.7-config
51+
- /usr/local/bin/python3.7m
52+
- /usr/local/bin/python3.7m-config
53+
- /usr/local/bin/python3-config
54+
- /usr/local/bin/pyvenv
55+
- /usr/local/bin/pyvenv-3.7
56+
when: "arch == 'ppc64'"

ansible/roles/baselayout/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ packages: {
4343
# partials/repo/centos7.yml for arm64
4444
centos7_arm64: ['git'], # git2u not available for aarch64 (yet)
4545
centos7_x64: ['devtoolset-6-libatomic-devel,git2u,centos-release-scl'],
46-
centos7_ppc64: ['devtoolset-6-libatomic-devel,git'],
46+
centos7_ppc64: ['devtoolset-6-libatomic-devel,git,python3'],
4747

4848
centos7: [
4949
'bzip2-devel,openssl-devel,ccache,gcc-c++,devtoolset-6,sudo,zlib-devel,libffi-devel,devtoolset-8,devtoolset-8-libatomic-devel',

0 commit comments

Comments
 (0)