Forum Discussion

PK_294685's avatar
PK_294685
Icon for Nimbostratus rankNimbostratus
Nov 02, 2017

Ansible/F5 CSV Lookup with empty cells throws error

Hello F5 Folks,

I started to work on Ansible recently and stuck with below situation.

So, i have a csv file to create a node. Each cell has a value something like node-IP, node-name, etc..

The lookup from ansible play works just fine but the problem arises when i lookup a empty cell in csv, f5 throws an error like below

fatal: [testf5 -> localhost]: FAILED! => {"changed": false, "failed": true, "msg": "received exception: Server raised fault: 'Exception caught in LocalLB::urn:iControl:LocalLB/NodeAddressV2::create()\nCommon::InvalidArgument\n'"}

The question arises, why would i lookup a empty cell?

Answer is , I want to create a global csv with at least three nodes(columns) in it and a playbook that looks all 3 node columns in csv to create 3 nodes on f5. If a user want to create only two nodes, f5 throws an error since the cell values will be empty for 3rd node.. So my final requirement is how can i pass empty values to the f5 and not throw an error or skip the play when there are empty values.

I appreciate your patience!

No RepliesBe the first to reply