ansible-container | DEPRECATED -- Ansible Container was a tool to build Docker | Continuous Deployment library

 by   ansible Python Version: 0.9.2 License: LGPL-3.0

kandi X-RAY | ansible-container Summary

kandi X-RAY | ansible-container Summary

ansible-container is a Python library typically used in Devops, Continuous Deployment, Ansible, Jenkin, Docker applications. ansible-container has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has high support. You can install using 'pip install ansible-container' or download it from GitHub, PyPI.

Ansible Container is a tool for building Docker images and orchestrating containers using Ansible playbooks.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ansible-container has a highly active ecosystem.
              It has 2220 star(s) with 411 fork(s). There are 140 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 191 open issues and 319 have been closed. On average issues are closed in 70 days. There are 9 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of ansible-container is 0.9.2

            kandi-Quality Quality

              ansible-container has 0 bugs and 0 code smells.

            kandi-Security Security

              ansible-container has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ansible-container code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ansible-container is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              ansible-container releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ansible-container and discovered the below as its top functions. This is intended to give you an instant insight into ansible-container implemented functionality, and help decide if they suit your requirements.
            • Build and build an integration
            • Generate a playbook for a service
            • Generate a fingerprint for a role
            • Resolve a role to a path
            • Generate an integration playbook
            • Get top level secrets
            • Generate a play map
            • Returns the latest image for a service
            • Restart a running engine
            • Wait for ansible_1
            • Run a command on the container
            • Deploy a host to a host
            • Destroy a container
            • Start a host command
            • Push images to the registry
            • Deploy an engine
            • Commit a role as a layer
            • Build a host command
            • Set the environment
            • Build a container image
            • Bootstrap the tool
            • Convert metadata to image config format
            • Adds a sub - command parser to subparser
            • Run a host command
            • Process services
            • Command line arguments
            Get all kandi verified functions for this library.

            ansible-container Key Features

            No Key Features are available at this moment for ansible-container.

            ansible-container Examples and Code Snippets

            Ansible Container Lab,Errata
            Shelldot img1Lines of Code : 17dot img1License : Strong Copyleft (GPL-3.0)
            copy iconCopy
            ubuntu@node01:/vagrant/AnsibleContainer/nginx_webserser$ ansible-container push --username rogerfdias --push-to docker --tag 1.0
            Enter password for user at Docker Hub:
            ERROR Unknown exception
            Traceback (most recent call last):
            File "/usr/local/lib/py  
            django-template,Deploying
            Pythondot img2Lines of Code : 17dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            # Create a new project
            oc new-project demo
            
            # Set the working directory to the project root
            $ cd demo 
            
            # Push the images to the local OpenShift registry
            $ ansible-container push --push-to https://local.openshift/demo --username developer --password   
            django-template,Getting Started
            Pythondot img3Lines of Code : 12dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            # Create a new directory for your project
            $ mkdir demo
            
            # Set the working directory
            $ cd demo 
            
            # Initialize the project
            $ ansible-container init ansible.django-template
            
            # Create the container images
            $ ansible-container build
            
            # Start the containers  
            Provisioning a docker container using ansible
            Pythondot img4Lines of Code : 9dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            - name: Create container
              docker_container:
                name: docker-test
                image: ubuntu:18.04
                command: sleep 1d
            - name: Install python on docker
              delegate_to: docker-test
              raw: apt -y update && apt install -y python-minimal
            
            ansible-container build error - dockers
            Pythondot img5Lines of Code : 12dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            $ sudo pip install virtualenv
            $ virtualenv venv
            $ source venv/bin/activate
            $ pip install ansible
            $ pip install ansible-container[docker]
            $ pip install docker==2.7.0
            
            $ git clone https://github.com/mkowsiak/ansible-w
            Not able to create a docker container using ansible
            Pythondot img6Lines of Code : 16dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            - name: Install nginx
              hosts: web
              roles:
              - j00bar.nginx-container
            
            Version: 2
            services:
              nginx:
                image: centos:7
                ports:
                - "8000:80"
                user: 'nginx'
                command: ['/usr/bin/dumb-init', 'nginx', '-c

            Community Discussions

            QUESTION

            Dockerized PostgreSQL: psql: FATAL: the database system is starting up
            Asked 2020-May-06 at 15:00

            I am trying to build and run two Docker containers hosting PostgreSQL and Citus extension using ansible-container. I am aware that Citus provides containers, but I want to build my own.

            My container.yaml looks as follows:

            ...

            ANSWER

            Answered 2017-Feb-23 at 13:51

            The problem is related to the default shutdown method of the pg_ctl stop mode (pg_ctl gets called by pg_ctlcluster). Stopping the cluster via pg_ctlcluster with the pg_ctl option -m smart during the build process solves this problem:

            Source https://stackoverflow.com/questions/42398199

            QUESTION

            Provisioning a docker container using ansible
            Asked 2019-Apr-23 at 17:51

            I'm trying to use my existing docker playbooks to provision a docker container using ubuntu 18.04 for local development.

            I'm having trouble running playbooks on the container as it does not come with python installed, so from my understanding ansible cannot run.

            Is there a way i can install python on the container so that my playbooks can run?

            NB I know that ansible-container exists but i would like to use my existing playbooks which use become_user and that doesn't work as stated on the build instructions

            ...

            ANSWER

            Answered 2019-Apr-23 at 11:56

            I didn't realise you could just do this.

            Source https://stackoverflow.com/questions/55810587

            QUESTION

            ansible-container is not JSON serializable
            Asked 2018-Aug-15 at 12:14

            We just started getting container.yml "is not JSON serializable" from ansible-container 0.9.2 - which was the version we have been running for months and no errors have a occurred. Any ideas why this could just started?

            Our stack trace is

            ...

            ANSWER

            Answered 2018-Aug-09 at 20:00

            Reposting from comments:

            So while looking up what ruamel.yaml (0.15.52) was, it looks like your version was released today. Did you upgrade your env recently?

            Source https://stackoverflow.com/questions/51773088

            QUESTION

            ansible-container build error - dockers
            Asked 2018-Apr-26 at 12:46

            I am working on ansible container example as mentioned in http://docs.ansible.com/ansible-container/getting_started.html and getting error while doing ansible-container build.

            Container Type is dockers.

            I am new to Ansible containers module and any help is much appreciated. Thank you!!

            ...

            ANSWER

            Answered 2018-Apr-26 at 12:46

            I suggest to use virtualenv.

            Take a look here for a full sample. First, install virtualenv and ansible inside it

            Source https://stackoverflow.com/questions/49583311

            QUESTION

            Ansible Container unable to load libsudo_util.so.0 for privileged module execution
            Asked 2018-Mar-15 at 09:39

            I am trying to use Ansible Container for a basic example which is supposed to install Node within the image. When I use the ansible-container build command, after successfully building the conductor image, it fails the first task with a sudo related error. The task in question requires root privileges to be executed.

            I am running Debian GNU/Linux 9.2 (stretch) with Docker 17.09.0-ce installed through the Docker APT repository. I tried with Ansible both from Debian Stretch (2.2.1.0-2) and from Pypi (2.4.1.0). I tried Ansible Container from Pypi (0.9.3rc0) and from the latest Git source. I always get the exact same error output.

            The Ansible module complains about the following:

            ...

            ANSWER

            Answered 2018-Mar-15 at 09:39

            I found the cause for this:

            The base image debian:stretch does not include sudo. Therefore a solution was to set the become_method to su instead. Normally, this can either be done per task, host or playbook. Because it is not obvious where the equivalent of a playbook lies in Ansible Container and how the concept of hosts applies, I only really had the option to use the task level.

            I decided to add a role which installs sudo in the image and only set the become_method to su for the solitary task within this role. Atfer the role is applied, no further change is needed and the original tasks work.

            A follow-up problem then was, that also GnuPG was not installed either to accomplish the apt_key module task properly. The following solution solves both problems:

            Source https://stackoverflow.com/questions/47280887

            QUESTION

            deploy docker image with ansible-container without a docker registy
            Asked 2017-Dec-22 at 16:38

            I'm trying to use ansible-container to create and deploy my docker application but I can't get it to work.

            I have a remote server which I can configure via ansible. On my local machine I'm using ansible-container to build a docker image which is working fine. After running ansible-container build I have the docker image on my local machine. However, I don't get the next step to work. My goal is to push the docker image from my local machine to the remote server and then create and start a docker container based on this image on the remote server.

            I'm not using a docker registry. Therefore I'm using the --local-images option for ansible-container deploy command which prevents it from pushing the image to a registry (at least this is what I understand from the docs). This command successfully creates an ansible playbook but when I execute this playbook it still tries to pull the image from the docker.io registry and of course can't find it there.

            I think the missing step is to push the local docker image to the remote server but I can't find any hints in the ansible-container docs for this use-case. I have also looked at ansible docker_image module but as far as I understand this is also centered around using a registry.

            How can I deploy a docker image to a remote server with ansible?

            ...

            ANSWER

            Answered 2017-Dec-22 at 16:38

            If you don't have a docker registry, what you need to do is save the image into a tarball, then upload it to the machine, then import the tarball back into a docker image.

            On your local machine save the image into a tarball:

            Source https://stackoverflow.com/questions/47944066

            QUESTION

            Ansible Container: docker.errors.NotFound: 404 Client Error: Not Found ("No such container: web_data")
            Asked 2017-Oct-11 at 05:39

            I'm trying to share a volume between multiple Docker containers using Ansible Container and am getting the following error:

            docker.errors.NotFound: 404 Client Error: Not Found ("No such container: web_data")

            My container.yml looks like:

            ...

            ANSWER

            Answered 2017-Oct-11 at 05:39

            QUESTION

            Ansible-container create Docker image with java8
            Asked 2017-Feb-06 at 15:17

            I'm trying to create simple Docker image with ansible-container build command.

            And I can't figure out a solution to the error I came across while doing so.

            Here are most important files:

            main.yml

            ...

            ANSWER

            Answered 2017-Feb-06 at 15:17

            Most of Ansible modules require Python on target host (container in your case).
            ubuntu:14.04 Docker image doesn't have one preinstalled.

            Use this in your main.yml:

            Source https://stackoverflow.com/questions/42069789

            QUESTION

            Ansible-container builds no docker image
            Asked 2017-Jan-19 at 06:30

            I am struggling with ansible-container. I have an issue similar to that found in here where it was suggested that docker is not configured correctly. Basically I have a bare bones example and no container is built. I have docker install on Ubuntu 16.04 as per instructions and the hello world and Ubuntu bash examples both work.

            Could someone point me to some documentation/references that indicate the correct docker setup and/or the best way of debugging this. It occurred to me that my dns may not be configured correctly.

            I simply tuse the following commands and get the resulting error:

            ...

            ANSWER

            Answered 2017-Jan-14 at 15:11

            Your ansible/container.yml has a line with a command like

            Source https://stackoverflow.com/questions/41650219

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ansible-container

            For examples and a quick tour of Ansible Container visit Getting Started at our docs site. Visit the Ansible Container Demo for a complete walk-through of managing an application from development through cloud deployment.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install ansible-container

          • CLONE
          • HTTPS

            https://github.com/ansible/ansible-container.git

          • CLI

            gh repo clone ansible/ansible-container

          • sshUrl

            git@github.com:ansible/ansible-container.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link