-2

I am trying to process around 6000+ dictionary lists in ansible using a small play. The execution is getting stopped in the middle with an error ERROR! A worker was found in a dead state. I have noticed that the memory usage was going up gradually while i was running the task. Playbook has different variables, in that mractive variable contains more than 6000+ dictionary of lists. Is there any solution to fix the memory issue or any ways to optimise the play so that it wont consume more memory for the execution.

Playbook:

- name: Create a Netid mapping for the Netname provided
      vars:
        orgid: >-
          {{
              mrorgnetall
              | selectattr('id', '==', item.network.id)
              | map(attribute='organizationId') 
              | first
              | default([])
           }}       
      set_fact:
        mrdevtag: >-
         {{ mrdevtag | default([]) + [item |  combine({'organizationId': orgid | trim})] }}
      with_items:  "{{ mractive }}"
Vinny
  • 302
  • 2
  • 11

0 Answers0