I dont find way to use row with column , in csvfile module it is splitting only for single row it is not included rest of the lines in csvfile to split
please share how to can do achieve this?
following playbook i am using
###################################
---
- hosts: localhost
connection: local
gather_facts: yes
tasks:
- name: set_fact for produser
set_fact:
produser: "{{ lookup('csvfile', 'Production file=gpc.csv col=2
delimiter=,')}}"
- name: checking produser
debug:
msg: "{{produser}}"
- name: set_fact for prodcomm
set_fact:
prodcomm: "{{ lookup('csvfile', 'Production file=gpc.csv col=3
delimiter=,') }}"
- name: checking prodcomm
debug:
msg: "{{prodcomm}}"
csvfile which am using to split column 3 and 4 for each row
###########################################################
following csvfile contain username (abst_o) at column 3 and column 4 contain command (cp /appl/abst/abst_o1/etc/bst/.passfile /tmp)
Acceptance,Backup .passfile file,5,abst_o,"cp /appl/abst/abst_o1/etc/bst/.passfile /tmp"
Atul, you want to split by columns?
Yeah want to split colum 3 and 4 for each row , without any extra characters like “/ , /“, /r,/n
Please tell me ho can I do this.