如何通过pip OFFLINE安装最新版本的ansible

时间:2020-05-25 20:41:09

标签: python pip ansible yum rhel

我们正在研究linux redhat 7.2

首先,我们在计算机上下载ansible pkgs

pip download ansible
Collecting ansible
  Downloading https://files.pythonhosted.org/packages/00/5d/e10b83e0e6056dbd5b4809b451a191395175a57e3175ce04e35d9c5fc2a0/ansible-2.9.9.tar.gz (14.2MB)
    100% |████████████████████████████████| 14.2MB 73kB/s
  Saved ./ansible-2.9.9.tar.gz
Collecting jinja2 (from ansible)
  Downloading https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl (125kB)
    100% |████████████████████████████████| 133kB 2.7MB/s
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting PyYAML (from ansible)
  Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269kB)
    100% |████████████████████████████████| 276kB 2.0MB/s
  Saved ./PyYAML-5.3.1.tar.gz
Collecting cryptography (from ansible)
  Downloading https://files.pythonhosted.org/packages/5f/fc/a92bad2460d349ee9eb868f9f9dcddb7c8f42a45677d53a5c663fa251e75/cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl (2.7MB)
    100% |████████████████████████████████| 2.7MB 371kB/s
  Saved ./cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
  Downloading https://files.pythonhosted.org/packages/fb/40/f3adb7cf24a8012813c5edb20329eb22d5d8e2a0ecf73d21d6b85865da11/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography->ansible)
  Downloading https://files.pythonhosted.org/packages/08/29/8001b940ef40e7a25ffe8f3188bc9b118934b513d64f769dbf461e46f4ed/cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (387kB)
    100% |████████████████████████████████| 389kB 1.9MB/s
  Saved ./cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six>=1.4.1 (from cryptography->ansible)
  Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
  Saved ./six-1.15.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography->ansible)
  Downloading https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl
  Saved ./ipaddress-1.0.23-py2.py3-none-any.whl
Collecting enum34; python_version < "3" (from cryptography->ansible)
  Downloading https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
  Saved ./enum34-1.1.10-py2-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography->ansible)
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
    100% |████████████████████████████████| 112kB 3.3MB/s
  Saved ./pycparser-2.20-py2.py3-none-any.whl
Successfully downloaded ansible jinja2 PyYAML cryptography MarkupSafe cffi six ipaddress enum34 pycparser
You are using pip version 8.1.2, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

现在我们断开机器与网络的连接 我们打算通过pip安装以下文件

# ls -ltr
total 17508
-rw-r--r-- 1 root root 14222889 May 25 20:36 ansible-2.9.9.tar.gz
-rw-r--r-- 1 root root   125774 May 25 20:36 Jinja2-2.11.2-py2.py3-none-any.whl
-rw-r--r-- 1 root root   269377 May 25 20:36 PyYAML-5.3.1.tar.gz
-rw-r--r-- 1 root root  2728298 May 25 20:36 cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r-- 1 root root    24348 May 25 20:36 MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r-- 1 root root   387834 May 25 20:36 cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r-- 1 root root    10963 May 25 20:36 six-1.15.0-py2.py3-none-any.whl
-rw-r--r-- 1 root root    18159 May 25 20:36 ipaddress-1.0.23-py2.py3-none-any.whl
-rw-r--r-- 1 root root    11223 May 25 20:36 enum34-1.1.10-py2-none-any.whl
-rw-r--r-- 1 root root   112041 May 25 20:36 pycparser-2.20-py2.py3-none-any.whl

如何通过不带网络的pip安装ansible pkgs /文件?

0 个答案:

没有答案