Skip to content

Commit

Permalink
Issue #4058 - Docs Bug for docker/podman (#4068)
Browse files Browse the repository at this point in the history
Previous behavior is your molecule group would only contain the last
platform since the elements were not merging:

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/combine_filter.html


```
TASK [Display uname info] ******************************************************
ok: [foo] => {
    "msg": "Linux...\n"
}
```

New behavior is all of your platforms will be in the host inventory

```
TASK [Display uname info] ******************************************************
ok: [foo] => {
    "msg": "Linux...\n"
}
ok: [bar] => {
    "msg": "Linux...\n"
}
```

Fixes: #4058
  • Loading branch information
clickthisnick authored Oct 17, 2023
1 parent 7d6fa0f commit 1b23606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion molecule/docker/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
ansible_connection: community.docker.docker
ansible.builtin.set_fact:
molecule_inventory: >
{{ molecule_inventory | combine(inventory_partial_yaml | from_yaml) }}
{{ molecule_inventory | combine(inventory_partial_yaml | from_yaml, recursive=true) }}
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
Expand Down
2 changes: 1 addition & 1 deletion molecule/podman/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
ansible_connection: containers.podman.podman
ansible.builtin.set_fact:
molecule_inventory: >
{{ molecule_inventory | combine(inventory_partial_yaml | from_yaml) }}
{{ molecule_inventory | combine(inventory_partial_yaml | from_yaml, recursive=true) }}
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
Expand Down

0 comments on commit 1b23606

Please sign in to comment.