Simple install - Syntax Error with image_build/tasks/main.yml

When installing AWX from the documentation, it stops at an error with image_build/tasks/main.yml

Following the install guide found here: https://github.com/ansible/awx/blob/devel/INSTALL.md

Installed the requirements:

apt update apt install -y ansible docker make git python-setuptools python-pip python3-pip pip install --upgrade pip pip install --upgrade docker pip3 install --upgrade pip pip3 install --upgrade docker git clone https://github.com/ansible/awx.git

Ran the ansible playbook

`
root@ansible-world0:~/awx/installer# ansible-playbook -i inventory install.yml
ERROR! no action detected in task

The error appears to have been in ‘/root/awx/installer/image_build/tasks/main.yml’: line 63, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • name: Build AWX distribution
    ^ here
    `

Related: https://github.com/ansible/awx/issues/179

Looks like the docker_container module isn't found. What version of Ansible are you using?

On Ubuntu 16.04

`

root@ansible-world0:~/awx/installer# ansible --version
ansible 2.0.0.2

`

Since you mentioned which version of Ansible I was using, I decided to take a look, and looks like I needed to use their ppa’s, and it’s not updated on Ubuntu’s default repositories

`

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible

`

Yep that's the problem. docker_container was added in Ansible 2.1 http://docs.ansible.com/ansible/latest/docker_container_module.html

Try upgrading to the latest version of Ansible.

Upgraded to ansible 2.3.2.0 with the ppa, and got a new error:

`

ansible 2.3.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

`

`

TASK [image_build : Build sdist builder image] **************************************************************************************************
fatal: [localhost → localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Error connecting: Error while fetching server API version: (‘Connection aborted.’, error(2, ‘No such file or directory’))”}
to retry, use: --limit @/root/awx/installer/install.retry

PLAY RECAP **************************************************************************************************************************************
localhost : ok=8 changed=2 unreachable=0 failed=1

`

That error is happening because the docker service isn’t running on your local system.

Yeah it turns out docker can’t run inside LXC :frowning:

So I’ll have to use KVM instead, until AWX goes non-docker. But that won’t be for a long time according to them, because of the support nightmare it would be for them