# Misc features for 0.8 -- A summary of recently merged pull requests

**URL:** <https://forum.ansible.com/t/misc-features-for-0-8-a-summary-of-recently-merged-pull-requests/11908>\
**Category:** Ansible Project\
**Created:** [September 19, 2012, 1:46am UTC](https://forum.ansible.com/t/misc-features-for-0-8-a-summary-of-recently-merged-pull-requests/11908 "2012-09-19T01:46:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 19, 2012, 1:46am UTC](https://forum.ansible.com/t/misc-features-for-0-8-a-summary-of-recently-merged-pull-requests/11908/1 "2012-09-19T01:46:58Z")

</div>

Various shiny things from lots of people, you know who you are!  
Thanks! Here is what I have written in the changelog (docs are all  
pending) and with a little bit of extra explanation for a few of them.  
&nbsp;&nbsp;Please help test! It's a bit of a laundry list, so apologies if  
it's not immediately evident if something has a particular utility.  
This is not all of what's new in 0.8 so far, see the CHANGELOG.md file  
on the github project for details, I've shared some on that already.

\* added force=yes|no (default no) option for file module, which allows  
transition between files to directories and so on

If you ever needed to delete a file and replace it with a directory,  
you can now do that. Ditto for directories and symlinks. This will  
be in the docs.

\* where 'stdout' is provided a new 'stdout\_lines' variable (type ==  
list) is now generated and usable with with\_items

You can do things like:

action: command blarg  
register: somevar

action: glorp $item  
with\_items: ${somevar.stdout\_lines}

This will be in the docs.

\* In templates, now $FILE($path) now allows access of contents of file  
in a path, very good for use with SSH keys

If you want to include the contents of a file directly in a single  
line in your template, this allows you to do that. It will be most  
usable immediately with the authorized key module,  
and we should update our docs to show usage of this. It is much  
cleaner to say key=$FILE(/wherever/keys/id\_rsa.pub) than including the  
whole key inline in the action line. I don't  
see this getting much use outside of SSH keys, but I could be wrong!

Note: $path can be replaced by a hard coded name or something with  
variables in it, it does not matter

\* In templates, similarly $PIPE($command) will run a local command and  
return the results of executing this command

This is a bit niche, but if you need to run a local command, even with  
variables in the arguments to that command, and include the results of  
that as if it were a variable, you can do that.  
Remember this command executes \*locally\*. I owe everyone some  
plumbing to make this play nice with "with\_items" when the command  
returns multiple lines, I need it to be an array.  
Right now, it's just a string value, so this is still coming.

\* additional facts for SunOS virtualization

Stuff about Solaris containers.

\* when local\_action is used the transport is automatically overridden  
to the local type

No reason to run SSH on your ansible-control machine if you want to  
use local action anymore.

\* copy module is now atomic when used across volumes

No danger of getting half of a file when your temp dir is on one  
partition and you are writing a large file on another.

\* ansible-pull example now sets up logrotate for the ansible-pull cron job log

Logrotate is just good sense here, as the ansible-pull log could grow over time.

\* url\_get module now returns 'dest' with the location of the file saved

This makes it easy to use url\_get with keywords like 'register'.  
Before it wouldn't tell you want file got saved.

\* fix for yum module when using local RPMs vs downloading

If you are using the yum module to install an RPM file already on your  
machine's disk (as opposed to network installs) it no longer is  
confused about whether the package is installed or not.

--Michael

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 19, 2012, 2:31pm UTC](https://forum.ansible.com/t/misc-features-for-0-8-a-summary-of-recently-merged-pull-requests/11908/2 "2012-09-19T14:31:12Z")

</div>

FYI -- I've reverted patches for FILE() and PIPE() as they were  
causing some problems with the template function -- we'll resurrect  
these later!

---

<div class="post-metadata">

**Author:** ![Brice\_Burgess](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Brice\_Burgess](https://forum.ansible.com/u/Brice_Burgess)\
**Post date:** [September 20, 2012, 8:16pm UTC](https://forum.ansible.com/t/misc-features-for-0-8-a-summary-of-recently-merged-pull-requests/11908/3 "2012-09-20T20:16:05Z")

</div>

Great job Michael! I gladly await this 0.8 release. The FILE() and PIPE() in templates will be a great power-user feature _eventually_, but I see the new stdout\_lines variable just useful.

~ Brice
