Giter Site home page Giter Site logo

ansible-role-docker's People

Contributors

maricaantonacci avatar micafer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-docker's Issues

Introduce Support for Ubuntu 16.04

Hi,

We where doing some tests to deploy a Mesos cluster on AWS, which uses this role but the deployment fails with the following error:

TASK [indigo-dc.docker : Fail if OS distro is not Ubuntu 14.04] ****************
fatal: [34.198.199.10_22]: FAILED! => {"changed": false, "failed": true, "msg": "The role is designed only for Ubuntu 14.04"}

Can we have support for Ubuntu 16.04 for this role.

Thank you very much in advance.

pip broken with sys.stderr.write(f“ERROR: {exc}”)

Environment: Ubuntu 16.04 with Python 2.7
Latest version of pip (21) dropped support for python 2 this month.
However we are still using Ubuntu 16.04 and old python 2 version for some use-cases.

TASK [indigo-dc.docker : [Common] Install docker-py dependency] ****************
Wednesday 27 January 2021  18:19:21.176260
fatal: [192.168.100.70_1]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/pip2 install -U docker", "msg": "\n:stderr: Traceback (most recent call last):\n  File \"/usr/local/bin/pip2\", line 9, in <module>\n    load_entry_point('pip==21.0', 'console_scripts', 'pip2')()\n  File \"/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 542, in load_entry_point\n    return get_distribution(dist).load_entry_point(group, name)\n  File \"/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 2569, in load_entry_point\n    return ep.load()\n  File \"/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 2229, in load\n    return self.resolve()\n  File \"/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 2235, in resolve\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\n  File \"/usr/local/lib/python2.7/dist-packages/pip-21.0-py2.7.egg/pip/_internal/cli/main.py\", line 60\n    sys.stderr.write(f\"ERROR: {exc}\")\n                                   ^\nSyntaxError: invalid syntax\n"}

Ansible docker modules exec error

Hi,

I installed this indigo-dc.docker role. But ansible docker modules exec got an error.

[root@localhost ~]# ansible -m docker_container -a "name=test01 image=busybox detach=yes tty=yes command=sh" localhost
[WARNING]: provided hosts list is empty, only localhost is available

localhost | FAILED! => {
"changed": false,
"failed": true,
"msg": "Failed to import docker-py - cannot import name NotFound. Try pip install docker-py"
}

  • Docker test environment

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

[root@localhost ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:38:28 2017
OS/Arch: linux/amd64

Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:38:28 2017
OS/Arch: linux/amd64
Experimental: false

[root@localhost ~]# pip show docker-py
Name: docker-py
Version: 1.2.3
Summary: Python client for Docker.
Home-page: https://github.com/docker/docker-py/
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /usr/lib/python2.7/site-packages
Requires: requests, six, websocket-client

  • Workground(docker-py module version up-to-date)

[root@localhost ~]# pip install -q -U docker-py
[root@localhost ~]# pip show docker-py
Name: docker-py
Version: 1.10.6
Summary: Python client for Docker.
Home-page: https://github.com/docker/docker-py/
Author: Joffrey F
Author-email: [email protected]
License: UNKNOWN
Location: /usr/lib/python2.7/site-packages
Requires: websocket-client, backports.ssl-match-hostname, ipaddress, six, requests, docker-pycreds

[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost ~]# ansible -m docker_container -a "name=test01 image=busybox detach=yes tty=yes command=sh" localhost
[WARNING]: provided hosts list is empty, only localhost is available

localhost | SUCCESS => {
"ansible_facts": {},
"changed": true
}
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
163cac319573 busybox "sh" 2 seconds ago Up 1 second test01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.