unable to connect to Ubuntu docker image

66 views
Skip to first unread message

AWOL Linux

unread,
Nov 25, 2020, 1:09:25 AM11/25/20
to molecule-users
Hello this is awol I am having a issue here with molecule where when i try to test a role with ubuntu. When I run molecule it doesn't give any errors.

changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '74676270053.259692', 'results_file': '/home/ansible/.ansible_async/74676270053.259692', 'changed': True, 'failed': False, 'item': {'image': 'docker.io/fnndsc/ubuntu-python3:18.04', 'name': 'ubuntu1804', 'pre_build_image': True}, 'ansible_loop_var': 'item'})
    changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '315668388846.259714', 'results_file': '/home/ansible/.ansible_async/315668388846.259714', 'changed': True, 'failed': False, 'item': {'image': 'docker.io/library/centos:latest', 'name': 'centos7', 'pre_build_image': True}, 'ansible_loop_var': 'item'})

Then when i run docker ps i only see 1 image running.

(ansible) ansible@ansible-server /e/a/r/baseline_role (dev)> sudo docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
21b2d760a1d8        centos:latest       "bash -c 'while true…"   2 minutes ago       Up 2 minutes                            centos7
 
My molecule file looks like this.

dependency:
  name: galaxy
  options:
    ignore-certs: True
    ignore-errors: True
    role-file: molecule/default/requirements.yml
driver:
  name: docker 
platforms:
  - name: ubuntu1804
    pre_build_image: true
  - name: centos7
    pre_build_image: true
provisioner:
  name: ansible
  ssh_connection:
          pipeline: true
  log: true
scenario ....
....
verifier:
  name: ansible
lint: |
  set -e
  yamllint .
  ansible-lint

The role is on GitLab


On the dev tree.

Any help I can get i would be amazing. I'm sorry if its hard to read.
Thank you

AWOL Linux

unread,
Nov 25, 2020, 1:14:04 AM11/25/20
to molecule-users
I'm sorry about that. I realized I wasn't specific enough. I used "molecule create" in the first step sorry about that.

--
You received this message because you are subscribed to a topic in the Google Groups "molecule-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/molecule-users/owu_8M57rMI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to molecule-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/molecule-users/0f849f03-e818-4953-a339-1dca4a9a3986n%40googlegroups.com.

AWOL Linux

unread,
Nov 25, 2020, 6:23:16 PM11/25/20
to molecule-users
Great news, i got it working. The docker container wasn't starting because Molecule calls bash by default which wasn't installed so i had to use a different image.
Reply all
Reply to author
Forward
0 new messages