On 12. juli 2017 16:37, rakesh boinapally wrote:
we usually perform lot of multipath tasks in our company.


On a server if i want to configure multipath for disk aliases


multipath -ll|egrep "dm-|size"|sed -e 's/\]/ /g'|sed -e 'N' -e 's/\n/
/'|awk '{print $6,$2}'|sed -e 's/\[size=//g'|sed -e 's/(//g'|sed -e
's/)//g'|sed -e 's/\.0G/G/'|sort  this displays output like below

To register output in a variable from a module in Ansible you have register:
https://docs.ansible.com/ansible/playbooks_variables.html#registered-variables


once we have this output we usually copy this output into file like allluns
and run a script like below  test-create-multipath-conf.sh to
To create files in Ansible where you can use the variable you have the template module.
https://docs.ansible.com/ansible/template_module.html


--
Kai Stian Olstad

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3d99606f-67c3-8ee8-94ab-ec904521f5c6%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to