I'm attempting to create config files from one or more csv files. I want the name of each config file to be the hostname (first field) within each record read from the csv files. I think I'm close, but I can't seem to find the right reference for that hostname value.
TASK [opengear : Read the csv files] ***************************************************************************************************************************************
ok: [localhost] => (item=/home/sysadmin/TimsTest1/roles/opengear/files/USCAL3-File1.csv:USCAL3-IM7208-01,The Lab ,America/New_York,10.103.50.6,10.9.167.218,10.10.61.71,10.103.50.1,255.255.255.224,
network...@me.com,MyAddressHere Flr-3,USCAL3-RW4451-01-03,USCAL3-RW4451-02-03,USCAL3-AS3650-01-03,USCAL3-AS3650-02-03,Port 5,RTR-A,RTR-B,Port 8) => {
"item": "/home/sysadmin/TimsTest1/roles/opengear/files/USCFC3-File1.csv:USCFC3-IM7208-01,The Lab ,America/New_York,10.103.50.6,10.9.167.218,10.10.61.71,10.103.50.1,255.255.255.224,
network...@me.com,MyAddressHere Flr-3,USCAL3-RW4451-01-03,USCAL3-RW4451-02-03,USCAL3-AS3650-01-03,USCAL3-AS3650-02-03,Port 5,RTR-A,RTR-B,Port 8",
"msg": ""
}
I hope that makes sense.