I'm trying to get an ip adress from an docker container w/ ansible-module docker_container_info. Following is my suspection how it would be get excluded from the result.
- name: Get infos on container
docker_container_info:
name: nextcloud-db
register: result_container
- name: Dump grep matching interfaces from ansible_interfaces
set_fact:
interfaces_list: "{{ result_container | select('match', '^IPAddress') }}"
- debug:
var: result_container
- debug:
var: interfaces_list
while trying this i get this error
TASK [debug] ******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"interfaces_list": "<generator object select_or_reject at 0x7f2bb30d55a0>"
}
How do i extract the ip address from this result else? The goal is to create an variable that i can use later to dump an database and import it to another docker container.