Skip to content

Ansible rebuilds images after molecule destroy when pre_build_image: false #79

Open
@nahsi

Description

When I run molecule create with pre_build_image: false ansible recreates image everytime.
I'm not sure if this is a bug or expected behavior?

After molecule create

ls ~/.cache/molecule/gentoo-portage/default/
ansible.cfg                  Dockerfile_gentoo_portage  molecule.yml
inventory                     state.yml

After molecule destroy Dockerfile is gone

ls ~/.cache/molecule/gentoo-portage/default/
ansible.cfg  inventory  state.yml

Next time I run molecule create Dockerfiles would be created again triggering Build an Ansible compatible image with platforms.changed

My molecule.yml file

driver:
  name: podman
platforms:
  - name: gentoo-portage
    image: gentoo-portage
    dockerfile: Containerfile
    pre_build_image: false
    cmd: /sbin/init
 provisioner:
  name: ansible
verifier:
  name: ansible

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions