ansible-container fix mysql_config not found issue

It has to be noted that ansible-container is not a supported redhat product. So everything you see here is unsupported. If you want to use ansible to package containers look at the Ansible Playbook Bundle in OpenShift.

I thought it would be a good idea to see where ansible container is. My goal was to create a wordpress  container backed by mariadb. Here is the github repo to my files:

based on the documentation I was supposed to be able to build my project by simply running ansible-container build. This resulted in the following error

This is kind of weird as in my ansible role I am installing MySQL-python. It seems that this doesn’t matter.

A workaround to get this working is to use –use-local-python which uses the python you have on the system.

After this builds correctly you can then run

You can now go to http://localhost or http://ipwherethecontainersarerunning and should see the WordPress install page

If you want to push this image to OpenShift you can do the following (Be aware that I OpenShift was not able to run the image due to Error: InvalidImageName and Failed to apply default image tag:)

Login to OpenShift and create new project (be aware the project name has to match your ansible-container project name)

In OpenShift for ansible container to work the following needs to be done so that the user can access the registry:

Now Bob can push images to openshift

then you can run as bob

now you can push the images to the registry

Then deploy the container to the OpenShift registry and create the build config

If successful you should be able to do this:



Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hit Counter provided by laptop reviews