Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent "SSH: Temporary failure in name resolution" when attempting to utilize docker plugin #208

Open
patrickblackjr opened this issue Nov 15, 2023 · 1 comment

Comments

@patrickblackjr
Copy link

patrickblackjr commented Nov 15, 2023

Attempting to utilize the Docker plugin is resulting in the following errors no matter what I seem to try.

Error logs

PLAY [Converge] ****************************************************************

TASK [Include webserver config role] *******************************************

TASK [my_role_name : Debug] *****************************************************
ok: [rhel-9] => {
    "msg": "debug from tasks/main.yml"
}

TASK [my_role_name : ansible.builtin.include_vars] ******************************
ok: [rhel-9]

TASK [my_role_name : Create apps folder] ****************************************
fatal: [rhel-9]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname rhel-9: Temporary failure in name resolution", "unreachable": true}

I have reproduced this error in both my local workstation and in CI/CD. So this is either something with molecule/the plugins or my configuration somewhere. I have tried various roles to ensure it's not something specific to the role I am testing.

converge.yml

- name: Converge
  hosts: all
  gather_facts: false
  tasks:
    - name: Include webserver config role
      ansible.builtin.include_role:
        name: my_role_name
        tasks_from: main.yml

molecule.yml

prerun: false
dependency:
  name: galaxy
driver:
  name: docker
lint: |
  yamllint .
  ansible-lint .
platforms:
  - name: rhel-9
    image: redhat/ubi9:9.1.0
    # platform: aarch64
    dockerfile: Dockerfile.j2
    privileged: true
    cgroupns_mode: host
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:rw
    command: /usr/sbin/init
provisioner:
  name: ansible
  log: true

Versions

ansible [core 2.15.5]
molecule 6.0.2 using python 3.10
    ansible:2.15.5
    azure:23.5.0 from molecule_plugins
    containers:23.5.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
    default:6.0.2 from molecule
    docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0
    ec2:23.5.0 from molecule_plugins
    gce:23.5.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
    podman:23.5.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
    vagrant:23.5.0 from molecule_plugins
Docker version 24.0.7, build afdd53b
@zhan9san
Copy link
Member

zhan9san commented Dec 1, 2023

@patrickblackjr

Could you please provide the Dockerfile.j2?

And have you tried other docker image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants