Ansible是一个简单的强大的无代理的自动化运维工具;(自动化运维工具)
前言:我看网上很多部署Ansible教程都是基于Centos或者RHEL的,我这个测试环境是基于SUSE系统部署Ansible,因为本人是第一次写博文,如有错漏,还请见谅!
1. 实验环境
192.168.64.150 | control |
192.168.64.151 | node1 |
192.168.64.152 | node2 |
系统版本:SLE-12-SP5-Server
linux-u11q:~ # cat /etc/os-release
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"
2. 准备依赖包环境
通过zypper安装gcc、python-devel、openssl等依赖包
linux-u11q:~ # zypper se python-devel
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+--------------+-------------------------------------------------------------------+--------
| python-devel | Include Files and Libraries Mandatory for Building Python Modules | package
linux-u11q:~ # zypper in python-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
python-devel
1 new package to install.
Overall download size: 3.4 MiB. Already cached: 0 B. After the operation, additional 21.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package python-devel-2.7.13-28.31.1.x86_64 (1/1), 3.4 MiB ( 21.0 MiB unpacked)
Checking for file conflicts: ......................................................................................................................................[done]
(1/1) Installing: python-devel-2.7.13-28.31.1.x86_64 ..............................................................................................................[done]
linux-u11q:~ # zypper se openssl
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+----------------------------+------------------------------------------------------------------------------+-----------
| libgnutls-openssl27 | The GNU Transport Layer Security Library | package
| libopenssl-1_0_0-devel | Development files for OpenSSL | package
| libopenssl-devel | Include Files and Libraries mandatory for Development | package
i | libopenssl1_0_0 | Secure Sockets and Transport Layer Security | package
| libopenssl1_0_0-32bit | Secure Sockets and Transport Layer Security | package
| libopenssl1_0_0-hmac | HMAC files for FIPS-140-2 integrity checking of the openssl shared libraries | package
| libopenssl1_0_0-hmac-32bit | HMAC files for FIPS-140-2 integrity checking of the openssl shared libraries | package
| libopenssl1_1 | Secure Sockets and Transport Layer Security | package
| libopenssl1_1-32bit | Secure Sockets and Transport Layer Security | package
i | libxmlsec1-openssl1 | OpenSSL crypto plugin for XML Security Library | package
i | openssl | Secure Sockets and Transport Layer Security | package
| openssl | Secure Sockets and Transport Layer Security | srcpackage
i | openssl-1_0_0 | Secure Sockets and Transport Layer Security | package
| openssl-1_0_0 | Secure Sockets and Transport Layer Security | srcpackage
| openssl-1_0_0-doc | Additional Package Documentation | package
| openssl-1_1 | Secure Sockets and Transport Layer Security | srcpackage
| openssl-ibmpkcs11 | OpenSSL Dynamic PKCS #11 Engine | package
| openssl-ibmpkcs11 | OpenSSL Dynamic PKCS #11 Engine | srcpackage
| openssl_tpm_engine | OpenSSL TPM interface engine plugin | package
| openssl_tpm_engine | OpenSSL TPM interface engine plugin | srcpackage
| perl-Crypt-OpenSSL-RSA | RSA encoding and decoding, using the openSSL libraries | package
| perl-Crypt-OpenSSL-RSA | RSA encoding and decoding, using the openSSL libraries | srcpackage
| perl-Crypt-OpenSSL-Random | Crypt::OpenSSL::Random Perl module | package
| perl-Crypt-OpenSSL-Random | Crypt::OpenSSL::Random Perl module | srcpackage
i | python-pyOpenSSL | Python wrapper module around the OpenSSL library | package
| python-pyOpenSSL | Python wrapper module around the OpenSSL library | srcpackage
| python3-pyOpenSSL | Python wrapper module around the OpenSSL library | package
linux-u11q:~ # zypper in libopenssl-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 3 NEW packages are going to be installed:
libopenssl-1_0_0-devel libopenssl-devel zlib-devel
3 new packages to install.
Overall download size: 439.8 KiB. Already cached: 0 B. After the operation, additional 2.1 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package zlib-devel-1.2.11-9.42.x86_64 (1/3), 111.5 KiB (385.9 KiB unpacked)
Retrieving package libopenssl-1_0_0-devel-1.0.2p-3.11.1.x86_64 (2/3), 283.4 KiB ( 1.7 MiB unpacked)
Retrieving package libopenssl-devel-1.0.2p-1.13.noarch (3/3), 44.9 KiB ( 246 B unpacked)
Checking for file conflicts: ......................................................................................................................................[done]
(1/3) Installing: zlib-devel-1.2.11-9.42.x86_64 ...................................................................................................................[done]
(2/3) Installing: libopenssl-1_0_0-devel-1.0.2p-3.11.1.x86_64 .....................................................................................................[done]
(3/3) Installing: libopenssl-devel-1.0.2p-1.13.noarch .............................................................................................................[done]
linux-u11q:~ #
3. 所需要的依赖和模块
asn1crypto
cffi
cryptography
ecdsa
ipaddress
Jinja2
MarkupSafe
paramiko
pyasn1
pycparser
pycrypto
PyNaCl
PyYAML
setuptools
simplejson
six
PS:其实SUSE安装镜像已经自带有部分python模块包,可以直接通过zypper安装了
python模块包下载地址:https://pypi.org/project
通过zypper se python查看:
control:~ # zypper se python
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+-----------------------------+--------------------------------------------------------------------------+-----------
| OpenIPMI-python | OpenIPMI | package
| apache2-mod_python | A Python Module for the Apache 2 Web Server | package
| apache2-mod_python | A Python Module for the Apache 2 Web Server | srcpackage
| dbus-1-python | Python bindings for D-Bus | package
| dbus-1-python | Python bindings for D-Bus | srcpackage
| dbus-1-python3 | Python bindings for D-Bus | package
| dbus-1-python3 | Python bindings for D-Bus | srcpackage
| freeradius-server-python | Python support for freeradius | package
| gnome-python-desktop | Python bindings for GNOME | srcpackage
i | libpython2_7-1_0 | Python Interpreter shared library | package
| libpython2_7-1_0-32bit | Python Interpreter shared library | package
i | libpython3_4m1_0 | Python Interpreter shared library | package
| libpython3_4m1_0-32bit | Python Interpreter shared library | package
| libpython3_6m1_0 | Python Interpreter shared library | package
| openlmi-python-base | Python namespace package for OpenLMI python projects | package
| policycoreutils-python | SELinux policy core python utilities | package
| postgresql10-plpython | The PL/Python Procedural Languages for PostgreSQL | package
i | python | Python Interpreter | package
| python | Python Interpreter | srcpackage
| python-32bit | Python Interpreter | package
| python-Cheetah | Cheetah is a template engine and code generation tool | package
| python-Cheetah | Cheetah is a template engine and code generation tool | srcpackage
| python-M2Crypto | Crypto and SSL toolkit for Python | package
| python-M2Crypto | Crypto and SSL toolkit for Python | srcpackage
| python-PrettyTable | Library for displaying tabular data in a visually appealing ASCII format | package
| python-PrettyTable | Library for displaying tabular data in a visually appealing ASCII format | srcpackage
| python-PyYAML | YAML parser and emitter for Python | package
| python-PyYAML | YAML parser and emitter for Python | srcpackage
| python-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | package
| python-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | srcpackage
| python-argparse | Python command-line parsing library | package
| python-argparse | Python command-line parsing library | srcpackage
| python-augeas | Python bindings for Augeas | package
| python-augeas | Python bindings for Augeas | srcpackage
i | python-base | Python Interpreter base package | package
| python-base | Python Interpreter base package | srcpackage
| python-base-32bit | Python Interpreter base package | package
i | python-bind | A module allowing rndc commands to be sent from Python programs | package
i | python-cairo | Python Bindings for Cairo | package
| python-cairo | Python Bindings for Cairo | srcpackage
| python-cephfs | Python 2 libraries for Ceph distributed file system | package
i | python-certifi | Python package for providing Mozilla's CA Bundle | package
| python-certifi | Python package for providing Mozilla's CA Bundle | srcpackage
i | python-cffi | Foreign Function Interface for Python calling C code | package
| python-cffi | Foreign Function Interface for Python calling C code | srcpackage
i | python-chardet | Universal encoding detector | package
| python-chardet | Universal encoding detector | srcpackage
| python-click | A simple wrapper around optparse for powerful command line utilities | srcpackage
| python-configobj | Config file reading, writing and validation | package
| python-configobj | Config file reading, writing and validation | srcpackage
| python-configshell | A framework to implement simple but nice CLIs | package
| python-configshell | A framework to implement simple but nice CLIs | srcpackage
| python-configshell-fb | A Python library for building configuration shells | package
| python-configshell-fb | A Python library for building configuration shells | srcpackage
i | python-cryptography | Python library which exposes cryptographic recipes and primitives | package
| python-cryptography | Python library which exposes cryptographic recipes and primitives | srcpackage
| python-cssselect | CSS3 selectors for Python | package
| python-cssselect | CSS3 selectors for Python | srcpackage
| python-cups | Python Bindings for CUPS | package
| python-cups | Python Bindings for CUPS | srcpackage
| python-cupshelpers | High-level Python Bindings for CUPS | package
i | python-curses | Python Interface to the (N)Curses Library | package
| python-dateutil | A Python Datetime Library | package
| python-dateutil | A Python Datetime Library | srcpackage
i | python-dbus-python | Python bindings for D-Bus | package
| python-dbus-python | Python bindings for D-Bus | srcpackage
| python-decorator | Better living through Python with decorators | package
| python-decorator | Better living through Python with decorators | srcpackage
| python-deltarpm | Tools to Create and Apply deltarpms | package
| python-demo | Python Demonstration Scripts | package
| python-devel | Include Files and Libraries Mandatory for Building Python Modules | package
| python-dmidecode | Python module to access DMI data | package
| python-dmidecode | Python module to access DMI data | srcpackage
| python-doc | Additional Package Documentation for Python | package
| python-doc | Additional Package Documentation for Python | srcpackage
| python-doc-pdf | Python PDF Documentation | package
| python-docopt | Pythonic argument parser, that will make you smile | package
| python-docopt | Pythonic argument parser, that will make you smile | srcpackage
i | python-enum34 | Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4 | package
| python-enum34 | Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4 | srcpackage
| python-ethtool | Ethernet settings python bindings | package
| python-ethtool | Ethernet settings python bindings | srcpackage
| python-evtx | Windows Event Log files parser | package
| python-evtx | Windows Event Log files parser | srcpackage
| python-future | Clean single-source support for Python 3 and 2 | package
| python-future | Clean single-source support for Python 3 and 2 | srcpackage
| python-gconf | Python bindings for GConf | package
| python-gdbm | Python Interface to the GDBM Library | package
| python-gnome | Python bindings for GNOME | srcpackage
| python-gnomekeyring | Python bindings for GNOME Keyring | package
i | python-gobject | Python bindings for GObject | package
| python-gobject | Python bindings for GObject | srcpackage
i | python-gobject-Gdk | Python bindings for GObject -- Gdk bindings | package
i | python-gobject-cairo | Python bindings for GObject -- Cairo bindings | package
i | python-gobject2 | Python bindings for GObject | package
| python-gobject2 | Python bindings for GObject | srcpackage
i | python-gtk | Python bindings for the GTK+ widget set | package
| python-gtk | Python bindings for the GTK+ widget set | srcpackage
| python-gtk-doc | Python bindings for the GTK+ widget set | package
| python-gtk-vnc | Python bindings for the gtk-vnc library | package
| python-idle | An Integrated Development Environment for Python | package
i | python-idna | Internationalized Domain Names in Applications (IDNA) | package
| python-idna | Internationalized Domain Names in Applications (IDNA) | srcpackage
| python-imaging | The Python Imaging Library - PIL | package
| python-imaging | The Python Imaging Library - PIL | srcpackage
i | python-ipaddr | Google's IP address manipulation library | package
| python-ipaddr | Google's IP address manipulation library | srcpackage
i | python-ipaddress | IPv4/IPv6 manipulation library | package
| python-ipaddress | IPv4/IPv6 manipulation library | srcpackage
| python-ipy | Class and Tools for Handling of IPv4 and IPv6 Addresses and Networks | package
| python-ipy | Class and Tools for Handling of IPv4 and IPv6 Addresses and Networks | srcpackage
| python-jabberpy | Python xmlstream and jabber IM protocol libs | package
| python-jabberpy | Python xmlstream and jabber IM protocol libs | srcpackage
| python-keyring | Store and access your passwords safely | package
| python-keyring | Store and access your passwords safely | srcpackage
| python-kiwi | KIWI - Appliance Builder Next Generation | srcpackage
| python-kmod | Python module to work with kernel modules | package
| python-kmod | Python module to work with kernel modules | srcpackage
| python-libguestfs | Provides Python support for libguestfs | package
| python-libmount | Python bindings for the libmount library | package
| python-libmount | Python bindings for the libmount library | srcpackage
| python-libstoragemgmt | Python client libraries and plug-in support for libstoragemgmt | package
| python-libstoragemgmt-clibs | Python C extension for libstoragemgmt | package
| python-libteam | Python bindings for libteam | package
i | python-libvirt-python | Library providing a virtualization API | package
| python-libvirt-python | Library providing a virtualization API | srcpackage
i | python-libxml2 | Python Bindings for libxml2 | package
| python-libxml2 | Python Bindings for libxml2 | srcpackage
| python-lockfile | Platform-independent file locking module | package
| python-lockfile | Platform-independent file locking module | srcpackage
| python-louis | Braille Translator and Back-Translator - Python Bindings | package
| python-louis | Braille Translator and Back-Translator - Python Bindings | srcpackage
| python-lxml | Powerful and Pythonic XML processing library | package
| python-lxml | Powerful and Pythonic XML processing library | srcpackage
| python-mysql | An Interface to the Popular MySQL Database Server for Python | package
| python-mysql | An Interface to the Popular MySQL Database Server for Python | srcpackage
| python-netaddr | Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses | package
| python-netaddr | Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses | srcpackage
| python-netifaces | Portable network interface information | package
| python-netifaces | Portable network interface information | srcpackage
| python-notify | Python bindings for libnotify | package
| python-notify | Python bindings for libnotify | srcpackage
i | python-numpy | NumPy array processing for numbers, strings, records and objects | package
| python-numpy | NumPy array processing for numbers, strings, records and objects | srcpackage
| python-orbit | Python bindings for ORBit | package
| python-orbit | Python bindings for ORBit | srcpackage
| python-pam | Python bindings for PAM | package
| python-pam | Python bindings for PAM | srcpackage
i | python-ply | Python Lex & Yacc | package
| python-ply | Python Lex & Yacc | srcpackage
i | python-py | Library with cross-python path, ini-parsing, io, code, log facilities | package
| python-py | Library with cross-python path, ini-parsing, io, code, log facilities | srcpackage
i | python-pyOpenSSL | Python wrapper module around the OpenSSL library | package
| python-pyOpenSSL | Python wrapper module around the OpenSSL library | srcpackage
i | python-pyasn1 | ASN.1 types and codecs | package
| python-pyasn1 | ASN.1 types and codecs | srcpackage
| python-pyasn1-modules | Collection of protocols modules written in ASN.1 language | package
| python-pyasn1-modules | Collection of protocols modules written in ASN.1 language | srcpackage
i | python-pycparser | C parser in Python | package
| python-pycparser | C parser in Python | srcpackage
i | python-pycurl | PycURL -- cURL library module | package
| python-pycurl | PycURL -- cURL library module | srcpackage
| python-pyldap | Python LDAP interface | package
| python-pyldap | Python LDAP interface | srcpackage
| python-pyotherside | Asynchronous Python 3 Bindings for Qt 5 | srcpackage
| python-pyparsing | Grammar Parser Library for Python | package
| python-pyparsing | Grammar Parser Library for Python | srcpackage
| python-pyscard | Python module adding smart card support | srcpackage
| python-python-daemon | Library to implement a well-behaved Unix daemon process | package
| python-python-daemon | Library to implement a well-behaved Unix daemon process | srcpackage
| python-pyudev | Udev bindings for Python | package
| python-pyudev | Udev bindings for Python | srcpackage
| python-pywbem | Python module for making CIM operation calls using the WBEM protocol | package
| python-pywbem | Python module for making CIM operation calls using the WBEM protocol | srcpackage
| python-qt4 | PyQt - python bindings for Qt 4 | package
| python-qt4 | PyQt - python bindings for Qt 4 | srcpackage
| python-rados | Python 2 libraries for the RADOS object store | package
| python-rbd | Python 2 libraries for the RADOS block device | package
i | python-requests | Awesome Python HTTP Library That's Actually Usable | package
| python-requests | Awesome Python HTTP Library That's Actually Usable | srcpackage
| python-rgw | Python 2 libraries for the RADOS gateway | package
| python-rpm-macros | RPM macros for building of Python modules | package
| python-rpm-macros | RPM macros for building of Python modules | srcpackage
| python-rtslib | API for Linux kernel SCSI target (aka LIO) | package
| python-rtslib | API for Linux kernel SCSI target (aka LIO) | srcpackage
| python-rtslib-fb | API for Linux kernel SCSI target (aka LIO) | package
| python-rtslib-fb | API for Linux kernel SCSI target (aka LIO) | srcpackage
| python-sanlock | Python bindings for the sanlock library | package
| python-selinux | Python bindings for the SELinux runtime library | package
| python-semanage | Python bindings for libsemanage | package
| python-semanage | Python bindings for libsemanage | srcpackage
| python-setools | Python bindings for SELinux policy analysis | package
i | python-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | package
| python-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | srcpackage
| python-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | package
| python-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | srcpackage
| python-sip | SIP tool to use python sip bindings | package
| python-sip | SIP tool to use python sip bindings | srcpackage
i | python-six | Python 2 and 3 compatibility utilities | package
| python-six | Python 2 and 3 compatibility utilities | srcpackage
| python-six-doc | Python 2 and 3 compatibility utilities | package
| python-six-doc | Python 2 and 3 compatibility utilities | srcpackage
| python-smbc | Python bindings for samba clients (libsmbclient) | package
| python-smbc | Python bindings for samba clients (libsmbclient) | srcpackage
i | python-solv | Python bindings for the libsolv library | package
| python-sssd-config | Python API for configuring sssd | package
| python-talloc | Python bindings for the Talloc library | package
| python-talloc-32bit | Python bindings for the Talloc library | package
| python-tk | TkInter - Python Tk Interface | package
| python-typing | Type Hints for Python | package
| python-typing | Type Hints for Python | srcpackage
i | python-urlgrabber | A high-level cross-protocol url-grabber | package
| python-urlgrabber | A high-level cross-protocol url-grabber | srcpackage
i | python-urllib3 | HTTP library with thread-safe connection pooling, file post, and more | package
| python-urllib3 | HTTP library with thread-safe connection pooling, file post, and more | srcpackage
| python-urwid | A full-featured console (xterm et al.) user interface library | package
| python-urwid | A full-featured console (xterm et al.) user interface library | srcpackage
| python-usb | USB access on the Python language | srcpackage
| python-vte | Terminal Emulator Library -- Python Bindings | package
| python-xattr | Python wrapper for extended filesystem attributes | package
| python-xattr | Python wrapper for extended filesystem attributes | srcpackage
| python-xdg | Python library to use freedesktop.org specifications | package
| python-xdg | Python library to use freedesktop.org specifications | srcpackage
i | python-xml | A Python XML Interface | package
| python-yum | YUM update notification daemon | package
| python-zypp | Python bindings for libzypp | package
| python2-audit | Python Bindings for libaudit | package
| python2-kiwi | KIWI - Appliance Builder Next Generation | package
| python3 | Python3 Interpreter | package
| python3 | Python3 Interpreter | srcpackage
| python3-M2Crypto | Crypto and SSL toolkit for Python | package
| python3-PyYAML | YAML parser and emitter for Python | package
| python3-PyYAML | YAML parser and emitter for Python | srcpackage
| python3-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | package
| python3-atspi | Assistive Technology Service Provider Interface - Python bindings | package
| python3-atspi | Assistive Technology Service Provider Interface - Python bindings | srcpackage
| python3-audit | Python3 Bindings for libaudit | package
i | python3-base | Python3 Interpreter | package
| python3-base | Python3 Interpreter | srcpackage
| python3-brlapi | Library to use BRLTTY from applications -- Python Bindings | package
| python3-cairo | Python Bindings for Cairo | package
| python3-cairo | Python Bindings for Cairo | srcpackage
| python3-cffi | Foreign Function Interface for Python calling C code | package
| python3-click | A simple wrapper around optparse for powerful command line utilities | package
| python3-cryptography | Python library which exposes cryptographic recipes and primitives | package
| python3-cssselect | CSS3 selectors for Python | package
| python3-cssselect | CSS3 selectors for Python | srcpackage
| python3-curses | Python Interface to the (N)Curses Library | package
| python3-dbus-python | Python bindings for D-Bus | package
| python3-gedit | Python bindings for gedit | package
| python3-gobject | Python bindings for GObject | package
| python3-gobject | Python bindings for GObject | srcpackage
| python3-gobject-Gdk | Python bindings for GObject -- Gdk bindings | package
| python3-gobject-cairo | Python bindings for GObject -- Cairo bindings | package
| python3-idna | Internationalized Domain Names in Applications (IDNA) | package
| python3-keyring | Store and access your passwords safely | package
| python3-louis | Braille Translator and Back-Translator - Python Bindings | package
| python3-louis | Braille Translator and Back-Translator - Python Bindings | srcpackage
| python3-lxml | Powerful and Pythonic XML processing library | package
| python3-lxml | Powerful and Pythonic XML processing library | srcpackage
| python3-py | Library with cross-python path, ini-parsing, io, code, log facilities | package
| python3-py | Library with cross-python path, ini-parsing, io, code, log facilities | srcpackage
| python3-pyOpenSSL | Python wrapper module around the OpenSSL library | package
| python3-pyasn1 | ASN.1 types and codecs | package
| python3-pycparser | C parser in Python | package
| python3-pycparser | C parser in Python | srcpackage
| python3-pycurl | PycURL -- cURL library module | package
| python3-pycurl | PycURL -- cURL library module | srcpackage
| python3-pyotherside | Asynchronous Python 3 Bindings for Qt 5 | package
| python3-pyscard | Python module adding smart card support | package
| python3-rpm | Python Bindings for Manipulating RPM Packages | package
| python3-rpm | Python Bindings for Manipulating RPM Packages | srcpackage
| python3-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | package
| python3-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | package
| python3-six | Python 2 and 3 compatibility utilities | package
| python3-six | Python 2 and 3 compatibility utilities | srcpackage
| python3-speechd | Device independent layer for speech synthesis - Python Bindings | package
| python3-talloc | Python3 bindings for the Talloc library | package
| python3-talloc-32bit | Python3 bindings for the Talloc library | package
| python3-tk | TkInter - Python Tk Interface | package
| python3-typing | Type Hints for Python | package
| python3-usb | USB access on the Python language | package
| python3-zypp-plugin | Helper that makes writing ZYpp plugins in python easier | package
| python36 | Python 3 Interpreter | package
| python36 | Python 3 Interpreter | srcpackage
| python36-base | Python 3 Interpreter and Stdlib Core | package
| python36-base | Python 3 Interpreter and Stdlib Core | srcpackage
i | rpm-python | Python Bindings for Manipulating RPM Packages | package
| rpm-python | Python Bindings for Manipulating RPM Packages | srcpackage
| samba-libs-python3 | Python3 dependencies of samba-libs | package
| samba-libs-python3-32bit | Python3 dependencies of samba-libs | package
i | zypp-plugin-python | Helper that makes writing ZYpp plugins in python easier | package
control:~ # control:~ # zypper se python
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+-----------------------------+--------------------------------------------------------------------------+-----------
| OpenIPMI-python | OpenIPMI | package
| apache2-mod_python | A Python Module for the Apache 2 Web Server | package
| apache2-mod_python | A Python Module for the Apache 2 Web Server | srcpackage
| dbus-1-python | Python bindings for D-Bus | package
| dbus-1-python | Python bindings for D-Bus | srcpackage
| dbus-1-python3 | Python bindings for D-Bus | package
| dbus-1-python3 | Python bindings for D-Bus | srcpackage
| freeradius-server-python | Python support for freeradius | package
| gnome-python-desktop | Python bindings for GNOME | srcpackage
i | libpython2_7-1_0 | Python Interpreter shared library | package
| libpython2_7-1_0-32bit | Python Interpreter shared library | package
i | libpython3_4m1_0 | Python Interpreter shared library | package
| libpython3_4m1_0-32bit | Python Interpreter shared library | package
| libpython3_6m1_0 | Python Interpreter shared library | package
| openlmi-python-base | Python namespace package for OpenLMI python projects | package
| policycoreutils-python | SELinux policy core python utilities | package
| postgresql10-plpython | The PL/Python Procedural Languages for PostgreSQL | package
i | python | Python Interpreter | package
| python | Python Interpreter | srcpackage
| python-32bit | Python Interpreter | package
| python-Cheetah | Cheetah is a template engine and code generation tool | package
| python-Cheetah | Cheetah is a template engine and code generation tool | srcpackage
| python-M2Crypto | Crypto and SSL toolkit for Python | package
| python-M2Crypto | Crypto and SSL toolkit for Python | srcpackage
| python-PrettyTable | Library for displaying tabular data in a visually appealing ASCII format | package
| python-PrettyTable | Library for displaying tabular data in a visually appealing ASCII format | srcpackage
| python-PyYAML | YAML parser and emitter for Python | package
| python-PyYAML | YAML parser and emitter for Python | srcpackage
| python-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | package
| python-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | srcpackage
| python-argparse | Python command-line parsing library | package
| python-argparse | Python command-line parsing library | srcpackage
| python-augeas | Python bindings for Augeas | package
| python-augeas | Python bindings for Augeas | srcpackage
i | python-base | Python Interpreter base package | package
| python-base | Python Interpreter base package | srcpackage
| python-base-32bit | Python Interpreter base package | package
i | python-bind | A module allowing rndc commands to be sent from Python programs | package
i | python-cairo | Python Bindings for Cairo | package
| python-cairo | Python Bindings for Cairo | srcpackage
| python-cephfs | Python 2 libraries for Ceph distributed file system | package
i | python-certifi | Python package for providing Mozilla's CA Bundle | package
| python-certifi | Python package for providing Mozilla's CA Bundle | srcpackage
i | python-cffi | Foreign Function Interface for Python calling C code | package
| python-cffi | Foreign Function Interface for Python calling C code | srcpackage
i | python-chardet | Universal encoding detector | package
| python-chardet | Universal encoding detector | srcpackage
| python-click | A simple wrapper around optparse for powerful command line utilities | srcpackage
| python-configobj | Config file reading, writing and validation | package
| python-configobj | Config file reading, writing and validation | srcpackage
| python-configshell | A framework to implement simple but nice CLIs | package
| python-configshell | A framework to implement simple but nice CLIs | srcpackage
| python-configshell-fb | A Python library for building configuration shells | package
| python-configshell-fb | A Python library for building configuration shells | srcpackage
i | python-cryptography | Python library which exposes cryptographic recipes and primitives | package
| python-cryptography | Python library which exposes cryptographic recipes and primitives | srcpackage
| python-cssselect | CSS3 selectors for Python | package
| python-cssselect | CSS3 selectors for Python | srcpackage
| python-cups | Python Bindings for CUPS | package
| python-cups | Python Bindings for CUPS | srcpackage
| python-cupshelpers | High-level Python Bindings for CUPS | package
i | python-curses | Python Interface to the (N)Curses Library | package
| python-dateutil | A Python Datetime Library | package
| python-dateutil | A Python Datetime Library | srcpackage
i | python-dbus-python | Python bindings for D-Bus | package
| python-dbus-python | Python bindings for D-Bus | srcpackage
| python-decorator | Better living through Python with decorators | package
| python-decorator | Better living through Python with decorators | srcpackage
| python-deltarpm | Tools to Create and Apply deltarpms | package
| python-demo | Python Demonstration Scripts | package
| python-devel | Include Files and Libraries Mandatory for Building Python Modules | package
| python-dmidecode | Python module to access DMI data | package
| python-dmidecode | Python module to access DMI data | srcpackage
| python-doc | Additional Package Documentation for Python | package
| python-doc | Additional Package Documentation for Python | srcpackage
| python-doc-pdf | Python PDF Documentation | package
| python-docopt | Pythonic argument parser, that will make you smile | package
| python-docopt | Pythonic argument parser, that will make you smile | srcpackage
i | python-enum34 | Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4 | package
| python-enum34 | Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4 | srcpackage
| python-ethtool | Ethernet settings python bindings | package
| python-ethtool | Ethernet settings python bindings | srcpackage
| python-evtx | Windows Event Log files parser | package
| python-evtx | Windows Event Log files parser | srcpackage
| python-future | Clean single-source support for Python 3 and 2 | package
| python-future | Clean single-source support for Python 3 and 2 | srcpackage
| python-gconf | Python bindings for GConf | package
| python-gdbm | Python Interface to the GDBM Library | package
| python-gnome | Python bindings for GNOME | srcpackage
| python-gnomekeyring | Python bindings for GNOME Keyring | package
i | python-gobject | Python bindings for GObject | package
| python-gobject | Python bindings for GObject | srcpackage
i | python-gobject-Gdk | Python bindings for GObject -- Gdk bindings | package
i | python-gobject-cairo | Python bindings for GObject -- Cairo bindings | package
i | python-gobject2 | Python bindings for GObject | package
| python-gobject2 | Python bindings for GObject | srcpackage
i | python-gtk | Python bindings for the GTK+ widget set | package
| python-gtk | Python bindings for the GTK+ widget set | srcpackage
| python-gtk-doc | Python bindings for the GTK+ widget set | package
| python-gtk-vnc | Python bindings for the gtk-vnc library | package
| python-idle | An Integrated Development Environment for Python | package
i | python-idna | Internationalized Domain Names in Applications (IDNA) | package
| python-idna | Internationalized Domain Names in Applications (IDNA) | srcpackage
| python-imaging | The Python Imaging Library - PIL | package
| python-imaging | The Python Imaging Library - PIL | srcpackage
i | python-ipaddr | Google's IP address manipulation library | package
| python-ipaddr | Google's IP address manipulation library | srcpackage
i | python-ipaddress | IPv4/IPv6 manipulation library | package
| python-ipaddress | IPv4/IPv6 manipulation library | srcpackage
| python-ipy | Class and Tools for Handling of IPv4 and IPv6 Addresses and Networks | package
| python-ipy | Class and Tools for Handling of IPv4 and IPv6 Addresses and Networks | srcpackage
| python-jabberpy | Python xmlstream and jabber IM protocol libs | package
| python-jabberpy | Python xmlstream and jabber IM protocol libs | srcpackage
| python-keyring | Store and access your passwords safely | package
| python-keyring | Store and access your passwords safely | srcpackage
| python-kiwi | KIWI - Appliance Builder Next Generation | srcpackage
| python-kmod | Python module to work with kernel modules | package
| python-kmod | Python module to work with kernel modules | srcpackage
| python-libguestfs | Provides Python support for libguestfs | package
| python-libmount | Python bindings for the libmount library | package
| python-libmount | Python bindings for the libmount library | srcpackage
| python-libstoragemgmt | Python client libraries and plug-in support for libstoragemgmt | package
| python-libstoragemgmt-clibs | Python C extension for libstoragemgmt | package
| python-libteam | Python bindings for libteam | package
i | python-libvirt-python | Library providing a virtualization API | package
| python-libvirt-python | Library providing a virtualization API | srcpackage
i | python-libxml2 | Python Bindings for libxml2 | package
| python-libxml2 | Python Bindings for libxml2 | srcpackage
| python-lockfile | Platform-independent file locking module | package
| python-lockfile | Platform-independent file locking module | srcpackage
| python-louis | Braille Translator and Back-Translator - Python Bindings | package
| python-louis | Braille Translator and Back-Translator - Python Bindings | srcpackage
| python-lxml | Powerful and Pythonic XML processing library | package
| python-lxml | Powerful and Pythonic XML processing library | srcpackage
| python-mysql | An Interface to the Popular MySQL Database Server for Python | package
| python-mysql | An Interface to the Popular MySQL Database Server for Python | srcpackage
| python-netaddr | Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses | package
| python-netaddr | Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses | srcpackage
| python-netifaces | Portable network interface information | package
| python-netifaces | Portable network interface information | srcpackage
| python-notify | Python bindings for libnotify | package
| python-notify | Python bindings for libnotify | srcpackage
i | python-numpy | NumPy array processing for numbers, strings, records and objects | package
| python-numpy | NumPy array processing for numbers, strings, records and objects | srcpackage
| python-orbit | Python bindings for ORBit | package
| python-orbit | Python bindings for ORBit | srcpackage
| python-pam | Python bindings for PAM | package
| python-pam | Python bindings for PAM | srcpackage
i | python-ply | Python Lex & Yacc | package
| python-ply | Python Lex & Yacc | srcpackage
i | python-py | Library with cross-python path, ini-parsing, io, code, log facilities | package
| python-py | Library with cross-python path, ini-parsing, io, code, log facilities | srcpackage
i | python-pyOpenSSL | Python wrapper module around the OpenSSL library | package
| python-pyOpenSSL | Python wrapper module around the OpenSSL library | srcpackage
i | python-pyasn1 | ASN.1 types and codecs | package
| python-pyasn1 | ASN.1 types and codecs | srcpackage
| python-pyasn1-modules | Collection of protocols modules written in ASN.1 language | package
| python-pyasn1-modules | Collection of protocols modules written in ASN.1 language | srcpackage
i | python-pycparser | C parser in Python | package
| python-pycparser | C parser in Python | srcpackage
i | python-pycurl | PycURL -- cURL library module | package
| python-pycurl | PycURL -- cURL library module | srcpackage
| python-pyldap | Python LDAP interface | package
| python-pyldap | Python LDAP interface | srcpackage
| python-pyotherside | Asynchronous Python 3 Bindings for Qt 5 | srcpackage
| python-pyparsing | Grammar Parser Library for Python | package
| python-pyparsing | Grammar Parser Library for Python | srcpackage
| python-pyscard | Python module adding smart card support | srcpackage
| python-python-daemon | Library to implement a well-behaved Unix daemon process | package
| python-python-daemon | Library to implement a well-behaved Unix daemon process | srcpackage
| python-pyudev | Udev bindings for Python | package
| python-pyudev | Udev bindings for Python | srcpackage
| python-pywbem | Python module for making CIM operation calls using the WBEM protocol | package
| python-pywbem | Python module for making CIM operation calls using the WBEM protocol | srcpackage
| python-qt4 | PyQt - python bindings for Qt 4 | package
| python-qt4 | PyQt - python bindings for Qt 4 | srcpackage
| python-rados | Python 2 libraries for the RADOS object store | package
| python-rbd | Python 2 libraries for the RADOS block device | package
i | python-requests | Awesome Python HTTP Library That's Actually Usable | package
| python-requests | Awesome Python HTTP Library That's Actually Usable | srcpackage
| python-rgw | Python 2 libraries for the RADOS gateway | package
| python-rpm-macros | RPM macros for building of Python modules | package
| python-rpm-macros | RPM macros for building of Python modules | srcpackage
| python-rtslib | API for Linux kernel SCSI target (aka LIO) | package
| python-rtslib | API for Linux kernel SCSI target (aka LIO) | srcpackage
| python-rtslib-fb | API for Linux kernel SCSI target (aka LIO) | package
| python-rtslib-fb | API for Linux kernel SCSI target (aka LIO) | srcpackage
| python-sanlock | Python bindings for the sanlock library | package
| python-selinux | Python bindings for the SELinux runtime library | package
| python-semanage | Python bindings for libsemanage | package
| python-semanage | Python bindings for libsemanage | srcpackage
| python-setools | Python bindings for SELinux policy analysis | package
i | python-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | package
| python-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | srcpackage
| python-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | package
| python-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | srcpackage
| python-sip | SIP tool to use python sip bindings | package
| python-sip | SIP tool to use python sip bindings | srcpackage
i | python-six | Python 2 and 3 compatibility utilities | package
| python-six | Python 2 and 3 compatibility utilities | srcpackage
| python-six-doc | Python 2 and 3 compatibility utilities | package
| python-six-doc | Python 2 and 3 compatibility utilities | srcpackage
| python-smbc | Python bindings for samba clients (libsmbclient) | package
| python-smbc | Python bindings for samba clients (libsmbclient) | srcpackage
i | python-solv | Python bindings for the libsolv library | package
| python-sssd-config | Python API for configuring sssd | package
| python-talloc | Python bindings for the Talloc library | package
| python-talloc-32bit | Python bindings for the Talloc library | package
| python-tk | TkInter - Python Tk Interface | package
| python-typing | Type Hints for Python | package
| python-typing | Type Hints for Python | srcpackage
i | python-urlgrabber | A high-level cross-protocol url-grabber | package
| python-urlgrabber | A high-level cross-protocol url-grabber | srcpackage
i | python-urllib3 | HTTP library with thread-safe connection pooling, file post, and more | package
| python-urllib3 | HTTP library with thread-safe connection pooling, file post, and more | srcpackage
| python-urwid | A full-featured console (xterm et al.) user interface library | package
| python-urwid | A full-featured console (xterm et al.) user interface library | srcpackage
| python-usb | USB access on the Python language | srcpackage
| python-vte | Terminal Emulator Library -- Python Bindings | package
| python-xattr | Python wrapper for extended filesystem attributes | package
| python-xattr | Python wrapper for extended filesystem attributes | srcpackage
| python-xdg | Python library to use freedesktop.org specifications | package
| python-xdg | Python library to use freedesktop.org specifications | srcpackage
i | python-xml | A Python XML Interface | package
| python-yum | YUM update notification daemon | package
| python-zypp | Python bindings for libzypp | package
| python2-audit | Python Bindings for libaudit | package
| python2-kiwi | KIWI - Appliance Builder Next Generation | package
| python3 | Python3 Interpreter | package
| python3 | Python3 Interpreter | srcpackage
| python3-M2Crypto | Crypto and SSL toolkit for Python | package
| python3-PyYAML | YAML parser and emitter for Python | package
| python3-PyYAML | YAML parser and emitter for Python | srcpackage
| python3-SecretStorage | Python bindings to FreeDesktoporg Secret Service API | package
| python3-atspi | Assistive Technology Service Provider Interface - Python bindings | package
| python3-atspi | Assistive Technology Service Provider Interface - Python bindings | srcpackage
| python3-audit | Python3 Bindings for libaudit | package
i | python3-base | Python3 Interpreter | package
| python3-base | Python3 Interpreter | srcpackage
| python3-brlapi | Library to use BRLTTY from applications -- Python Bindings | package
| python3-cairo | Python Bindings for Cairo | package
| python3-cairo | Python Bindings for Cairo | srcpackage
| python3-cffi | Foreign Function Interface for Python calling C code | package
| python3-click | A simple wrapper around optparse for powerful command line utilities | package
| python3-cryptography | Python library which exposes cryptographic recipes and primitives | package
| python3-cssselect | CSS3 selectors for Python | package
| python3-cssselect | CSS3 selectors for Python | srcpackage
| python3-curses | Python Interface to the (N)Curses Library | package
| python3-dbus-python | Python bindings for D-Bus | package
| python3-gedit | Python bindings for gedit | package
| python3-gobject | Python bindings for GObject | package
| python3-gobject | Python bindings for GObject | srcpackage
| python3-gobject-Gdk | Python bindings for GObject -- Gdk bindings | package
| python3-gobject-cairo | Python bindings for GObject -- Cairo bindings | package
| python3-idna | Internationalized Domain Names in Applications (IDNA) | package
| python3-keyring | Store and access your passwords safely | package
| python3-louis | Braille Translator and Back-Translator - Python Bindings | package
| python3-louis | Braille Translator and Back-Translator - Python Bindings | srcpackage
| python3-lxml | Powerful and Pythonic XML processing library | package
| python3-lxml | Powerful and Pythonic XML processing library | srcpackage
| python3-py | Library with cross-python path, ini-parsing, io, code, log facilities | package
| python3-py | Library with cross-python path, ini-parsing, io, code, log facilities | srcpackage
| python3-pyOpenSSL | Python wrapper module around the OpenSSL library | package
| python3-pyasn1 | ASN.1 types and codecs | package
| python3-pycparser | C parser in Python | package
| python3-pycparser | C parser in Python | srcpackage
| python3-pycurl | PycURL -- cURL library module | package
| python3-pycurl | PycURL -- cURL library module | srcpackage
| python3-pyotherside | Asynchronous Python 3 Bindings for Qt 5 | package
| python3-pyscard | Python module adding smart card support | package
| python3-rpm | Python Bindings for Manipulating RPM Packages | package
| python3-rpm | Python Bindings for Manipulating RPM Packages | srcpackage
| python3-setuptools | Easily download, build, install, upgrade, and uninstall Python packages | package
| python3-simplejson | Simple, fast, extensible JSON encoder/decoder for Python | package
| python3-six | Python 2 and 3 compatibility utilities | package
| python3-six | Python 2 and 3 compatibility utilities | srcpackage
| python3-speechd | Device independent layer for speech synthesis - Python Bindings | package
| python3-talloc | Python3 bindings for the Talloc library | package
| python3-talloc-32bit | Python3 bindings for the Talloc library | package
| python3-tk | TkInter - Python Tk Interface | package
| python3-typing | Type Hints for Python | package
| python3-usb | USB access on the Python language | package
| python3-zypp-plugin | Helper that makes writing ZYpp plugins in python easier | package
| python36 | Python 3 Interpreter | package
| python36 | Python 3 Interpreter | srcpackage
| python36-base | Python 3 Interpreter and Stdlib Core | package
| python36-base | Python 3 Interpreter and Stdlib Core | srcpackage
i | rpm-python | Python Bindings for Manipulating RPM Packages | package
| rpm-python | Python Bindings for Manipulating RPM Packages | srcpackage
| samba-libs-python3 | Python3 dependencies of samba-libs | package
| samba-libs-python3-32bit | Python3 dependencies of samba-libs | package
i | zypp-plugin-python | Helper that makes writing ZYpp plugins in python easier | package
control:~ #
有部分已经其实安装好了:
需要安装的是:
python-PyYAML
control:~ # zypper in python-PyYAML
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
python-PyYAML
1 new package to install.
Overall download size: 157.5 KiB. Already cached: 0 B. After the operation, additional 795.1 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package python-PyYAML-3.12-26.6.1.x86_64 (1/1), 157.5 KiB (795.1 KiB unpacked)
Checking for file conflicts: .................................................................................................[done]
(1/1) Installing: python-PyYAML-3.12-26.6.1.x86_64 ...........................................................................[done]
control:~ #
python-simplejson
control:~ # zypper in python-simplejson
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
python-simplejson
1 new package to install.
Overall download size: 110.4 KiB. Already cached: 0 B. After the operation, additional 546.4 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package python-simplejson-3.8.2-12.1.x86_64 (1/1), 110.4 KiB (546.4 KiB unpacked)
Checking for file conflicts: .................................................................................................[done]
(1/1) Installing: python-simplejson-3.8.2-12.1.x86_64 ........................................................................[done]
control:~ #
上传安装MarkupSafe-1.1.1
control:/opt/ansible # rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring Jinja2-2.10.1.tar.gz...
100% 254 KB 254 KB/sec 00:00:01 0 Errors
Transferring MarkupSafe-1.1.1.tar.gz...
100% 18 KB 18 KB/sec 00:00:01 0 Errors
control:/opt/ansible # ll
total 276
-rw-r--r-- 1 root root 260956 Nov 20 16:55 Jinja2-2.10.1.tar.gz
-rw-r--r-- 1 root root 19151 Nov 16 16:11 MarkupSafe-1.1.1.tar.gz
control:/opt/ansible # tar -zxvf MarkupSafe-1.1.1.tar.gz
control:/opt/ansible/MarkupSafe-1.1.1 # python setup.py install
running install
running bdist_egg
running egg_info
writing src/MarkupSafe.egg-info/PKG-INFO
writing top-level names to src/MarkupSafe.egg-info/top_level.txt
writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/markupsafe
copying src/markupsafe/__init__.py -> build/lib.linux-x86_64-2.7/markupsafe
copying src/markupsafe/_native.py -> build/lib.linux-x86_64-2.7/markupsafe
copying src/markupsafe/_constants.py -> build/lib.linux-x86_64-2.7/markupsafe
copying src/markupsafe/_compat.py -> build/lib.linux-x86_64-2.7/markupsafe
copying src/markupsafe/_speedups.c -> build/lib.linux-x86_64-2.7/markupsafe
running build_ext
building 'markupsafe._speedups' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/markupsafe
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DOPENSSL_LOAD_CONF -fwrapv -fPIC -I/usr/include/python2.7 -c src/markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/src/markupsafe/_speedups.o
unable to execute 'gcc': No such file or directory
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
==========================================================================
running install
running bdist_egg
running egg_info
writing src/MarkupSafe.egg-info/PKG-INFO
writing top-level names to src/MarkupSafe.egg-info/top_level.txt
writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib
creating build/lib/markupsafe
copying src/markupsafe/__init__.py -> build/lib/markupsafe
copying src/markupsafe/_native.py -> build/lib/markupsafe
copying src/markupsafe/_constants.py -> build/lib/markupsafe
copying src/markupsafe/_compat.py -> build/lib/markupsafe
copying src/markupsafe/_speedups.c -> build/lib/markupsafe
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/markupsafe
copying build/lib/markupsafe/_speedups.c -> build/bdist.linux-x86_64/egg/markupsafe
copying build/lib/markupsafe/__init__.py -> build/bdist.linux-x86_64/egg/markupsafe
copying build/lib/markupsafe/_native.py -> build/bdist.linux-x86_64/egg/markupsafe
copying build/lib/markupsafe/_constants.py -> build/bdist.linux-x86_64/egg/markupsafe
copying build/lib/markupsafe/_compat.py -> build/bdist.linux-x86_64/egg/markupsafe
byte-compiling build/bdist.linux-x86_64/egg/markupsafe/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/markupsafe/_native.py to _native.pyc
byte-compiling build/bdist.linux-x86_64/egg/markupsafe/_constants.py to _constants.pyc
byte-compiling build/bdist.linux-x86_64/egg/markupsafe/_compat.py to _compat.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying src/MarkupSafe.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/MarkupSafe.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/MarkupSafe.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/MarkupSafe.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/MarkupSafe-1.1.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing MarkupSafe-1.1.1-py2.7.egg
Copying MarkupSafe-1.1.1-py2.7.egg to /usr/lib/python2.7/site-packages
Adding MarkupSafe 1.1.1 to easy-install.pth file
Installed /usr/lib/python2.7/site-packages/MarkupSafe-1.1.1-py2.7.egg
Processing dependencies for MarkupSafe==1.1.1
Finished processing dependencies for MarkupSafe==1.1.1
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python build succeeded.
==========================================================================
上传安装Jinja2-2.10.1
control:/opt/ansible # cd Jinja2-2.10.1/
control:/opt/ansible/Jinja2-2.10.1 # python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to Jinja2.egg-info/requires.txt
writing Jinja2.egg-info/PKG-INFO
writing top-level names to Jinja2.egg-info/top_level.txt
writing dependency_links to Jinja2.egg-info/dependency_links.txt
writing entry points to Jinja2.egg-info/entry_points.txt
reading manifest file 'Jinja2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
no previously-included directories found matching 'docs/_build'
writing manifest file 'Jinja2.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/jinja2
copying jinja2/sandbox.py -> build/lib/jinja2
...
Installed /usr/lib/python2.7/site-packages/Jinja2-2.10.1-py2.7.egg
Processing dependencies for Jinja2==2.10.1
Searching for MarkupSafe==1.1.1
Best match: MarkupSafe 1.1.1
Processing MarkupSafe-1.1.1-py2.7.egg
MarkupSafe 1.1.1 is already the active version in easy-install.pth
Using /usr/lib/python2.7/site-packages/MarkupSafe-1.1.1-py2.7.egg
Finished processing dependencies for Jinja2==2.10.1
4. 解压、安装源码包文件
tar -zxvf ansible-2.9.7.tar.gz
cd ansible-2.9.7
python setup.py install
Using /usr/lib/python2.7/site-packages
Searching for MarkupSafe==1.1.1
Best match: MarkupSafe 1.1.1
Processing MarkupSafe-1.1.1-py2.7.egg
MarkupSafe 1.1.1 is already the active version in easy-install.pth
Using /usr/lib/python2.7/site-packages/MarkupSafe-1.1.1-py2.7.egg
Searching for pycparser==2.10
Best match: pycparser 2.10
Adding pycparser 2.10 to easy-install.pth file
Using /usr/lib/python2.7/site-packages
Finished processing dependencies for ansible==2.9.7
提示Ansible安装完成
5. 验证Ansible是否安装成功
输入ansible --version
control:~ # ansible --version
ansible 2.9.7
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.9.7-py2.7.egg/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Jan 11 2017, 10:56:06) [GCC]
control:~ #
安装成功会显示版本信息、模块的目录等
6. 修改各个节点主机名
cat /etc/hosts
control:/opt/ansible/ansible-2.9.7 # vim /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.64.150 control
192.168.64.151 node1
192.168.64.152 node2
7. 配置各节点免密访问
control: ssh-keygen -t rsa
control: ssh-copy-id control
control: ssh-copy-id node1
control: ssh-copy-id node2
control:~ # ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:c/I7+nmATWnmCfJ+X5BdrreaFnTH66SJmmp3rMJqY0Q root@control
The key's randomart image is:
+---[RSA 2048]----+
| |
| |
| . ..|
| E. . = + +o|
| . oSO..+ o +|
| . o== o + |
| . .. o.. O .|
| + +..+*.=.o.|
| o.+.=BB+oo.. |
+----[SHA256]-----+
control:~ # ssh-copy-id control
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'control (192.168.64.150)' can't be established.
ECDSA key fingerprint is SHA256:JFVFQeggPBYVhNwuJHvGSgEdKqYMRhi3d0FmVMjMlJY.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'control'"
and check to make sure that only the key(s) you wanted were added.
control:~ # ssh-copy-id node1
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'node1 (192.168.64.151)' can't be established.
ECDSA key fingerprint is SHA256:wztAQcbOUnAx8LcBN8I2RLpyveF4kQDfRExRH4y2b2w.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node1'"
and check to make sure that only the key(s) you wanted were added.
control:~ # ssh-copy-id node2
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'node2 (192.168.64.152)' can't be established.
ECDSA key fingerprint is SHA256:wrVm4IO2hqcLLTorR0zafVVS+k6g8V7at9EraO5FO5Y.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'node2'"
and check to make sure that only the key(s) you wanted were added.
control:~ #
node1: ssh-keygen -t rsa
node1: ssh-copy-id control
node1: ssh-copy-id node1
node1: ssh-copy-id node2
node2: ssh-keygen -t rsa
node2: ssh-copy-id control
node2: ssh-copy-id node1
node2: ssh-copy-id node2
测试免密是否成功:
node2:~ # ssh control
Last login: Tue Nov 28 04:26:06 2023 from 192.168.64.1
control:~ # exit
logout
Connection to control closed.
node2:~ # ssh node1
Last login: Tue Nov 28 05:37:51 2023 from 192.168.64.1
node1:~ #
node1:~ # ssh control
Last login: Tue Nov 28 05:58:19 2023 from 192.168.64.152
control:~ # exit
logout
Connection to control closed.
node1:~ # ssh node2
Last login: Tue Nov 28 05:38:00 2023 from 192.168.64.1
node2:~ #
control:~ # ssh node1
Last login: Tue Nov 28 05:59:03 2023 from 192.168.64.152
node1:~ # exit
logout
Connection to node1 closed.
control:~ # ssh node2
Last login: Tue Nov 28 05:59:46 2023 from 192.168.64.151
node2:~ #
8. 在管理节点配置ansible配置文件以及主机文件
control:
创建ansible目录
control:~ # mkdir ansible
control:~ # cd ansible
control:~/ansible # pwd
/root/ansible
control:~/ansible #
在ansible目录下创建ansible.cfg配置文件(参数可参考ansible自带配置文件:/opt/ansible/ansible-2.9.7/examples/ansible.cfg)
部分常用参数:
[defaults]
# some basic default values...
#inventory = /etc/ansible/hosts
#library = /usr/share/my_modules/
#module_utils = /usr/share/my_module_utils/
#remote_tmp = ~/.ansible/tmp
#local_tmp = ~/.ansible/tmp
#plugin_filters_cfg = /etc/ansible/plugin_filters.yml
#forks = 5
#poll_interval = 15
#sudo_user = root
#ask_sudo_pass = True
#ask_pass = True
#transport = smart
#remote_port = 22
#module_lang = C
#module_set_locale = False
[privilege_escalation]
#become=True
#become_method=sudo
#become_user=root
#become_ask_pass=False
vim ansible.cfg
control:~/ansible # cat ansible.cfg
[defaults]
inventory = /root/ansible/inventory
remote_user = root
roles_path = /root/ansible/roles
ask_pass = false
在ansible目录下创建主机文件:
vim inventory
control:~/ansible # cat inventory
control
node1
node2
[dev]
node1
[test]
node2
[prod:children]
dev
test
control:~/ansible # ansible -i inventory prod --list
hosts (2):
node1
node2
control:~/ansible # ansible -i inventory dev --list
hosts (1):
node1
9. 测试各个节点
control:~/ansible # ansible all -a "id"
[WARNING]: Platform linux on host node1 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could
change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
node1 | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root)
[WARNING]: Platform linux on host node2 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could
change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
node2 | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root)
[WARNING]: Platform linux on host control is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could
change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
control | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root)