# Latest

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

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

**Page:** 958

---

## [Use custom fact module](https://forum.ansible.com/t/use-custom-fact-module/15586)

<div class="topic-metadata">

**Author:** [@Mark\_Olliver](https://forum.ansible.com/u/Mark_Olliver)\
**Replies:** 1\
**Last updated:** [July 1, 2014, 6:39pm UTC](https://forum.ansible.com/t/use-custom-fact-module/15586 "2014-07-01T18:39:42Z")

</div>

HI, I have written a custom fact module to retrieve metadata from Google Compute Engine hosts. The script itself works fine and returns valid json however, I can not see how I call that within Ansible so that I can make…

---

## [frequent ssh drops due to "Connection timed out during banner exchange"](https://forum.ansible.com/t/frequent-ssh-drops-due-to-connection-timed-out-during-banner-exchange/15540)

<div class="topic-metadata">

**Author:** [@Nick\_Evgeniev](https://forum.ansible.com/u/Nick_Evgeniev)\
**Replies:** 6\
**Last updated:** [July 1, 2014, 3:29pm UTC](https://forum.ansible.com/t/frequent-ssh-drops-due-to-connection-timed-out-during-banner-exchange/15540 "2014-07-01T15:29:39Z")

</div>

Hi, For some reason if I’m connecting to the host using ansible connection is been dropped frequently with “Connection timed out during banner exchange” message… Any hints? pls check output below… again if I just ‘ssh …

---

## [Thoughts on Ansible as an AP](https://forum.ansible.com/t/thoughts-on-ansible-as-an-ap/15583)

<div class="topic-metadata">

**Author:** [@willthames](https://forum.ansible.com/u/willthames)\
**Replies:** 1\
**Last updated:** [July 1, 2014, 1:44pm UTC](https://forum.ansible.com/t/thoughts-on-ansible-as-an-ap/15583 "2014-07-01T13:44:49Z")

</div>

I’ve been doing a bit of work with using Ansible as an API recently, and there are a few minor gaps. For example I believe the on\_ok and on\_failed calls from \_run\_task could be passed the name of the task The completio…

---

## [how to collapse multiple restarts?](https://forum.ansible.com/t/how-to-collapse-multiple-restarts/15578)

<div class="topic-metadata">

**Author:** [@phillip.corchary](https://forum.ansible.com/u/phillip.corchary)\
**Replies:** 2\
**Last updated:** [June 30, 2014, 11:24pm UTC](https://forum.ansible.com/t/how-to-collapse-multiple-restarts/15578 "2014-06-30T23:24:36Z")

</div>

In the snippet below, Am I right that elastic serach would be restarted 3 times assuming each action is performed? Is there a way to collapse this into just one restart? Say some way to set a flag for each action if th…

---

## [checking if particular file exists locally before go](https://forum.ansible.com/t/checking-if-particular-file-exists-locally-before-go/15577)

<div class="topic-metadata">

**Author:** [@Nick\_Evgeniev](https://forum.ansible.com/u/Nick_Evgeniev)\
**Replies:** 3\
**Last updated:** [June 30, 2014, 11:10pm UTC](https://forum.ansible.com/t/checking-if-particular-file-exists-locally-before-go/15577 "2014-06-30T23:10:01Z")

</div>

hi, given ansible role directory layout: files vars tasks … and having files/foo/hostname/somefile I want not only be able to copy this file like: copy src=foo/{{ ansible\_hostname }}/somefile dest=… but also to …

---

## [How to skip a hash if it's empty](https://forum.ansible.com/t/how-to-skip-a-hash-if-its-empty/15576)

<div class="topic-metadata">

**Author:** [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Replies:** 1\
**Last updated:** [June 30, 2014, 9:05pm UTC](https://forum.ansible.com/t/how-to-skip-a-hash-if-its-empty/15576 "2014-06-30T21:05:12Z")

</div>

This could probably be done much better so any advice is welcome. I have a file called “deploy\_list” inside the “group\_vars” folder. It’s a list of modules that needs to be deployed. During any given deploy, the deployme…

---

## [How do I load a specific var file for a role in the most elegant way?](https://forum.ansible.com/t/how-do-i-load-a-specific-var-file-for-a-role-in-the-most-elegant-way/15575)

<div class="topic-metadata">

**Author:** [@Uri\_Miller](https://forum.ansible.com/u/Uri_Miller)\
**Replies:** 3\
**Last updated:** [June 30, 2014, 2:24pm UTC](https://forum.ansible.com/t/how-do-i-load-a-specific-var-file-for-a-role-in-the-most-elegant-way/15575 "2014-06-30T14:24:53Z")

</div>

I have tried include\_vars and vars\_files but maybe in the wrong context, because it doesn’t seem to work although i did not receive an error from Ansible: I have tried these two options, both did not seem to work: opti…

---

## [variable inheritance as dict within template](https://forum.ansible.com/t/variable-inheritance-as-dict-within-template/15574)

<div class="topic-metadata">

**Author:** [@Matt\_Peterson](https://forum.ansible.com/u/Matt_Peterson)\
**Replies:** 3\
**Last updated:** [June 30, 2014, 1:56pm UTC](https://forum.ansible.com/t/variable-inheritance-as-dict-within-template/15574 "2014-06-30T13:56:23Z")

</div>

Howdy, It appears that most variables and dict values are correctly inherited into jinja2 templates, however I appear to have found some corner case or known limitation. I’ve been skimming both the Ansible & Jinja2 docs…

---

## [Strange bug with Synchronize module?](https://forum.ansible.com/t/strange-bug-with-synchronize-module/15560)

<div class="topic-metadata">

**Author:** [@Cameron\_Junge](https://forum.ansible.com/u/Cameron_Junge)\
**Replies:** 4\
**Last updated:** [June 30, 2014, 1:17am UTC](https://forum.ansible.com/t/strange-bug-with-synchronize-module/15560 "2014-06-30T01:17:14Z")

</div>

Hi, I’m testing a playbook by running it against localhost, and am getting a really bizarre error from the syncronize module. I am connecting back to localhost via ssh with a deployer user, which has the correct permiss…

---

## [setting role variable used in 'when' not working as expected](https://forum.ansible.com/t/setting-role-variable-used-in-when-not-working-as-expected/15573)

<div class="topic-metadata">

**Author:** [@Mike\_Cavedon](https://forum.ansible.com/u/Mike_Cavedon)\
**Replies:** 3\
**Last updated:** [June 29, 2014, 3:38am UTC](https://forum.ansible.com/t/setting-role-variable-used-in-when-not-working-as-expected/15573 "2014-06-29T03:38:57Z")

</div>

I have the following defined in roles/apple/default/main.yml epel\_repo: true I have the following defined in roles/apple/tasks/main.yml command: rpm -Uvh {{ epel\_url }} when: epel\_repo The load\_driver already has e…

---

## [sample playbook demonstating openstack usage?](https://forum.ansible.com/t/sample-playbook-demonstating-openstack-usage/15548)

<div class="topic-metadata">

**Author:** [@Dimon](https://forum.ansible.com/u/Dimon)\
**Replies:** 4\
**Last updated:** [June 28, 2014, 6:03pm UTC](https://forum.ansible.com/t/sample-playbook-demonstating-openstack-usage/15548 "2014-06-28T18:03:17Z")

</div>

I’m looking for some sample playbooks using most of OpenStack modules. I’ve attempted building my own but found that certain things are unclear to me (like how do I get image id after it’s creation to be used with nova\_c…

---

## [How do I remove host-group "all"](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566)

<div class="topic-metadata">

**Author:** [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Replies:** 5\
**Last updated:** [June 28, 2014, 5:53pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566 "2014-06-28T17:53:40Z")

</div>

For assorted reasons I want to remove or rename the host-group “all”. I’ve googled this already and couldn’t find it. Can somebody tell me what file(s) to edit? (I grep’d the tree but can’t find a reasonable place to st…

---

## [facter on CentOS 6.5](https://forum.ansible.com/t/facter-on-centos-6-5/15570)

<div class="topic-metadata">

**Author:** [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Replies:** 3\
**Last updated:** [June 28, 2014, 5:52pm UTC](https://forum.ansible.com/t/facter-on-centos-6-5/15570 "2014-06-28T17:52:34Z")

</div>

As far as I can tell, I need to add the EPEL repositories in order to install facter on CentOS. Am I right? So far, the only way to install the EPEL repo I have found is to download the rpm for it, and then use rpm to …

---

## [A problem with using the virt module output as a registered variable for looping](https://forum.ansible.com/t/a-problem-with-using-the-virt-module-output-as-a-registered-variable-for-looping/15569)

<div class="topic-metadata">

**Author:** [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Replies:** 2\
**Last updated:** [June 28, 2014, 1:12am UTC](https://forum.ansible.com/t/a-problem-with-using-the-virt-module-output-as-a-registered-variable-for-looping/15569 "2014-06-28T01:12:13Z")

</div>

I have the following simple task include file:

---

## [Jinja2 extract single value for key/value pair without looping](https://forum.ansible.com/t/jinja2-extract-single-value-for-key-value-pair-without-looping/15561)

<div class="topic-metadata">

**Author:** [@jepper](https://forum.ansible.com/u/jepper)\
**Replies:** 5\
**Last updated:** [June 27, 2014, 8:13pm UTC](https://forum.ansible.com/t/jinja2-extract-single-value-for-key-value-pair-without-looping/15561 "2014-06-27T20:13:42Z")

</div>

I have the following defined in vars or defaults: fusemq\_authentication: { ‘username’:‘admin’, 'password’:‘blah’, ‘groups’:‘admin’ } { ‘username’:‘LOGSTASH’, 'password’:‘bing’, ‘groups’:‘LOGSTASH’ } I want to know th…

---

## [Dynamic list variable](https://forum.ansible.com/t/dynamic-list-variable/15568)

<div class="topic-metadata">

**Author:** [@mmccarthy](https://forum.ansible.com/u/mmccarthy)\
**Replies:** 0\
**Last updated:** [June 27, 2014, 5:29pm UTC](https://forum.ansible.com/t/dynamic-list-variable/15568 "2014-06-27T17:29:41Z")

</div>

Hi All, I am attempting to create an AWS VPC and AWS DB subnet group within an Ansible play. My problem is that I need to know the subnet ids in order to create a DB subnet group. I have registered the results of the ec…

---

## [How to replicate local user account to remote system?](https://forum.ansible.com/t/how-to-replicate-local-user-account-to-remote-system/15565)

<div class="topic-metadata">

**Author:** [@Marc\_Abramowitz](https://forum.ansible.com/u/Marc_Abramowitz)\
**Replies:** 2\
**Last updated:** [June 27, 2014, 5:24pm UTC](https://forum.ansible.com/t/how-to-replicate-local-user-account-to-remote-system/15565 "2014-06-27T17:24:57Z")

</div>

I feel like this probably comes up a lot and is a solved problem, but my Google-fu is failing me. I’m using Ansible with vagrant to create development virtual machines. The one thing that bugs me a little (and this was…

---

## [New policy for networking modules - moving them to Galaxy](https://forum.ansible.com/t/new-policy-for-networking-modules-moving-them-to-galaxy/15567)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Replies:** 0\
**Last updated:** [June 27, 2014, 3:38pm UTC](https://forum.ansible.com/t/new-policy-for-networking-modules-moving-them-to-galaxy/15567 "2014-06-27T15:38:51Z")

</div>

Hi all, This is about moving support for network devices out of core and encouraging packaging this content in Galaxy instead. This won’t include load balancers - In some cases, for things like load balancers that are …

---

## [behavior of changing apt\_repository is to add a new line and preserving the old data](https://forum.ansible.com/t/behavior-of-changing-apt-repository-is-to-add-a-new-line-and-preserving-the-old-data/15564)

<div class="topic-metadata">

**Author:** [@zhong\_ming\_wu](https://forum.ansible.com/u/zhong_ming_wu)\
**Replies:** 2\
**Last updated:** [June 27, 2014, 2:48pm UTC](https://forum.ansible.com/t/behavior-of-changing-apt-repository-is-to-add-a-new-line-and-preserving-the-old-data/15564 "2014-06-27T14:48:09Z")

</div>

I had the following name: add my repository apt\_repository: repo=“deb http://repo.local.example.com/apt/u14 abcd main” Then I changed it to name: add my repository apt\_repository: repo=“deb http://repo.local.examp…

---

## [include search path from a "roled" play](https://forum.ansible.com/t/include-search-path-from-a-roled-play/15543)

<div class="topic-metadata">

**Author:** [@user95](https://forum.ansible.com/u/user95)\
**Replies:** 7\
**Last updated:** [June 27, 2014, 1:05pm UTC](https://forum.ansible.com/t/include-search-path-from-a-roled-play/15543 "2014-06-27T13:05:32Z")

</div>

Hi, I hoped for the following to work from a playbook: hosts: backends roles: common perl-app tasks: include: a\_task\_that\_sits\_in\_xxx\_role.yml But I get: ERROR: file could not read: …/my-ansible/a\_task\_that\_sits\_i…

---

## [breaking up complex playbook into pieces](https://forum.ansible.com/t/breaking-up-complex-playbook-into-pieces/15544)

<div class="topic-metadata">

**Author:** [@Dimon](https://forum.ansible.com/u/Dimon)\
**Replies:** 3\
**Last updated:** [June 27, 2014, 12:45pm UTC](https://forum.ansible.com/t/breaking-up-complex-playbook-into-pieces/15544 "2014-06-27T12:45:23Z")

</div>

Hi, I’ve got my playbook large enough now that whenever I want to execute only bits of it I either have to code-in lots of conditionals and “special” variables or do some other trickery. I’ve got things split out into r…

---

## [msg: Destination /usr/local/bin not writable](https://forum.ansible.com/t/msg-destination-usr-local-bin-not-writable/15559)

<div class="topic-metadata">

**Author:** [@Nic\_Flores](https://forum.ansible.com/u/Nic_Flores)\
**Replies:** 1\
**Last updated:** [June 27, 2014, 12:44pm UTC](https://forum.ansible.com/t/msg-destination-usr-local-bin-not-writable/15559 "2014-06-27T12:44:38Z")

</div>

Hi All, I’m trying to execute the following playbook: -bash-4.1$ cat edit\_backup.yml

---

## [How to run python setup.py develop command inside virtualenv using ansible](https://forum.ansible.com/t/how-to-run-python-setup-py-develop-command-inside-virtualenv-using-ansible/15563)

<div class="topic-metadata">

**Author:** [@Roman\_Dryndik](https://forum.ansible.com/u/Roman_Dryndik)\
**Replies:** 1\
**Last updated:** [June 27, 2014, 12:31pm UTC](https://forum.ansible.com/t/how-to-run-python-setup-py-develop-command-inside-virtualenv-using-ansible/15563 "2014-06-27T12:31:33Z")

</div>

I want to execute python setup.py develop command inside of virtualenv using ansible. How to do it? Probably could be something like this: \` name: egg shell: “python setup.py develop” \` But I need to execute it i…

---

## [Best practice for recording Ansible provisioning runs](https://forum.ansible.com/t/best-practice-for-recording-ansible-provisioning-runs/15400)

<div class="topic-metadata">

**Author:** [@Craig\_Marvelley](https://forum.ansible.com/u/Craig_Marvelley)\
**Replies:** 5\
**Last updated:** [June 27, 2014, 8:02am UTC](https://forum.ansible.com/t/best-practice-for-recording-ansible-provisioning-runs/15400 "2014-06-27T08:02:05Z")

</div>

Hi all, I was wondering if anyone has a strategy for recording when a playbook has been run against hosts in an inventory, and crucially which version of the repository (Git-based, in my case) was checked out when the p…

---

## [for loop in template how do I avoid trailing comma on last iteration?](https://forum.ansible.com/t/for-loop-in-template-how-do-i-avoid-trailing-comma-on-last-iteration/15557)

<div class="topic-metadata">

**Author:** [@jepper](https://forum.ansible.com/u/jepper)\
**Replies:** 5\
**Last updated:** [June 26, 2014, 11:39pm UTC](https://forum.ansible.com/t/for-loop-in-template-how-do-i-avoid-trailing-comma-on-last-iteration/15557 "2014-06-26T23:39:45Z")

</div>

In a template, I loop over a group of fusemq hosts defined in my invetory file e.g. fuseMQ\_URL=failover:( {% for host in groups\[‘fusemq’\] %} tcp://{{ host }}, {% endfor %} ) The result is of course, a trailing comma - …

---

## [Some tasks in ansible are't executed](https://forum.ansible.com/t/some-tasks-in-ansible-aret-executed/15555)

<div class="topic-metadata">

**Author:** [@Roman\_Dryndik](https://forum.ansible.com/u/Roman_Dryndik)\
**Replies:** 1\
**Last updated:** [June 26, 2014, 1:23pm UTC](https://forum.ansible.com/t/some-tasks-in-ansible-aret-executed/15555 "2014-06-26T13:23:28Z")

</div>

I’m using ansible for some deployment issues. I want to do the following: Install virtualenv Activate installed virtual environment Check if I’m in virtual environment For this purposes I have the following playbook: …

---

## [failed play\_hosts](https://forum.ansible.com/t/failed-play-hosts/15541)

<div class="topic-metadata">

**Author:** [@sturban](https://forum.ansible.com/u/sturban)\
**Replies:** 1\
**Last updated:** [June 26, 2014, 1:22pm UTC](https://forum.ansible.com/t/failed-play-hosts/15541 "2014-06-26T13:22:19Z")

</div>

Hello, I am aware that ansible saves a file with hosts that failed to play in .ansible/, but if I set “ignore\_errors: True” it doesn’t seem to do this, and more importantly I would like to get a list of the failed hosts…

---

## [Many tasks in handlers.](https://forum.ansible.com/t/many-tasks-in-handlers/15556)

<div class="topic-metadata">

**Author:** [@Marcin\_Praczko](https://forum.ansible.com/u/Marcin_Praczko)\
**Replies:** 1\
**Last updated:** [June 26, 2014, 1:04pm UTC](https://forum.ansible.com/t/many-tasks-in-handlers/15556 "2014-06-26T13:04:53Z")

</div>

Hello, I have question whether is possible to have many tasks in one handler. For example, there is possible using SSL passprahse during restarting apache. This automatically not allow ansible progress, because by defa…

---

## [How to access ansible\_$interface where $interface is a registered value?](https://forum.ansible.com/t/how-to-access-ansible-interface-where-interface-is-a-registered-value/15554)

<div class="topic-metadata">

**Author:** [@t\_goto](https://forum.ansible.com/u/t_goto)\
**Replies:** 3\
**Last updated:** [June 26, 2014, 1:02pm UTC](https://forum.ansible.com/t/how-to-access-ansible-interface-where-interface-is-a-registered-value/15554 "2014-06-26T13:02:33Z")

</div>

Hello, ansible experts. I have a question regarding accessing ansible facts. I have a system with interface named randomly and dynamically. I successfully retrieved int name and registered it to variable. Now, I want…

---

## [ec2\_metric\_alarm is failling when passing dimensions argument](https://forum.ansible.com/t/ec2-metric-alarm-is-failling-when-passing-dimensions-argument/15546)

<div class="topic-metadata">

**Author:** [@douglaslopespereira](https://forum.ansible.com/u/douglaslopespereira)\
**Replies:** 4\
**Last updated:** [June 26, 2014, 10:53am UTC](https://forum.ansible.com/t/ec2-metric-alarm-is-failling-when-passing-dimensions-argument/15546 "2014-06-26T10:53:23Z")

</div>

I need to create an alarm associated with one of my AWS instances. For that I’m using the following task: name: Create CPU utilization metric alarm sudo: false local\_action: ec2\_metric\_alarm state=present region=us-e…

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

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