Hi All,
I have an array with nodenames, ex: [node1, node2, node3, node4]
and I am running a task using with_items with this array
Here is my task, I will go through each node and see if epsilon is on this node, if not then pass, if epsilon is on this item(node), then I should modify it to false notify another task to modify epsilon to true on other node
But I am facing an issue that how can I set -node {{XXX}} to other nodename except the {{item}} one.
-
name: ..... modify epsilon to false if on this node
netapp.ontap.na_ontap_command:
hostname: "{{ cluster_hostname }}"
username: "{{ cluster_username }}"
password: "{{ cluster_password }}"
https: true
validate_certs: false
command: ["set advanced -confirmations off;cluster modify -node {{item}} -epsilon false"]
return_dict: true
when: epsilon_dic[item] != 'false'
notify: SetTrueToAnotherNode -
handlers:
- name: SetTrueToAnotherNode
netapp.ontap.na_ontap_command:
hostname: "{{ cluster_hostname }}"
username: "{{ cluster_username }}"
password: "{{ cluster_password }}"
https: true
validate_certs: false
command: ["set advanced -confirmations off;cluster modify -node {{XXX}} -epsilon true"]
return_dict: true
- name: SetTrueToAnotherNode