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"Acceptance,Clearing BATCH files from var/log and var/tmp folder,5,abst_b,"rm -rf /appl/abst/abst_o1/var/log/* \/appl/abst/abst_o1/var/tmp/*;\
find /appl/abst/abst_o1/var/log/ -user abst_b1 -type f -exec rm {} \;\
find /appl/abst/abst_o1/var/log/ -user abst_b1 -type l -exec rm {} \;\
find /appl/abst/abst_o1/var/tmp/ -user abst_b1 -type f -exec rm {} \;\
find /appl/abst/abst_o1/var/tmp/ -user abst_b1 -type l -exec rm {} \;\
find /appl/abst/abst_o1/var/log/ ! -name log -user abst_b1 -type d -exec rmdir {} \;\
find /appl/abst/abst_o1/var/tmp/ ! -name tmp -user abst_b1 -type d -exec rmdir {} \;"
Acceptance,Clearing OWNER files from var/log and var/tmp folder,5,abst_o,"find /appl/abst/abst_o1/var/log\/ -user abst_o1 -type f -\exec rm {} \;\
find /appl/abst/abst_o1/var/tmp/ -user abst_o1 -type f -exec rm {} \;\
find /appl/abst/abst_o1/var/log/ ! -name log -user abst_o1 -type d -exec rmdir {} \;\
find /appl/abst/abst_o1/var/tmp/ ! -name tmp -user abst_o1 -type d -exec rmdir {} \;\
ls -1a /appl/abst/abst_o1| grep -Evw "".|..|var|.ssh"" | xargs -I {} rm -rf {}"
Acceptance,Creating tmp folder,5,abst_o,"mkdir -m 2775 /appl/abst/abst_o1/tmp"
Acceptance,Secure Copy the source files,60,abst_o,"lrv153wc.europe.intranet:/appl/pbst/pbst_o1/var/tmp/pbst_*`date +"%Y%m%d"`* /appl/abst/abst_o1/tmp/."
Acceptance,Unzipping and untarring ER file,20,abst_o,"gunzip /appl/abst/abst_o1/tmp/pbst_o1_`date +""%Y%m%d""`????.tar.gz;\
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7c8dfc3d-3557-4878-a0a7-0def9ea5100b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/WdXhNd7hH1Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5b65da46.1c69fb81.7f7fa.1459%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.