Skip to content

Instantly share code, notes, and snippets.

@dariko
Created October 20, 2018 16:46
Show Gist options
  • Save dariko/3fdcc08227993ccee23d150c8f915f39 to your computer and use it in GitHub Desktop.
Save dariko/3fdcc08227993ccee23d150c8f915f39 to your computer and use it in GitHub Desktop.
docker_swarm_service ansible module error on docker 1.13 (centos 7 version)
[centos@test ~]$ sudo su -
[root@test ~]# yum install epel-release
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: centos.mirrors.ovh.net
* extras: centos.mirror.ate.info
* updates: centos.mirrors.ovh.net
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 6.0 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
[root@test ~]# yum install pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 30 kB 00:00:00
* base: centos.mirrors.ovh.net
* epel: mirrors.coreix.net
* extras: centos.mirror.ate.info
* updates: centos.mirrors.ovh.net
epel | 3.2 kB 00:00:00
(1/3): epel/x86_64/group_gz | 88 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 935 kB 00:00:00
(3/3): epel/x86_64/primary | 3.6 MB 00:00:00
epel 12742/12742
No package pip available.
Error: Nothing to do
[root@test ~]# yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirrors.ovh.net
* epel: mirror.freethought-internet.co.uk
* extras: centos.mirror.ate.info
* updates: centos.mirrors.ovh.net
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================
Installing:
python2-pip noarch 8.1.2-6.el7 epel 1.7 M
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package
Total download size: 1.7 M
Installed size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/epel/packages/python2-pip-8.1.2-6.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python2-pip-8.1.2-6.el7.noarch.rpm is not installed
python2-pip-8.1.2-6.el7.noarch.rpm | 1.7 MB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-11.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-pip-8.1.2-6.el7.noarch 1/1
Verifying : python2-pip-8.1.2-6.el7.noarch 1/1
Installed:
python2-pip.noarch 0:8.1.2-6.el7
Complete!
[root@test ~]# pip install ansible
Collecting ansible
Downloading https://files.pythonhosted.org/packages/7c/4f/a1843687642b8e33637e312b9fb17ca7f68be0641131a92d883368dc6d1c/ansible-2.7.0.tar.gz (11.8MB)
100% |████████████████████████████████| 11.8MB 108kB/s
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/lib/python2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/lib64/python2.7/site-packages (from ansible)
Collecting paramiko (from ansible)
Downloading https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl (193kB)
100% |████████████████████████████████| 194kB 5.4MB/s
Collecting cryptography (from ansible)
Downloading https://files.pythonhosted.org/packages/87/e6/915a482dbfef98bbdce6be1e31825f591fc67038d4ee09864c1d2c3db371/cryptography-2.3.1-cp27-cp27mu-manylinux1_x86_64.whl (2.1MB)
100% |████████████████████████████████| 2.1MB 542kB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib64/python2.7/site-packages (from jinja2->ansible)
Collecting pynacl>=1.0.1 (from paramiko->ansible)
Downloading https://files.pythonhosted.org/packages/b3/25/e605574f24948a8a53b497744e93f061eb1dbe7c44b6465fc1c172d591aa/PyNaCl-1.3.0-cp27-cp27mu-manylinux1_x86_64.whl (762kB)
100% |████████████████████████████████| 768kB 1.7MB/s
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
Downloading https://files.pythonhosted.org/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl (72kB)
100% |████████████████████████████████| 81kB 11.5MB/s
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Downloading https://files.pythonhosted.org/packages/2e/5a/2abeae20ce294fe6bf63da0e0b5a885c788e1360bbd124edcc0429678a59/bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)
100% |████████████████████████████████| 61kB 9.4MB/s
Collecting idna>=2.1 (from cryptography->ansible)
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 9.0MB/s
Collecting enum34; python_version < "3" (from cryptography->ansible)
Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible)
Collecting cffi!=1.11.3,>=1.7 (from cryptography->ansible)
Downloading https://files.pythonhosted.org/packages/14/dd/3e7a1e1280e7d767bd3fa15791759c91ec19058ebe31217fe66f3e9a8c49/cffi-1.11.5-cp27-cp27mu-manylinux1_x86_64.whl (407kB)
100% |████████████████████████████████| 409kB 3.1MB/s
Collecting asn1crypto>=0.21.0 (from cryptography->ansible)
Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
100% |████████████████████████████████| 102kB 9.5MB/s
Requirement already satisfied (use --upgrade to upgrade): ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography->ansible)
Collecting pycparser (from cffi!=1.11.3,>=1.7->cryptography->ansible)
Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
100% |████████████████████████████████| 163kB 6.1MB/s
Installing collected packages: idna, enum34, pycparser, cffi, asn1crypto, cryptography, pynacl, pyasn1, bcrypt, paramiko, ansible
Running setup.py install for pycparser ... done
Running setup.py install for ansible ... done
Successfully installed ansible-2.7.0 asn1crypto-0.24.0 bcrypt-3.1.4 cffi-1.11.5 cryptography-2.3.1 enum34-1.1.6 idna-2.7 paramiko-2.4.2 pyasn1-0.4.4 pycparser-2.19 pynacl-1.3.0
You are using pip version 8.1.2, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@test ~]# yum install docker
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirrors.ovh.net
* epel: mirrors.coreix.net
* extras: centos.mirror.ate.info
* updates: centos.mirrors.ovh.net
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed
--> Processing Dependency: docker-common = 2:1.13.1-75.git8633870.el7.centos for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: docker-client = 2:1.13.1-75.git8633870.el7.centos for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: subscription-manager-rhsm-certificates for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64
--> Running transaction check
---> Package docker-client.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed
---> Package docker-common.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed
--> Processing Dependency: skopeo-containers >= 1:0.1.26-2 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: oci-umount >= 2:2.3.3-3 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: oci-systemd-hook >= 1:0.1.4-9 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: oci-register-machine >= 1:0-5.13 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: lvm2 >= 2.02.112 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: container-selinux >= 2:2.51-1 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
--> Processing Dependency: atomic-registries for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64
---> Package subscription-manager-rhsm-certificates.x86_64 0:1.20.11-1.el7.centos will be installed
--> Running transaction check
---> Package atomic-registries.x86_64 1:1.22.1-25.git5a342e3.el7.centos will be installed
--> Processing Dependency: python-pytoml for package: 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64
---> Package container-selinux.noarch 2:2.68-1.el7 will be installed
---> Package container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7 will be installed
---> Package lvm2.x86_64 7:2.02.177-4.el7 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.177-4.el7 for package: 7:lvm2-2.02.177-4.el7.x86_64
--> Processing Dependency: device-mapper-persistent-data >= 0.7.0-0.1.rc6 for package: 7:lvm2-2.02.177-4.el7.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.177-4.el7.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.177-4.el7.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.177-4.el7.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.177-4.el7.x86_64
---> Package oci-register-machine.x86_64 1:0-6.git2b44233.el7 will be installed
---> Package oci-systemd-hook.x86_64 1:0.1.17-2.git83283a0.el7 will be installed
--> Processing Dependency: libyajl.so.2()(64bit) for package: 1:oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64
---> Package oci-umount.x86_64 2:2.3.3-3.gite3c9055.el7 will be installed
---> Package skopeo-containers.x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos will be installed
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.146-4.el7 will be installed
---> Package device-mapper-persistent-data.x86_64 0:0.7.3-3.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.7.3-3.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.7.3-3.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.7.3-3.el7.x86_64
---> Package lvm2-libs.x86_64 7:2.02.177-4.el7 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.146-4.el7 for package: 7:lvm2-libs-2.02.177-4.el7.x86_64
---> Package python2-pytoml.noarch 0:0.1.18-1.el7 will be installed
---> Package yajl.x86_64 0:2.0.4-4.el7 will be installed
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.146-4.el7 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================
Installing:
docker x86_64 2:1.13.1-75.git8633870.el7.centos extras 16 M
Installing for dependencies:
atomic-registries x86_64 1:1.22.1-25.git5a342e3.el7.centos extras 35 k
container-selinux noarch 2:2.68-1.el7 extras 36 k
container-storage-setup noarch 0.11.0-2.git5eaf76c.el7 extras 35 k
device-mapper-event x86_64 7:1.02.146-4.el7 base 185 k
device-mapper-event-libs x86_64 7:1.02.146-4.el7 base 184 k
device-mapper-persistent-data x86_64 0.7.3-3.el7 base 405 k
docker-client x86_64 2:1.13.1-75.git8633870.el7.centos extras 3.8 M
docker-common x86_64 2:1.13.1-75.git8633870.el7.centos extras 93 k
libaio x86_64 0.3.109-13.el7 base 24 k
lvm2 x86_64 7:2.02.177-4.el7 base 1.3 M
lvm2-libs x86_64 7:2.02.177-4.el7 base 1.0 M
oci-register-machine x86_64 1:0-6.git2b44233.el7 extras 1.1 M
oci-systemd-hook x86_64 1:0.1.17-2.git83283a0.el7 extras 33 k
oci-umount x86_64 2:2.3.3-3.gite3c9055.el7 extras 32 k
python2-pytoml noarch 0.1.18-1.el7 epel 20 k
skopeo-containers x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos extras 17 k
subscription-manager-rhsm-certificates x86_64 1.20.11-1.el7.centos base 195 k
yajl x86_64 2.0.4-4.el7 base 39 k
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package (+18 Dependent packages)
Total download size: 25 M
Installed size: 81 M
Is this ok [y/d/N]: y
Downloading packages:
(1/19): container-selinux-2.68-1.el7.noarch.rpm | 36 kB 00:00:00
(2/19): atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64.rpm | 35 kB 00:00:00
(3/19): container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm | 35 kB 00:00:00
(4/19): device-mapper-event-1.02.146-4.el7.x86_64.rpm | 185 kB 00:00:00
(5/19): device-mapper-event-libs-1.02.146-4.el7.x86_64.rpm | 184 kB 00:00:00
(6/19): device-mapper-persistent-data-0.7.3-3.el7.x86_64.rpm | 405 kB 00:00:00
(7/19): docker-client-1.13.1-75.git8633870.el7.centos.x86_64.rpm | 3.8 MB 00:00:00
(8/19): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
(9/19): docker-common-1.13.1-75.git8633870.el7.centos.x86_64.rpm | 93 kB 00:00:00
(10/19): oci-register-machine-0-6.git2b44233.el7.x86_64.rpm | 1.1 MB 00:00:00
(11/19): lvm2-libs-2.02.177-4.el7.x86_64.rpm | 1.0 MB 00:00:00
(12/19): oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64.rpm | 33 kB 00:00:00
(13/19): docker-1.13.1-75.git8633870.el7.centos.x86_64.rpm | 16 MB 00:00:00
(14/19): oci-umount-2.3.3-3.gite3c9055.el7.x86_64.rpm | 32 kB 00:00:00
(15/19): lvm2-2.02.177-4.el7.x86_64.rpm | 1.3 MB 00:00:00
(16/19): python2-pytoml-0.1.18-1.el7.noarch.rpm | 20 kB 00:00:00
(17/19): skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64.rpm | 17 kB 00:00:00
(18/19): yajl-2.0.4-4.el7.x86_64.rpm | 39 kB 00:00:00
(19/19): subscription-manager-rhsm-certificates-1.20.11-1.el7.centos.x86_64.rpm | 195 kB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 25 MB/s | 25 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64 1/19
Installing : yajl-2.0.4-4.el7.x86_64 2/19
Installing : 2:oci-umount-2.3.3-3.gite3c9055.el7.x86_64 3/19
Installing : 1:oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64 4/19
Installing : 7:device-mapper-event-1.02.146-4.el7.x86_64 5/19
Installing : 7:lvm2-libs-2.02.177-4.el7.x86_64 6/19
Installing : 1:skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64 7/19
Installing : 2:container-selinux-2.68-1.el7.noarch 8/19
Installing : 1:oci-register-machine-0-6.git2b44233.el7.x86_64 9/19
Installing : subscription-manager-rhsm-certificates-1.20.11-1.el7.centos.x86_64 10/19
Installing : python2-pytoml-0.1.18-1.el7.noarch 11/19
Installing : 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64 12/19
Installing : libaio-0.3.109-13.el7.x86_64 13/19
Installing : device-mapper-persistent-data-0.7.3-3.el7.x86_64 14/19
Installing : 7:lvm2-2.02.177-4.el7.x86_64 15/19
Installing : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch 16/19
Installing : 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64 17/19
Installing : 2:docker-client-1.13.1-75.git8633870.el7.centos.x86_64 18/19
Installing : 2:docker-1.13.1-75.git8633870.el7.centos.x86_64 19/19
Verifying : device-mapper-persistent-data-0.7.3-3.el7.x86_64 1/19
Verifying : libaio-0.3.109-13.el7.x86_64 2/19
Verifying : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64 3/19
Verifying : python2-pytoml-0.1.18-1.el7.noarch 4/19
Verifying : subscription-manager-rhsm-certificates-1.20.11-1.el7.centos.x86_64 5/19
Verifying : 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64 6/19
Verifying : 1:oci-register-machine-0-6.git2b44233.el7.x86_64 7/19
Verifying : 2:oci-umount-2.3.3-3.gite3c9055.el7.x86_64 8/19
Verifying : 2:container-selinux-2.68-1.el7.noarch 9/19
Verifying : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch 10/19
Verifying : 2:docker-client-1.13.1-75.git8633870.el7.centos.x86_64 11/19
Verifying : yajl-2.0.4-4.el7.x86_64 12/19
Verifying : 7:lvm2-libs-2.02.177-4.el7.x86_64 13/19
Verifying : 2:docker-1.13.1-75.git8633870.el7.centos.x86_64 14/19
Verifying : 7:lvm2-2.02.177-4.el7.x86_64 15/19
Verifying : 1:skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64 16/19
Verifying : 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64 17/19
Verifying : 7:device-mapper-event-1.02.146-4.el7.x86_64 18/19
Verifying : 1:oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64 19/19
Installed:
docker.x86_64 2:1.13.1-75.git8633870.el7.centos
Dependency Installed:
atomic-registries.x86_64 1:1.22.1-25.git5a342e3.el7.centos container-selinux.noarch 2:2.68-1.el7 container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7
device-mapper-event.x86_64 7:1.02.146-4.el7 device-mapper-event-libs.x86_64 7:1.02.146-4.el7 device-mapper-persistent-data.x86_64 0:0.7.3-3.el7
docker-client.x86_64 2:1.13.1-75.git8633870.el7.centos docker-common.x86_64 2:1.13.1-75.git8633870.el7.centos libaio.x86_64 0:0.3.109-13.el7
lvm2.x86_64 7:2.02.177-4.el7 lvm2-libs.x86_64 7:2.02.177-4.el7 oci-register-machine.x86_64 1:0-6.git2b44233.el7
oci-systemd-hook.x86_64 1:0.1.17-2.git83283a0.el7 oci-umount.x86_64 2:2.3.3-3.gite3c9055.el7 python2-pytoml.noarch 0:0.1.18-1.el7
skopeo-containers.x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos subscription-manager-rhsm-certificates.x86_64 0:1.20.11-1.el7.centos yajl.x86_64 0:2.0.4-4.el7
Complete!
[root@test ~]# systemctl start docker
[root@test ~]# pip install docker
Collecting docker
Downloading https://files.pythonhosted.org/packages/c2/76/b8091dc6d9db038af62ae88f228da656a84632cf5d7a84dcf54c613d3fd0/docker-3.5.1-py2.py3-none-any.whl (126kB)
100% |████████████████████████████████| 133kB 3.7MB/s
Collecting websocket-client>=0.32.0 (from docker)
Downloading https://files.pythonhosted.org/packages/14/d4/6a8cd4e7f67da465108c7cc0a307a1c5da7e2cdf497330b682069b1d4758/websocket_client-0.53.0-py2.py3-none-any.whl (198kB)
100% |████████████████████████████████| 204kB 3.5MB/s
Collecting docker-pycreds>=0.3.0 (from docker)
Downloading https://files.pythonhosted.org/packages/ea/bf/7e70aeebc40407fbdb96fa9f79fc8e4722ea889a99378303e3bcc73f4ab5/docker_pycreds-0.3.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker)
Requirement already satisfied (use --upgrade to upgrade): ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0 in /usr/lib/python2.7/site-packages (from docker)
Collecting requests!=2.18.0,>=2.14.2 (from docker)
Downloading https://files.pythonhosted.org/packages/f1/ca/10332a30cb25b627192b4ea272c351bce3ca1091e541245cccbace6051d8/requests-2.20.0-py2.py3-none-any.whl (60kB)
100% |████████████████████████████████| 61kB 4.7MB/s
Requirement already satisfied (use --upgrade to upgrade): idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker)
Collecting chardet<3.1.0,>=3.0.2 (from requests!=2.18.0,>=2.14.2->docker)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 4.2MB/s
Collecting urllib3<1.25,>=1.21.1 (from requests!=2.18.0,>=2.14.2->docker)
Downloading https://files.pythonhosted.org/packages/8c/4b/5cbc4cb46095f369117dcb751821e1bef9dd86a07c968d8757e9204c324c/urllib3-1.24-py2.py3-none-any.whl (117kB)
100% |████████████████████████████████| 122kB 4.6MB/s
Collecting certifi>=2017.4.17 (from requests!=2.18.0,>=2.14.2->docker)
Downloading https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl (146kB)
100% |████████████████████████████████| 153kB 4.5MB/s
Installing collected packages: websocket-client, docker-pycreds, chardet, urllib3, certifi, requests, docker
Found existing installation: chardet 2.2.1
Uninstalling chardet-2.2.1:
Successfully uninstalled chardet-2.2.1
Found existing installation: urllib3 1.10.2
Uninstalling urllib3-1.10.2:
Successfully uninstalled urllib3-1.10.2
Found existing installation: requests 2.6.0
DEPRECATION: Uninstalling a distutils installed project (requests) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling requests-2.6.0:
Successfully uninstalled requests-2.6.0
Successfully installed certifi-2018.10.15 chardet-3.0.4 docker-3.5.1 docker-pycreds-0.3.0 requests-2.20.0 urllib3-1.24 websocket-client-0.53.0
You are using pip version 8.1.2, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@test ~]# ansible localhost -m docker_swarm_service -a 'name=test_service image=busybox args=["sleep","9999"]'
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
localhost | FAILED! => {
"changed": false,
"msg": "Error looking for service named test_service: 503 Server Error: Service Unavailable (\"This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again.\")"
}
[root@test ~]# docker swarm init
Swarm initialized: current node (64awyyp6x37a6je2t2y1096z3) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join \
--token SWMTKN-1-4upszmgsjrsxsa1nyjild1vo4m4una6rvu637i2b8ro92d7c5x-e31zsivuuy24amz2netfdfoji \
51.254.110.187:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
[root@test ~]# ansible localhost -m docker_swarm_service -a 'name=test_service image=busybox args=["sleep","9999"]'
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: docker.errors.InvalidVersion: UpdateConfig.order is not supported in API version < 1.29
localhost | FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1540053836.44-186112295070907/AnsiballZ_docker_swarm_service.py\", line 113, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1540053836.44-186112295070907/AnsiballZ_docker_swarm_service.py\", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1540053836.44-186112295070907/AnsiballZ_docker_swarm_service.py\", line 48, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_docker_swarm_service_payload_fLUl1n/__main__.py\", line 1178, in <module>\n File \"/tmp/ansible_docker_swarm_service_payload_fLUl1n/__main__.py\", line 1172, in main\n File \"/tmp/ansible_docker_swarm_service_payload_fLUl1n/__main__.py\", line 1107, in run\n File \"/tmp/ansible_docker_swarm_service_payload_fLUl1n/__main__.py\", line 1008, in create_service\n File \"/usr/lib/python2.7/site-packages/docker/utils/decorators.py\", line 34, in wrapper\n return f(self, *args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/docker/api/service.py\", line 150, in create_service\n rollback_config\n File \"/usr/lib/python2.7/site-packages/docker/api/service.py\", line 30, in _check_api_features\n raise_version_error('UpdateConfig.order', '1.29')\n File \"/usr/lib/python2.7/site-packages/docker/api/service.py\", line 11, in raise_version_error\n param, min_version\ndocker.errors.InvalidVersion: UpdateConfig.order is not supported in API version < 1.29\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
[root@test ~]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment