molecule-plugins icon indicating copy to clipboard operation
molecule-plugins copied to clipboard

Driver vagrant does not provide a schema.

Open zerchevack opened this issue 9 months ago • 2 comments

Hello,

I try to run a simple molecule test but the creation fail with the bellow output I think the vagrant instance is not create and this is the reason of ansible failed but i don't know why the "Create" playbook skip all tasks.

WARNING  Driver vagrant does not provide a schema.
INFO     default scenario test matrix: dependency, create, prepare
INFO     Performing prerun with role_name_check=0...
INFO     Using ~/.ansible/roles/mycompagny/linux_administration symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Running default > dependency
WARNING  Skipping, missing the requirements file.
WARNING  Skipping, missing the requirements file.
INFO     Running default > create

PLAY [Create] ******************************************************************

TASK [Populate instance config dict] *******************************************
skipping: [localhost]

TASK [Convert instance config dict to a list] **********************************
skipping: [localhost]

TASK [Dump instance config] ****************************************************
skipping: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=0    skipped=3    rescued=0    ignored=0

INFO     Running default > prepare

PLAY [Prepare] *****************************************************************

TASK [Gather system info] ******************************************************
fatal: [instance]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname instance: Name or service not known", "unreachable": true}

PLAY RECAP *********************************************************************
instance                   : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

CRITICAL Ansible return code was 4, command was: ansible-playbook --inventory ~/.cache/molecule/my-app/default/inventory --skip-tags molecule-notest,notest ~/test-molecule/molecule-venv/lib/python3.10/site-packages/molecule_plugins/vagrant/playbooks/prepare.yml

My molecule.yml file :

  name: galaxy
driver:
  name: vagrant
  provider:
    name: libvirt
platforms:
  - name: instance
    box: generic/debian12
provisioner:
  name: ansible
  log: true
  scenario:
    name: default
verifier:
  name: ansible

My converge file :

- name: Converge
  hosts: all
  gather_facts: false
  tasks:
    - name: Replace this task with one that validates your content
      setup:
      register: facts

    - name: Show facts
      debug:
        var: facts

My pip module installed :

Package                   Version
------------------------- --------
ansible                   8.4.0
ansible-compat            4.1.10
ansible-core              2.15.4
attrs                     23.1.0
bracex                    2.4
cffi                      1.16.0
click                     8.1.7
click-help-colors         0.9.2
cryptography              41.0.4
distro                    1.8.0
enrich                    1.2.7
Jinja2                    3.1.2
jsonschema                4.19.1
jsonschema-specifications 2023.7.1
libvirt-python            9.8.0
markdown-it-py            3.0.0
MarkupSafe                2.1.3
mdurl                     0.1.2
molecule                  6.0.2
molecule-plugins          23.5.0
packaging                 23.2
pip                       22.0.2
pluggy                    1.3.0
pycparser                 2.21
Pygments                  2.16.1
python-vagrant            1.0.0
PyYAML                    6.0.1
referencing               0.30.2
resolvelib                1.0.1
rich                      13.6.0
rpds-py                   0.10.3
selinux                   0.3.0
setuptools                59.6.0
subprocess-tee            0.4.1
wcmatch                   8.5
wheel                     0.37.1

My molecule version :

    ansible:2.15.4
    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:23.5.0 from molecule_plugins 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

Could you you help me ? Have you an idea ?

Thanks

zerchevack avatar Oct 03 '23 15:10 zerchevack