Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

fix: allow publishing multiple ports #69

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ platforms:
- name: instance
image: docker.io/pycontribs/centos:8
pre_build_image: true
published_ports:
- 127.0.0.1:2080:80
- 127.0.0.1:2443:443
provisioner:
name: ansible
verifier:
Expand Down
2 changes: 1 addition & 1 deletion src/molecule_podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
{% if item.tmpfs is defined %}{% for i in item.tmpfs %}--tmpfs={{ i }} {% endfor %}{% endif %}
{% if item.capabilities is defined %}{% for i in item.capabilities %}--cap-add={{ i }} {% endfor %}{% endif %}
{% if item.exposed_ports is defined %}--expose="{{ item.exposed_ports|join(',') }}"{% endif %}
{% if item.published_ports is defined %}{% for i in item.published_ports %}--publish={{ i }}{% endfor %}{% endif %}
{% if item.published_ports is defined %}{% for i in item.published_ports %}--publish={{ i }} {% endfor %}{% endif %}
{% if item.ulimits is defined %}{% for i in item.ulimits %}--ulimit={{ i }} {% endfor %}{% endif %}
{% if item.dns_servers is defined %}--dns="{{ item.dns_servers|join(',') }}"{% endif %}
{% if item.env is defined %}{% for i,k in item.env.items() %}--env={{ i }}={{ k }} {% endfor %}{% endif %}
Expand Down