# Latest

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

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

**Page:** 1030

---

## [inventory script and ssh host keys](https://forum.ansible.com/t/inventory-script-and-ssh-host-keys/13326)

<div class="topic-metadata">

**Author:** [@phil777x](https://forum.ansible.com/u/phil777x)\
**Replies:** 13\
**Last updated:** [August 19, 2013, 8:40pm UTC](https://forum.ansible.com/t/inventory-script-and-ssh-host-keys/13326 "2013-08-19T20:40:36Z")

</div>

Hello I created an EC2 inventory script. For each discovered instance, I can retrieve the ssh host key from the instance console. The way it is working now is: it dump all the keys in a specific known\_hosts file this…

---

## [Code review](https://forum.ansible.com/t/code-review/13328)

<div class="topic-metadata">

**Author:** [@Michael-Keith\_Bernar](https://forum.ansible.com/u/Michael-Keith_Bernar)\
**Replies:** 4\
**Last updated:** [August 19, 2013, 6:38pm UTC](https://forum.ansible.com/t/code-review/13328 "2013-08-19T18:38:40Z")

</div>

Hey all, I’ve spent the last couple days assembling a small Ansible project to manage a multi-user, multi-distribution cluster. I’d really appreciate some code review at this early stage of development! Please feel free…

---

## [Ansible hanging for long shell commands on OSX](https://forum.ansible.com/t/ansible-hanging-for-long-shell-commands-on-osx/13321)

<div class="topic-metadata">

**Author:** [@Tristan\_Zajonc](https://forum.ansible.com/u/Tristan_Zajonc)\
**Replies:** 12\
**Last updated:** [August 19, 2013, 6:29pm UTC](https://forum.ansible.com/t/ansible-hanging-for-long-shell-commands-on-osx/13321 "2013-08-19T18:29:32Z")

</div>

Hi, I’m experience Ansible hanging on long-running shell tasks with Ansible 1.3 (connecting with sudo and ssh). The tasks appear to be complete if I ssh in and ps aux but the playbook never gets to the next task. Strang…

---

## [new module: pkgutil](https://forum.ansible.com/t/new-module-pkgutil/13329)

<div class="topic-metadata">

**Author:** [@work](https://forum.ansible.com/u/work)\
**Replies:** 1\
**Last updated:** [August 19, 2013, 12:24pm UTC](https://forum.ansible.com/t/new-module-pkgutil/13329 "2013-08-19T12:24:30Z")

</div>

Hello everyone. Some days ago, I wrote a new module for Ansible. It is called pkgutil and is used for pkgutil under Solaris. It’s used package management with custom repositories, e.g. OpenCSW. AFAIK there is no other …

---

## [Conditionally executing tasks if host is in a given role?](https://forum.ansible.com/t/conditionally-executing-tasks-if-host-is-in-a-given-role/13327)

<div class="topic-metadata">

**Author:** [@Nolan\_Darilek](https://forum.ansible.com/u/Nolan_Darilek)\
**Replies:** 1\
**Last updated:** [August 18, 2013, 7:32pm UTC](https://forum.ansible.com/t/conditionally-executing-tasks-if-host-is-in-a-given-role/13327 "2013-08-18T19:32:43Z")

</div>

Say I have a backup role that sets up my preferred backup solution. Also say I have a separate Docker role that installs Docker on a given host. If a Docker host is in the backup role, I want to add /var/lib/docker to th…

---

## [Handling roles across multiple distributions](https://forum.ansible.com/t/handling-roles-across-multiple-distributions/13323)

<div class="topic-metadata">

**Author:** [@Michael-Keith\_Bernar](https://forum.ansible.com/u/Michael-Keith_Bernar)\
**Replies:** 4\
**Last updated:** [August 18, 2013, 2:35pm UTC](https://forum.ansible.com/t/handling-roles-across-multiple-distributions/13323 "2013-08-18T14:35:35Z")

</div>

Hey all, I’d like to start by saying that Ansible is an awesome piece of software and I’m really enjoying it, especially after having spent the last several years in chef/puppet land. :slight\_smile: Now then, I’m tryin…

---

## [iterating a hash in a task](https://forum.ansible.com/t/iterating-a-hash-in-a-task/13302)

<div class="topic-metadata">

**Author:** [@Ali-Akber\_Saifee](https://forum.ansible.com/u/Ali-Akber_Saifee)\
**Replies:** 5\
**Last updated:** [August 18, 2013, 1:03pm UTC](https://forum.ansible.com/t/iterating-a-hash-in-a-task/13302 "2013-08-18T13:03:59Z")

</div>

The question was asked a few times on freenode (by myself included). Just sharing my solution in case it’s useful for someone else: https://coderwall.com/p/rxsmvw best, ./A

---

## [search ec2 instance using instance\_tags](https://forum.ansible.com/t/search-ec2-instance-using-instance-tags/13325)

<div class="topic-metadata">

**Author:** [@Inny\_So](https://forum.ansible.com/u/Inny_So)\
**Replies:** 0\
**Last updated:** [August 17, 2013, 3:30pm UTC](https://forum.ansible.com/t/search-ec2-instance-using-instance-tags/13325 "2013-08-17T15:30:12Z")

</div>

Hi All, I am new to ansible and reading up on how to use it to create and provision ec2 instances. I am just wondering are there any example playbook for searching for a specific ec2 instance using security group and in…

---

## [AnsibleFest San Francisco - October 22nd at Rackspace](https://forum.ansible.com/t/ansiblefest-san-francisco-october-22nd-at-rackspace/13324)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [August 17, 2013, 1:52pm UTC](https://forum.ansible.com/t/ansiblefest-san-francisco-october-22nd-at-rackspace/13324 "2013-08-17T13:52:11Z")

</div>

Hi everyone, For those new to the list, I wanted to pass along that we are running a West Coast version of the event we did in Boston this year. It’s just a few months away, so if you’re from elsewhere, it’s a great tim…

---

## [command always says something changed, even when nothing actually changed?](https://forum.ansible.com/t/command-always-says-something-changed-even-when-nothing-actually-changed/13317)

<div class="topic-metadata">

**Author:** [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Replies:** 9\
**Last updated:** [August 16, 2013, 6:28pm UTC](https://forum.ansible.com/t/command-always-says-something-changed-even-when-nothing-actually-changed/13317 "2013-08-16T18:28:24Z")

</div>

I’m using command to run a2ensite, a2dissite, a2enmod, etc. Every time I run the playbook, those tasks come back as having changed something. Even when no site or module has been added or removed since the last time the …

---

## [Developers: Optimizing external inventory scripts](https://forum.ansible.com/t/developers-optimizing-external-inventory-scripts/13252)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 6\
**Last updated:** [August 16, 2013, 6:06pm UTC](https://forum.ansible.com/t/developers-optimizing-external-inventory-scripts/13252 "2013-08-16T18:06:32Z")

</div>

A few folks have pointed out that the inventory script mechanism calls “–host” for every host, that can’t be parallelized, and that’s a bit slow for large numbers of hosts, especially when the inventory script doesn’t do…

---

## [Multiline template replacing](https://forum.ansible.com/t/multiline-template-replacing/13312)

<div class="topic-metadata">

**Author:** [@howachen](https://forum.ansible.com/u/howachen)\
**Replies:** 6\
**Last updated:** [August 16, 2013, 4:22pm UTC](https://forum.ansible.com/t/multiline-template-replacing/13312 "2013-08-16T16:22:44Z")

</div>

Not sure why I can’t reply to this thread: https://groups.google.com/forum/#!topic/ansible-project/EDXIk3WM7vk But here is the question: As suggested by Micheal, I can use the following if I want to use mutliline

---

## [Thirsty argument to lineinfile?](https://forum.ansible.com/t/thirsty-argument-to-lineinfile/13320)

<div class="topic-metadata">

**Author:** [@Nolan\_Darilek](https://forum.ansible.com/u/Nolan_Darilek)\
**Replies:** 1\
**Last updated:** [August 16, 2013, 4:06pm UTC](https://forum.ansible.com/t/thirsty-argument-to-lineinfile/13320 "2013-08-16T16:06:27Z")

</div>

I have a scenario where the same config option appears several times in the same config file, only in different contexts. I'd like to run lineinfile to change the option, but it only performs one replace. Would it be po…

---

## [Unit tests as part of configuration management](https://forum.ansible.com/t/unit-tests-as-part-of-configuration-management/12333)

<div class="topic-metadata">

**Author:** [@VK1](https://forum.ansible.com/u/VK1)\
**Replies:** 6\
**Last updated:** [August 16, 2013, 2:13pm UTC](https://forum.ansible.com/t/unit-tests-as-part-of-configuration-management/12333 "2013-08-16T14:13:13Z")

</div>

Hi, I'm experimenting with ansible and wanted to know if there is an easy way to write test cases for each configurable task. One of the philosophies of an older config mgmt system I wrote many years ago was to encoura…

---

## [rax module - no host-pattern?](https://forum.ansible.com/t/rax-module-no-host-pattern/13313)

<div class="topic-metadata">

**Author:** [@Seumas\_Mackinnon](https://forum.ansible.com/u/Seumas_Mackinnon)\
**Replies:** 6\
**Last updated:** [August 16, 2013, 12:57pm UTC](https://forum.ansible.com/t/rax-module-no-host-pattern/13313 "2013-08-16T12:57:54Z")

</div>

Hi all, I’m trying to use the rax module from the command line to create a new cloudserver. But I can’t figure out what to use as the “host-pattern”. I’m creating a new server, so there is no “host” as such! The docs do…

---

## [Recommendation for external inventory script w/large number of hosts?](https://forum.ansible.com/t/recommendation-for-external-inventory-script-w-large-number-of-hosts/12947)

<div class="topic-metadata">

**Author:** [@Eugene\_Archibald](https://forum.ansible.com/u/Eugene_Archibald)\
**Replies:** 7\
**Last updated:** [August 16, 2013, 2:44am UTC](https://forum.ansible.com/t/recommendation-for-external-inventory-script-w-large-number-of-hosts/12947 "2013-08-16T02:44:41Z")

</div>

I use an external inventory script that I’ve built to gather the hosts list and also use it to provide hostvars - various items collected from my centralized provisioning DB collected up into a per-host dict. However, f…

---

## [Built in notify on failure?](https://forum.ansible.com/t/built-in-notify-on-failure/13318)

<div class="topic-metadata">

**Author:** [@Jesse\_Keating](https://forum.ansible.com/u/Jesse_Keating)\
**Replies:** 1\
**Last updated:** [August 15, 2013, 11:04pm UTC](https://forum.ansible.com/t/built-in-notify-on-failure/13318 "2013-08-15T23:04:04Z")

</div>

Has there been any thought to a built in notify hook on host failure (unreachable or failure) that playbook authors could hook into if they wished to do some sort of clean up or alerting on failed and/or unreachable host…

---

## [Specific Python version support for 'pip' and 'easy\_install' modules](https://forum.ansible.com/t/specific-python-version-support-for-pip-and-easy-install-modules/13314)

<div class="topic-metadata">

**Author:** [@Pedro\_Romano](https://forum.ansible.com/u/Pedro_Romano)\
**Replies:** 5\
**Last updated:** [August 15, 2013, 3:57pm UTC](https://forum.ansible.com/t/specific-python-version-support-for-pip-and-easy-install-modules/13314 "2013-08-15T15:57:57Z")

</div>

I would like to add support for specifying the Python version when running the pip and easy\_install modules since I have systems with both Python 2.7 and 3.3 installed. This should be a fairly trivial patch. I am strugg…

---

## [Host of a specific group in with\_nested](https://forum.ansible.com/t/host-of-a-specific-group-in-with-nested/13289)

<div class="topic-metadata">

**Author:** [@Jurgen\_Haas2](https://forum.ansible.com/u/Jurgen_Haas2)\
**Replies:** 5\
**Last updated:** [August 15, 2013, 3:02pm UTC](https://forum.ansible.com/t/host-of-a-specific-group-in-with-nested/13289 "2013-08-15T15:02:13Z")

</div>

When providing two simple lists in with\_nested, it works just as expected: name: Test with nested loops debug: msg=“A = {{ item\[0\] }} / B = {{ item\[1\] }}” with\_nested: \[‘test’, ‘y’\] list\_of\_items I’d like to provide…

---

## [1.2.2 variable reference syntax](https://forum.ansible.com/t/1-2-2-variable-reference-syntax/13310)

<div class="topic-metadata">

**Author:** [@Scott\_Armit](https://forum.ansible.com/u/Scott_Armit)\
**Replies:** 3\
**Last updated:** [August 15, 2013, 2:43pm UTC](https://forum.ansible.com/t/1-2-2-variable-reference-syntax/13310 "2013-08-15T14:43:16Z")

</div>

Hello. I’m running Ansible 1.2.2 (seeing the below behavior on OSX and CentOS 6.4). My understanding is that in 1.2+, I can use {{ var }} syntax everywhere. In a role task I have this: copy: src=“jdk-{{ oraclejdk\_vers…

---

## [Postgres cluster+database bootstraping](https://forum.ansible.com/t/postgres-cluster-database-bootstraping/13315)

<div class="topic-metadata">

**Author:** [@Arnon\_Marcus](https://forum.ansible.com/u/Arnon_Marcus)\
**Replies:** 0\
**Last updated:** [August 15, 2013, 2:06pm UTC](https://forum.ansible.com/t/postgres-cluster-database-bootstraping/13315 "2013-08-15T14:06:05Z")

</div>

Hi, Disclaimer: This is going to be a very long one - I apologies in advance, but I really need help and my use-case is fairly complex. I have been fighting this for a few days now, causing me many headaches. I’ve do…

---

## [inventory name as variable](https://forum.ansible.com/t/inventory-name-as-variable/13299)

<div class="topic-metadata">

**Author:** [@Marc\_Patermann](https://forum.ansible.com/u/Marc_Patermann)\
**Replies:** 7\
**Last updated:** [August 15, 2013, 1:17pm UTC](https://forum.ansible.com/t/inventory-name-as-variable/13299 "2013-08-15T13:17:05Z")

</div>

Hi, I created two inventories: "test" and "production". test includes groups like "webserver-test", as production are "webserver-prod". A configuration file differs from test to production. I created files like files…

---

## [ansible and ansible-playbook with ssh config not working...](https://forum.ansible.com/t/ansible-and-ansible-playbook-with-ssh-config-not-working/12459)

<div class="topic-metadata">

**Author:** [@Curtis](https://forum.ansible.com/u/Curtis)\
**Replies:** 12\
**Last updated:** [August 15, 2013, 12:36pm UTC](https://forum.ansible.com/t/ansible-and-ansible-playbook-with-ssh-config-not-working/12459 "2013-08-15T12:36:22Z")

</div>

Hi, I would think this would just work? Usually I think wrong, so I guess I’m really wondering what I’ve got wrong here. :slight\_smile: “virt-v2v” is the name of a host that is setup in .ssh/config… ansible -c ssh -u …

---

## [FAILED: argument must be an int, or have a fileno() method](https://forum.ansible.com/t/failed-argument-must-be-an-int-or-have-a-fileno-method/13311)

<div class="topic-metadata">

**Author:** [@Kavin\_Kankeshwar](https://forum.ansible.com/u/Kavin_Kankeshwar)\
**Replies:** 2\
**Last updated:** [August 15, 2013, 12:29pm UTC](https://forum.ansible.com/t/failed-argument-must-be-an-int-or-have-a-fileno-method/13311 "2013-08-15T12:29:50Z")

</div>

Any idea why i would get this ? fatal: \[localhost\] =\> {‘msg’: ‘FAILED: argument must be an int, or have a fileno() method.’, ‘failed’: True}

---

## [Cannot use lineinfile as it complains about python-selinux missing](https://forum.ansible.com/t/cannot-use-lineinfile-as-it-complains-about-python-selinux-missing/13309)

<div class="topic-metadata">

**Author:** [@Kavin\_Kankeshwar](https://forum.ansible.com/u/Kavin_Kankeshwar)\
**Replies:** 3\
**Last updated:** [August 15, 2013, 12:29pm UTC](https://forum.ansible.com/t/cannot-use-lineinfile-as-it-complains-about-python-selinux-missing/13309 "2013-08-15T12:29:20Z")

</div>

Hi, I am trying to change a file on remote machine, I get the following error. Selinux is set to be permissive. msg: Aborting, target uses selinux but python bindings (python-selinux) aren’t installed!

---

## [Managing Bind DNS zone files](https://forum.ansible.com/t/managing-bind-dns-zone-files/13308)

<div class="topic-metadata">

**Author:** [@Dylan\_Martin](https://forum.ansible.com/u/Dylan_Martin)\
**Replies:** 3\
**Last updated:** [August 14, 2013, 9:37pm UTC](https://forum.ansible.com/t/managing-bind-dns-zone-files/13308 "2013-08-14T21:37:15Z")

</div>

I’ve just finished creating a system to manage my dns zone files with ansible and I was hoping I could get some feedback on how I handled it. My solution feels unelegant, so I’m curious how other folks would (or do) hand…

---

## [Most unusual usages of Ansible?](https://forum.ansible.com/t/most-unusual-usages-of-ansible/13307)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [August 14, 2013, 6:38pm UTC](https://forum.ansible.com/t/most-unusual-usages-of-ansible/13307 "2013-08-14T18:38:25Z")

</div>

One of the neat things about Ansible is because of the SSH-nature of things, it gets used in a lot of interesting kind of embedded applications. This is something I’d like to write a post on sometime, just to share some…

---

## [Can 'template' result be registered?](https://forum.ansible.com/t/can-template-result-be-registered/13305)

<div class="topic-metadata">

**Author:** [@Pedro\_Romano](https://forum.ansible.com/u/Pedro_Romano)\
**Replies:** 3\
**Last updated:** [August 14, 2013, 5:49pm UTC](https://forum.ansible.com/t/can-template-result-be-registered/13305 "2013-08-14T17:49:26Z")

</div>

Should something like the following work? name: update file from templated template: src=config.j2 dest=/etc/config register: result name: run command if /etc/config changed command: /usr/bin/command -option arg …

---

## [Use Ansible to make AWS AMIs](https://forum.ansible.com/t/use-ansible-to-make-aws-amis/13306)

<div class="topic-metadata">

**Author:** [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Replies:** 0\
**Last updated:** [August 14, 2013, 4:28pm UTC](https://forum.ansible.com/t/use-ansible-to-make-aws-amis/13306 "2013-08-14T16:28:25Z")

</div>

Hi, I wanted to let the group know I have added an Ansible provisioner to Aminator, which enables you to use playbooks to make AMIs for AWS. In the past, I have had custom scripts to do this, but this is much cleaner. …

---

## [defining package lists across roles](https://forum.ansible.com/t/defining-package-lists-across-roles/13294)

<div class="topic-metadata">

**Author:** [@Abhijit\_Menon-Sen2](https://forum.ansible.com/u/Abhijit_Menon-Sen2)\
**Replies:** 2\
**Last updated:** [August 14, 2013, 1:09pm UTC](https://forum.ansible.com/t/defining-package-lists-across-roles/13294 "2013-08-14T13:09:08Z")

</div>

Hi. Another semi-related question arose while I was installing packages. I have roles named "smtp-server", "imap-server", and so on; and in each role I have a task that does essentially the same thing: - apt: pkg…

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

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