From d1dbc793719b8d7e3cf6fd2d241f213771db58bb Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Fri, 21 Jun 2024 13:41:17 +0200 Subject: [PATCH] apparently query result now stored in 'msg' instead of 'results' --- tasks/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 38b6b5c..f3eafdd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,15 +24,10 @@ - ansible.builtin.lineinfile: create: yes path: "hostlist.yml" - line: " - { record_name: {{ item.msg.name}}, record_type: A, record_value: {{ item.msg.public_ip.address }}, public_ip_id: {{ item.msg.public_ip.id }} }" + line: " - { record_name: {{ container_info.msg.name}}, record_type: A, record_value: {{ container_info.msg.public_ip.address }}, public_ip_id: {{ container_info.msg.public_ip.id }} }" state: present - loop: "{{ container_info.results }}" when: scw_gen_hostlist == 'true' and container_action !='delete' - - name: debug - debug: - msg: "ip id: {{ container_info.msg.public_ip.id }}" - - name: "delete ip " community.general.scaleway_ip: id: container_info.msg.public_ip.id