# Is single molecule.yml with support for docker, podman and gce plugins possible?

**URL:** <https://forum.ansible.com/t/is-single-molecule-yml-with-support-for-docker-podman-and-gce-plugins-possible/3401>\
**Category:** Get Help\
**Tags:** molecule\
**Created:** [January 20, 2024, 7:31am UTC](https://forum.ansible.com/t/is-single-molecule-yml-with-support-for-docker-podman-and-gce-plugins-possible/3401 "2024-01-20T07:31:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [January 20, 2024, 7:31am UTC](https://forum.ansible.com/t/is-single-molecule-yml-with-support-for-docker-podman-and-gce-plugins-possible/3401/1 "2024-01-20T07:31:07Z")

</div>

I want to create a Molecule scenario that can be executed using either on Docker, Podman or GCE. Is it possible to have a single molecule.yml support this?

To use the Docker or Podman plugins, `name: docker|podman` goes under `driver:`, however more options seem to be required for the GCE plugin. Would it work to set the GCE plugin specific options under `driver:` and set the value of `driver.name` to `docker, `podman`or`gce`? Would the Docker or Podman drivers ignore the GCE-specific options?

I see that platform is a list and I think I can have driver specific platform, each with a specific name and have the platform selected by name on execution. Will this work?

I suppose an option is to use the Delegated plugin and add all the Docker, Podman & GCE specific code to the create and destroy playbooks. However I’d like to know if it’s feasible to do this in molecule.yml.

What’s the wisdom from the community?

---

<div class="post-metadata">

**Author:** ![atul\_mohan](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atul\_mohan](https://forum.ansible.com/u/atul_mohan)\
**Post date:** [January 5, 2025, 4:49pm UTC](https://forum.ansible.com/t/is-single-molecule-yml-with-support-for-docker-podman-and-gce-plugins-possible/3401/2 "2025-01-05T16:49:44Z")

</div>

```auto
---
dependency:
  name: galaxy
driver:
  name: delegated # Using 'delegated' here allows us to specify different drivers for each platform
platforms:
  - name: docker_instance
    driver:
      name: docker
    image: ubuntu:20.04
    pre_build_image: true
    command: /sbin/init
    privileged: true # For systemd-enabled containers

  - name: podman_instance
    driver:
      name: podman
    image: quay.io/centos/centos:stream8
    command: /sbin/init
    privileged: true
    tmpfs:
      - /run
      - /tmp
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro

  - name: gce_instance
    driver:
      name: gce
    instance_template: molecule_gce_template
    zone: us-central1-a
    project: your-gcp-project-id
    service_account_email: your-service-account@your-gcp-project-id.iam.gserviceaccount.com
    service_account_file: /path/to/your-credentials.json
    machine_type: n1-standard-1

provisioner:
  name: ansible
  playbooks:
    converge: converge.yml
verifier:
  name: ansible

```
