Why is a jinja2 template preffered?
Isn't the lineinfile module better as it could work with new and/or old
versions of the file being edited.


On Fri, Apr 11, 2014 at 4:25 AM, Lih Chen <notifications@github.com> wrote:

> In roles/jmxtrans/tasks/main.yml:
>
> > +    - /home/vagrant/jmxtrans/logs
> > +    - /home/vagrant/jmxtrans/json
> > +    - "{{ download_location }}"
> > +
> > + - name: download the jmxtrans rpm file
> > +   action: get_url url={{ jmxtrans_download_url }} dest="{{ download_location }}/jmxtrans.rpm"
> > +   #register: downloaded file location
> > +   #what to do when it fails on bad internet
> > +
> > + - name: install the jmxtrans rpm
> > +   yum: name="{{ download_location }}/jmxtrans.rpm" state=present
> > +   sudo: yes
> > +   #reference the downlaod file location
> > +
> > + - name: Edit kafka-server-start.sh add JMX_PORT
> > +   lineinfile: dest=~/kafka/bin/kafka-server-start.sh regexp=^export line="export JMX_PORT=${JMX_PORT:-9999}"
>
> Should use jinja2 template for that.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/DemandCube/DeveloperPlayBooks/pull/2/files#r11515925>
> .
>