# Variables

**URL:** <https://forum.ansible.com/t/variables/13884>\
**Category:** Ansible Project\
**Created:** [November 11, 2013, 9:47pm UTC](https://forum.ansible.com/t/variables/13884 "2013-11-11T21:47:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kashyap\_Bhatt](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@Kashyap\_Bhatt](https://forum.ansible.com/u/Kashyap_Bhatt)\
**Post date:** [November 11, 2013, 9:47pm UTC](https://forum.ansible.com/t/variables/13884/1 "2013-11-11T21:47:11Z")

</div>

Hey ho…

I’m trying to get/parse some info out of the yaml returned by a module and want to know if there is any better documentation available than:

- [https://github.com/ansible/ansible/blob/devel/docsite/latest/rst/playbooks2.rst](https://github.com/ansible/ansible/blob/devel/docsite/latest/rst/playbooks2.rst) and
- [http://jinja.pocoo.org/docs/templates/#builtin-filters](http://jinja.pocoo.org/docs/templates/#builtin-filters)

E.g.:

my module returns the data like this:

proc[‘COMMAND’] = ‘/opt/mw/java/jdk1.6.0\_29-32b/bin/java -Dprogram.name=rc\_jboss.sh -server -Xmx2048m -Xms2048m …20 other parameters… org.jboss.Main -c PPPTN-PLAB1 -b HOSTTTY -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB’  
proc[‘PID’] = ‘1234’  
module.exit\_json(changed=False, rc=0, process=proc)

my playbook looks something like:

- name: check status of jboss instances  
hosts: [xx.yy.com](http://xx.yy.com)  
gather\_facts: no  
tasks:
- jboss:  
register: out
- debug: msg=“PID of JBOSS instance {{out.COMMAND|???}} is {{out.PID}}.”  
when: “True”

**In this case I would love to have a jinja filter that supports better parsing than replace(). E.g. a replace() that supports python regEx, or a substring() function.**

I’ve never used Jinja before so I hope this is not a stupid question. I read what documentation I could find. But feel free to point me to the right documentation if there one…

**Any ideas? custom Jinja filters?**

Thanks  
Kashyap
