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

Podman: build compatible Ansible image task don't use custom podman executable #253

Closed
ghoudmon opened this issue Apr 29, 2024 · 0 comments · Fixed by #254
Closed

Podman: build compatible Ansible image task don't use custom podman executable #253

ghoudmon opened this issue Apr 29, 2024 · 0 comments · Fixed by #254

Comments

@ghoudmon
Copy link
Contributor

Description

Podman driver allows to customize the podman executable path. This custom path is passed to all containers.podman modules, except for the task Build an Ansible compatible image.

Current behavior

    - name: Build an Ansible compatible image # noqa: no-handler
      containers.podman.podman_image:
        build:
          extra_args: >-
            {% if item.item.buildargs is defined %}{% for i, k in item.item.buildargs.items() %}--build-arg={{ i }}={{ k }}{% endfor %}{% endif %}
            {% if item.item.pull is defined %}--pull={{ item.item.pull }}{% endif %}
          file: "{{ item.dest }}"
        name: "molecule_local/{{ item.item.image }}"
        path: "{{ molecule_scenario_directory }}"
        pull: "{{ item.item.pull | default(omit) }}"
      loop: "{{ platforms.results }}"

Expected behavior

    - name: Build an Ansible compatible image # noqa: no-handler
      containers.podman.podman_image:
        executable: "{{ podman_exec }}"
        build:
          extra_args: >-
            {% if item.item.buildargs is defined %}{% for i, k in item.item.buildargs.items() %}--build-arg={{ i }}={{ k }}{% endfor %}{% endif %}
            {% if item.item.pull is defined %}--pull={{ item.item.pull }}{% endif %}
          file: "{{ item.dest }}"
        name: "molecule_local/{{ item.item.image }}"
        path: "{{ molecule_scenario_directory }}"
        pull: "{{ item.item.pull | default(omit) }}"
      loop: "{{ platforms.results }}"
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

Successfully merging a pull request may close this issue.

1 participant