Hi,
I have a task defined as follows:
- name: copy defgen paramfile
template: src={{ item.key }}.prm.j2 dest={{ ogg_home }}/{{ item.value.pfileloc }}/{{ item.key }}.prm backup=yes
when: defgensrc is defined and oggaction == ‘defgensrc’
with_dict: defgensrc
It is operating on two hosts in a group, but one of the hosts does not have the dictionary defgensrc defined.
So, I get this error:
fatal: [mn-ldvora01.rxhub.net] => with_dict expects a dict
Is there a way to conditionally skip this task when the dictionary is not defined,
or would it be better to further refine my groups so that the host that is a “defgensrc” is in a specific child group and the one that is not a “defgensrc”
The two hosts are defined in a group called [mn-ogg] because they are both oracle golden gate servers, but one is the source of “defgen” and the other is the destination of the results of “defgen”.
(not that you probably need to know the details of all that)
Thanks in advance,
Heath Henjum