# Latest

**URL:** https://forum.ansible.com/latest.md?page=1065

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

**Page:** 1066

---

## [group\_vars/all kinda works](https://forum.ansible.com/t/group-vars-all-kinda-works/12153)

<div class="topic-metadata">

**Author:** [@James\_Nguyen](https://forum.ansible.com/u/James_Nguyen)\
**Replies:** 2\
**Last updated:** [December 20, 2012, 8:25pm UTC](https://forum.ansible.com/t/group-vars-all-kinda-works/12153 "2012-12-20T20:25:53Z")

</div>

So I’m trying to make use of group\_vars/all so I don’t have to do something like this in all my playbooks:

---

## [variable interpolation does not work when name is not used but does otherwise](https://forum.ansible.com/t/variable-interpolation-does-not-work-when-name-is-not-used-but-does-otherwise/12151)

<div class="topic-metadata">

**Author:** [@James\_Nguyen](https://forum.ansible.com/u/James_Nguyen)\
**Replies:** 2\
**Last updated:** [December 20, 2012, 7:51pm UTC](https://forum.ansible.com/t/variable-interpolation-does-not-work-when-name-is-not-used-but-does-otherwise/12151 "2012-12-20T19:51:15Z")

</div>

\#- name: user authorized\_keys authorized\_key: user=${item} key=‘$FILE(${playbook\_files\_private}/keys/${item}\_id\_rsa.pub)’ with\_items: $shell\_accounts tags: user the config above yields: ERROR: /etc/ansible/files\_pr…

---

## [access to original username via variable](https://forum.ansible.com/t/access-to-original-username-via-variable/12141)

<div class="topic-metadata">

**Author:** [@Christopher\_Snapp](https://forum.ansible.com/u/Christopher_Snapp)\
**Replies:** 4\
**Last updated:** [December 20, 2012, 1:29pm UTC](https://forum.ansible.com/t/access-to-original-username-via-variable/12141 "2012-12-20T13:29:40Z")

</div>

I’d like to know if it would be possible to surface the username of the original account that has logged into the system to perform the given tasks via a fact. This would be useful in writing the username to a log entry…

---

## [ujson?](https://forum.ansible.com/t/ujson/12152)

<div class="topic-metadata">

**Author:** [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Replies:** 1\
**Last updated:** [December 20, 2012, 12:57pm UTC](https://forum.ansible.com/t/ujson/12152 "2012-12-20T12:57:17Z")

</div>

I've not tested it yet - but this might be worth investigating to see if it will work w/o modification with ansible: http://kushaldas.in/posts/ujson-a-fast-json-implementation.html -sv

---

## [src, copy and included playbooks](https://forum.ansible.com/t/src-copy-and-included-playbooks/12148)

<div class="topic-metadata">

**Author:** [@Nolan\_Darilek](https://forum.ansible.com/u/Nolan_Darilek)\
**Replies:** 5\
**Last updated:** [December 19, 2012, 12:45pm UTC](https://forum.ansible.com/t/src-copy-and-included-playbooks/12148 "2012-12-19T12:45:19Z")

</div>

Sorry if I sound like a broken record. When I ran afoul of this initially, it was with playbook includes, and that's been fixed. My next run-in was with templating, which I understand is slated to be fixed in the templat…

---

## ['range is undefined'](https://forum.ansible.com/t/range-is-undefined/12142)

<div class="topic-metadata">

**Author:** [@Arun\_Thampi](https://forum.ansible.com/u/Arun_Thampi)\
**Replies:** 2\
**Last updated:** [December 19, 2012, 10:30am UTC](https://forum.ansible.com/t/range-is-undefined/12142 "2012-12-19T10:30:46Z")

</div>

Hi there - I’m trying to use the range keyword in a Jinja2 template in ansible 0.9, and I get this error message: ‘range is undefined’ I’m using ansible 0.9 on Python 2.7.3 with the Jinja2 package version /usr/local/lib…

---

## [Ascending compatibility in Ansible](https://forum.ansible.com/t/ascending-compatibility-in-ansible/12146)

<div class="topic-metadata">

**Author:** [@Acyl](https://forum.ansible.com/u/Acyl)\
**Replies:** 2\
**Last updated:** [December 19, 2012, 9:37am UTC](https://forum.ansible.com/t/ascending-compatibility-in-ansible/12146 "2012-12-19T09:37:43Z")

</div>

Hello, Within the framework of testing Ansible in a large-scaled use, I am asking today a question to myself that the documentation doesn’t seem to answer. Does the Ansible project guarantee an ascending compatibility …

---

## [ansible-ec2](https://forum.ansible.com/t/ansible-ec2/12074)

<div class="topic-metadata">

**Author:** [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Replies:** 13\
**Last updated:** [December 19, 2012, 9:11am UTC](https://forum.ansible.com/t/ansible-ec2/12074 "2012-12-19T09:11:41Z")

</div>

Many months ago, I talked about working on ansible-ec2. I am happy to say I have finally had time to do just that, and would like feedback on what I have done so far. You can find it here: https://github.com/pas256/ans…

---

## [Dictionary parameters to custom modules](https://forum.ansible.com/t/dictionary-parameters-to-custom-modules/12143)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 2\
**Last updated:** [December 19, 2012, 1:43am UTC](https://forum.ansible.com/t/dictionary-parameters-to-custom-modules/12143 "2012-12-19T01:43:57Z")

</div>

It is true that modules can generally only take key=value arguments. What is the nature of the module you are writing? I am generally not in favor of the idea of modules needing to read a config file and do not want…

---

## [host as variable in a playbook ?](https://forum.ansible.com/t/host-as-variable-in-a-playbook/12150)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 0\
**Last updated:** [December 19, 2012, 1:40am UTC](https://forum.ansible.com/t/host-as-variable-in-a-playbook/12150 "2012-12-19T01:40:54Z")

</div>

with\_items takes an array. You should define $mx as an array in that case. If you want to just execute local commands for every machine in the group, that is actually: hosts: whatever tasks: - name: blarg... l…

---

## [ansible and sudo](https://forum.ansible.com/t/ansible-and-sudo/12140)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 2\
**Last updated:** [December 19, 2012, 1:34am UTC](https://forum.ansible.com/t/ansible-and-sudo/12140 "2012-12-19T01:34:28Z")

</div>

You'll be able to use the raw module and not much else.

---

## [Retrying notify handlers on subsequent runs?](https://forum.ansible.com/t/retrying-notify-handlers-on-subsequent-runs/12144)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 2\
**Last updated:** [December 18, 2012, 10:45pm UTC](https://forum.ansible.com/t/retrying-notify-handlers-on-subsequent-runs/12144 "2012-12-18T22:45:07Z")

</div>

Yup, it's been brought up before -- a long time ago, actually, and then it wasn't talked about for a while. I don't think ansible runs should keep state, but there probably needs to be a way such that if a handler is …

---

## [Sharing playbooks, etc](https://forum.ansible.com/t/sharing-playbooks-etc/12064)

<div class="topic-metadata">

**Author:** [@Jeremiah\_Snapp](https://forum.ansible.com/u/Jeremiah_Snapp)\
**Replies:** 23\
**Last updated:** [December 17, 2012, 3:10pm UTC](https://forum.ansible.com/t/sharing-playbooks-etc/12064 "2012-12-17T15:10:16Z")

</div>

The link on ansible.cc resources page to “Share playbooks, modules, scripts, and more” and the link in the Additional Contrib Modules section of the docs are broken. What is the prescribed method for sharing playbooks, e…

---

## [Deploying zone-specific resolv.conf](https://forum.ansible.com/t/deploying-zone-specific-resolv-conf/12139)

<div class="topic-metadata">

**Author:** [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Replies:** 0\
**Last updated:** [December 15, 2012, 11:57pm UTC](https://forum.ansible.com/t/deploying-zone-specific-resolv-conf/12139 "2012-12-15T23:57:55Z")

</div>

The approach we use is a layered one: templates/etc/resolv.conf

---

## [New features in 'mail' module](https://forum.ansible.com/t/new-features-in-mail-module/12135)

<div class="topic-metadata">

**Author:** [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Replies:** 1\
**Last updated:** [December 15, 2012, 11:45pm UTC](https://forum.ansible.com/t/new-features-in-mail-module/12135 "2012-12-15T23:45:57Z")

</div>

I've added a few features to the 'mail' module \[1\] because I need them, and hope you'll need them too :slight\_smile: 1. Support for MIME attachments (content-type: octet/stream). This may sound pretty crazy, but it…

---

## [Setting locale in one play and have the change take effect in subsequent plays](https://forum.ansible.com/t/setting-locale-in-one-play-and-have-the-change-take-effect-in-subsequent-plays/12136)

<div class="topic-metadata">

**Author:** [@Lorin\_Hochstein1](https://forum.ansible.com/u/Lorin_Hochstein1)\
**Replies:** 5\
**Last updated:** [December 14, 2012, 6:36pm UTC](https://forum.ansible.com/t/setting-locale-in-one-play-and-have-the-change-take-effect-in-subsequent-plays/12136 "2012-12-14T18:36:30Z")

</div>

In my playbooks, I need to set the locale, and have the changes go into effect so that in a subsequent play, when postgresql is installed it will use the appropriate locale settings. However, if I set the locale in one …

---

## [Is there an issue with \`sudo -k' ?](https://forum.ansible.com/t/is-there-an-issue-with-sudo-k/12138)

<div class="topic-metadata">

**Author:** [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Replies:** 0\
**Last updated:** [December 14, 2012, 9:21am UTC](https://forum.ansible.com/t/is-there-an-issue-with-sudo-k/12138 "2012-12-14T09:21:21Z")

</div>

There was a report via Twitter yesterday \[1\] that said "Commands hang on ' /bin/sh -c sudo -k'. This is Ubuntu 10.04, Ansible 0.9 from the PPA" IIRC, this was dicussed somewhere not terribly long ago …

---

## [Info: Github uploads](https://forum.ansible.com/t/info-github-uploads/12137)

<div class="topic-metadata">

**Author:** [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Replies:** 1\
**Last updated:** [December 12, 2012, 4:55pm UTC](https://forum.ansible.com/t/info-github-uploads/12137 "2012-12-12T16:55:07Z")

</div>

In case you missed it, Github is deprecating the file downloads from its repositories \[1\]. This is relevant to Ansible. -JP \[1\] https://github.com/blog/1302-goodbye-uploads

---

## [Minor doc error: apt\_repository](https://forum.ansible.com/t/minor-doc-error-apt-repository/12131)

<div class="topic-metadata">

**Author:** [@Brian\_Candler](https://forum.ansible.com/u/Brian_Candler)\
**Replies:** 1\
**Last updated:** [December 12, 2012, 4:04am UTC](https://forum.ansible.com/t/minor-doc-error-apt-repository/12131 "2012-12-12T04:04:48Z")

</div>

Not worth raising as a ticket, but I thought I’d report the following documentation problem at http://ansible.cc/docs/modules.html#apt-repository The example shows: apt\_repository: repo=ppa://nginx/stable However I t…

---

## [Setting conditional for template](https://forum.ansible.com/t/setting-conditional-for-template/12134)

<div class="topic-metadata">

**Author:** [@Brian\_Candler](https://forum.ansible.com/u/Brian_Candler)\
**Replies:** 1\
**Last updated:** [December 12, 2012, 12:11am UTC](https://forum.ansible.com/t/setting-conditional-for-template/12134 "2012-12-12T00:11:04Z")

</div>

In a playbook I would like to set a conditional variable for use in a template, e.g. {% if is\_master %} … {% endif %} But if I follow the recipe at http://ansible.cc/docs/playbooks2.html#conditional-execution e.g. …

---

## [Help with a few concepts porting from Chef to Ansible](https://forum.ansible.com/t/help-with-a-few-concepts-porting-from-chef-to-ansible/12132)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 2\
**Last updated:** [December 11, 2012, 7:55pm UTC](https://forum.ansible.com/t/help-with-a-few-concepts-porting-from-chef-to-ansible/12132 "2012-12-11T19:55:25Z")

</div>

Hello everyone! I've been racking my brains for the past few weeks to imitate a behavior I've sub-optimally accomplished with Chef, using Ansible. Here is what I do today, directly from my Chef server: whenever I pr…

---

## [Ansible Strategy?](https://forum.ansible.com/t/ansible-strategy/12130)

<div class="topic-metadata">

**Author:** [@Dylan\_Martin](https://forum.ansible.com/u/Dylan_Martin)\
**Replies:** 2\
**Last updated:** [December 11, 2012, 2:00pm UTC](https://forum.ansible.com/t/ansible-strategy/12130 "2012-12-11T14:00:25Z")

</div>

I’m trying to figure out exactly how to put ansible into my overall job of maintaining servers. I’m getting pretty comfortable with ansible by itself, but I want to run this by the list so folks can point out where I’m b…

---

## [Deploying zone-specific resolv.conf](https://forum.ansible.com/t/deploying-zone-specific-resolv-conf/12133)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 0\
**Last updated:** [December 11, 2012, 12:40pm UTC](https://forum.ansible.com/t/deploying-zone-specific-resolv-conf/12133 "2012-12-11T12:40:05Z")

</div>

You could use "first\_available\_file" (see online docs and examples/playbooks/\* in the checkout) to choose the template path based on the 'ansible\_domain' fact (if you are using 0.9)

---

## [subset/limit option in play definition (for applying a play to an intersection of host groups)](https://forum.ansible.com/t/subset-limit-option-in-play-definition-for-applying-a-play-to-an-intersection-of-host-groups/12128)

<div class="topic-metadata">

**Author:** [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Replies:** 17\
**Last updated:** [December 10, 2012, 11:52pm UTC](https://forum.ansible.com/t/subset-limit-option-in-play-definition-for-applying-a-play-to-an-intersection-of-host-groups/12128 "2012-12-10T23:52:35Z")

</div>

First and foremost our inventory script creates \*a lot of\* groups based on CMDB information, including Then we have: - appl (application code, points to a team in the company) - environment (dev, test…

---

## [Jinja2 for loop in templates](https://forum.ansible.com/t/jinja2-for-loop-in-templates/12113)

<div class="topic-metadata">

**Author:** [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Replies:** 5\
**Last updated:** [December 10, 2012, 12:22pm UTC](https://forum.ansible.com/t/jinja2-for-loop-in-templates/12113 "2012-12-10T12:22:34Z")

</div>

Hi List, I’m currently trying to roll out a default /etc/apt/sources.list and add “deb” lines to it for specific hosts. The template sources.j2 looks like this: #######################################################…

---

## [add ssh-exec style support for password patterns?](https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129)

<div class="topic-metadata">

**Author:** [@Christopher\_Snapp](https://forum.ansible.com/u/Christopher_Snapp)\
**Replies:** 1\
**Last updated:** [December 9, 2012, 1:43pm UTC](https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129 "2012-12-09T13:43:56Z")

</div>

I’m curious whether anyone would find value in a built-in mechanism for supporting password patterns. Prompting for passwords for authentication or for consumption within modules would be extremely handy except for the …

---

## [ansible shortcut for listing hosts from inventory](https://forum.ansible.com/t/ansible-shortcut-for-listing-hosts-from-inventory/12127)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 2\
**Last updated:** [December 7, 2012, 9:25pm UTC](https://forum.ansible.com/t/ansible-shortcut-for-listing-hosts-from-inventory/12127 "2012-12-07T21:25:31Z")

</div>

Ansible-playbook already has a list-hosts, so if it works the same way, yes. --Michael

---

## [possible stupid question: selection of host groups and use of variables?](https://forum.ansible.com/t/possible-stupid-question-selection-of-host-groups-and-use-of-variables/12122)

<div class="topic-metadata">

**Author:** [@Jonathan1](https://forum.ansible.com/u/Jonathan1)\
**Replies:** 5\
**Last updated:** [December 7, 2012, 8:10pm UTC](https://forum.ansible.com/t/possible-stupid-question-selection-of-host-groups-and-use-of-variables/12122 "2012-12-07T20:10:10Z")

</div>

Apologies in advance - I feel like this has been solved before but I am not coming up with much after searching ansible.cc and the group records. I am trying to make a playbook that I can use between different environme…

---

## [How do you run unattended ansible?](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125)

<div class="topic-metadata">

**Author:** [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Replies:** 2\
**Last updated:** [December 7, 2012, 6:48pm UTC](https://forum.ansible.com/t/how-do-you-run-unattended-ansible/12125 "2012-12-07T18:48:52Z")

</div>

for certain tasks i have a ‘maint’ user that has a sshkey w/o passphrase, run ansible from the cron with the config options using that key for that user (he also has sudo NOPASSWORD to a restricted set of commands). I h…

---

## [Conditional inclusion in template](https://forum.ansible.com/t/conditional-inclusion-in-template/12119)

<div class="topic-metadata">

**Author:** [@Ben\_Hood](https://forum.ansible.com/u/Ben_Hood)\
**Replies:** 8\
**Last updated:** [December 7, 2012, 6:18pm UTC](https://forum.ansible.com/t/conditional-inclusion-in-template/12119 "2012-12-07T18:18:47Z")

</div>

Hi, I’m looking for the idiomatic way of including a fragment in a j2 template only for hosts in a group called production. In pseudo-code, I’m imagining something like this: {% if host is “production” %} … {% endif…

[Previous page](https://forum.ansible.com/latest.md?page=1064)

[Next page](https://forum.ansible.com/latest.md?page=1066)
