# Molecule login failling for the molecule gce driver

**URL:** <https://forum.ansible.com/t/molecule-login-failling-for-the-molecule-gce-driver/7725>\
**Category:** Get Help\
**Tags:** molecule\
**Created:** [August 7, 2024, 9:34pm UTC](https://forum.ansible.com/t/molecule-login-failling-for-the-molecule-gce-driver/7725 "2024-08-07T21:34:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [August 7, 2024, 9:34pm UTC](https://forum.ansible.com/t/molecule-login-failling-for-the-molecule-gce-driver/7725/1 "2024-08-07T21:34:56Z")

</div>

hello !

I’m getting the following error when running molecule login. Does anyone know why that would be the case?

```auto
molecule --debug login -s node-exporter-gce-vm --host molecule-node-exporter-gce-vm-1-REDACTED
INFO Found config file /REDACTED/.config/molecule/config.yml
DEBUG Validating schema /REDACTED/Ansible/Collections/Services/prometheus/tests/roles/molecule/blackbox-exporter-gce-vm/molecule.yml.
WARNING Driver gce does not provide a schema.
DEBUG Validating schema /REDACTED/Ansible/Collections/Services/prometheus/tests/roles/molecule/node-exporter-gce-vm/molecule.yml.
WARNING Driver gce does not provide a schema.
DEBUG Inventory /REDACTED/Ansible/Collections/Services/prometheus/tests/roles/molecule/node-exporter-gce-vm/../../../../dynamic-inventories/gitlab_molecule_inventory.py linked to /REDACTED/.cache/molecule/roles/node-exporter-gce-vm/inventory/hosts
INFO Running node-exporter-gce-vm > login
Bad port '{port}'

```

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [August 7, 2024, 9:36pm UTC](https://forum.ansible.com/t/molecule-login-failling-for-the-molecule-gce-driver/7725/2 "2024-08-07T21:36:25Z")

</div>

My compiled molecule.yml

```auto
~/.cache/molecule/roles/node-exporter-gce-vm/molecule.yml 
# Molecule managed

---
dependency:
  command: null
  enabled: true
  env: {}
  name: galaxy
  options:
    requirements-file: ../../collections/requirements.yml
driver:
  auth_kind: application
  external_access: false
  instance_os_type: linux
  name: gce
  network_name: REDACTED
  options:
    managed: true
  project_id: REDACTED
  provider:
    name: null
  region: us-east1
  safe_files: []
  ssh_connection_options: []
  subnetwork_name: REDACTED
  vpc_host_project: REDACTED
platforms:
  - disk_size_gb: 50
    image: REDACTED
    machine_type: n2-standard-2
    name: REDACTED-1
    preemptible: false
  - disk_size_gb: 50
    image: REDACTED
    machine_type: n2-standard-2
    name: REDACTED-2
    preemptible: false
prerun: true
provisioner:
  ansible_args: []
  children: {}
  config_options:
    defaults:
      inject_facts_as_vars: false
  connection_options: {}
  env: {}
  inventory:
    group_vars: {}
    host_vars: {}
    hosts: {}
    links:
      hosts: ../../../../dynamic-inventories/gitlab_molecule_inventory.py
  log: true
  name: ansible
  options: {}
  playbooks:
    cleanup: cleanup.yml
    converge: converge.yml
    create: create.yml
    destroy: destroy.yml
    prepare: prepare.yml
    side_effect: side_effect.yml
    verify: verify.yml
role_name_check: 0
scenario:
  check_sequence:
    - dependency
    - cleanup
    - destroy
    - create
    - prepare
    - converge
    - check
    - cleanup
    - destroy
  cleanup_sequence:
    - cleanup
  converge_sequence:
    - dependency
    - create
    - prepare
    - converge
  create_sequence:
    - dependency
    - create
    - prepare
  destroy_sequence:
    - dependency
    - cleanup
    - destroy
  idempotence_sequence:
    - dependency
    - idempotence
  name: node-exporter-gce-vm
  test_sequence:
    - dependency
    - cleanup
    - destroy
    - syntax
    - create
    - prepare
    - converge
    - idempotence
    - side_effect
    - verify
    - cleanup
    - destroy
verifier:
  additional_files_or_dirs: []
  directory: controls
  enabled: true
  env:
    ANSIBLE_REMOTE_USER: REDACTED
  name: testinfra
  options:
    ansible-inventory: REDACTED
    confcutdir: REDACTED
    ssh-identity-file: REDACTED

```

---

<div class="post-metadata">

**Author:** ![Carlos\_Gonzalez\_Vila](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/carlos_gonzalez_vila/32/5349_2.png) [@Carlos\_Gonzalez\_Vila](https://forum.ansible.com/u/Carlos_Gonzalez_Vila)\
**Post date:** [November 4, 2024, 1:54pm UTC](https://forum.ansible.com/t/molecule-login-failling-for-the-molecule-gce-driver/7725/3 "2024-11-04T13:54:22Z")

</div>

This is a bug in the driver fixed months ago but for some reason there has been no new release of the molecule\_drivers. You can fix it as was done here:

> <https://github.com/ansible-community/molecule-plugins/commit/fdc748ffa7b72686f4f99196c8b528167eccf40f>
>
> fix #239 , use python-style templating instead of Jinja in all drivers login\_cmd…\_template
> 
> This file assumes Jinja templating for the port parameter and passes a Jinja-style "{{ port }}".
> 
> https://github.com/ansible/molecule/blob/main/src/molecule/command/login.py#L105
> 
> When it reaches molecule, it is subsituted in this file and is done by python calling \`.format()\` on the string.
> That causes it to not render correctly and gives users issues running
> molecule login.
> 
> ref: https://github.com/ansible-community/molecule-plugins/issues/239
> 
> Fixed all affected plugins.
