# Latest

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

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

**Page:** 998

---

## [Execute a python script on a remote server](https://forum.ansible.com/t/execute-a-python-script-on-a-remote-server/14360)

<div class="topic-metadata">

**Author:** [@Chinmaya\_Patanaik](https://forum.ansible.com/u/Chinmaya_Patanaik)\
**Replies:** 2\
**Last updated:** [January 16, 2014, 6:04pm UTC](https://forum.ansible.com/t/execute-a-python-script-on-a-remote-server/14360 "2014-01-16T18:04:00Z")

</div>

I am planning to execute a python script on a remote server using ansible playbook. src.py -

---

## [Ask for sudo password on-demand/Why does ansible run sudo -k?](https://forum.ansible.com/t/ask-for-sudo-password-on-demand-why-does-ansible-run-sudo-k/14347)

<div class="topic-metadata">

**Author:** [@Till\_Maas](https://forum.ansible.com/u/Till_Maas)\
**Replies:** 10\
**Last updated:** [January 16, 2014, 3:24pm UTC](https://forum.ansible.com/t/ask-for-sudo-password-on-demand-why-does-ansible-run-sudo-k/14347 "2014-01-16T15:24:38Z")

</div>

Hi, I want to use ansible with systems where sudo requires a password, but I would also avoid to enter it always. Since ansible runs "sudo -k" before the actual sudo command, it always requires a password. The option …

---

## [stacking delegated handlers](https://forum.ansible.com/t/stacking-delegated-handlers/14359)

<div class="topic-metadata">

**Author:** [@Timur\_Batyrshin](https://forum.ansible.com/u/Timur_Batyrshin)\
**Replies:** 0\
**Last updated:** [January 16, 2014, 11:24am UTC](https://forum.ansible.com/t/stacking-delegated-handlers/14359 "2014-01-16T11:24:37Z")

</div>

Hi, (This is a followup to https://github.com/ansible/ansible/issues/5634) Is there a way to “stack” delegated handlers? When the handler is delegated to some host and several hosts kick that handler it is triggered s…

---

## [Usage of python's subprocess.Popen.communicate()](https://forum.ansible.com/t/usage-of-pythons-subprocess-popen-communicate/14346)

<div class="topic-metadata">

**Author:** [@Caleb\_Spare](https://forum.ansible.com/u/Caleb_Spare)\
**Replies:** 14\
**Last updated:** [January 16, 2014, 8:29am UTC](https://forum.ansible.com/t/usage-of-pythons-subprocess-popen-communicate/14346 "2014-01-16T08:29:47Z")

</div>

Hi, I wasn’t sure whether to report this as a bug or not. The issue was this: I have an rsync task that I use for efficiently copying directory hierarchies to remote machines. The symptom is that it would sometimes hang…

---

## [Dynamic hosts configuration](https://forum.ansible.com/t/dynamic-hosts-configuration/14357)

<div class="topic-metadata">

**Author:** [@ryanchan404](https://forum.ansible.com/u/ryanchan404)\
**Replies:** 2\
**Last updated:** [January 16, 2014, 3:10am UTC](https://forum.ansible.com/t/dynamic-hosts-configuration/14357 "2014-01-16T03:10:59Z")

</div>

Hello One of the issue we experienced is when one host in the inventory goes down, Ansible talke time to discover and slow down the deployment process. I am thinking if it is possible to provide the hosts dynamically, …

---

## [How to map variables in the play to variables in the template file?](https://forum.ansible.com/t/how-to-map-variables-in-the-play-to-variables-in-the-template-file/14345)

<div class="topic-metadata">

**Author:** [@Teerapap\_Changwichuk](https://forum.ansible.com/u/Teerapap_Changwichuk)\
**Replies:** 2\
**Last updated:** [January 16, 2014, 2:00am UTC](https://forum.ansible.com/t/how-to-map-variables-in-the-play-to-variables-in-the-template-file/14345 "2014-01-16T02:00:09Z")

</div>

I have a template file like this. { id: “{{ item.id }}”, url: “{{ item.url }}”, } Let say I have two variables looks like this. var1: a: “id1”, a: “id2”, var2: b: url: “url1” b: url: “url2” Actually they …

---

## [Distro questions...](https://forum.ansible.com/t/distro-questions/14352)

<div class="topic-metadata">

**Author:** [@Stan\_Lemon](https://forum.ansible.com/u/Stan_Lemon)\
**Replies:** 5\
**Last updated:** [January 15, 2014, 11:05pm UTC](https://forum.ansible.com/t/distro-questions/14352 "2014-01-15T23:05:28Z")

</div>

This is sort of picking up on an exchange I started with Michael on twitter. I read http://blog.ansibleworks.com/author/michaeldehaan/ and was curious about the paramiko piece, specifically if this could be circumvented…

---

## [Ansible Tasks reusability](https://forum.ansible.com/t/ansible-tasks-reusability/14286)

<div class="topic-metadata">

**Author:** [@hafizh](https://forum.ansible.com/u/hafizh)\
**Replies:** 17\
**Last updated:** [January 15, 2014, 9:55pm UTC](https://forum.ansible.com/t/ansible-tasks-reusability/14286 "2014-01-15T21:55:35Z")

</div>

Hi, I’ve been playing with Ansible for some time and I’m hitting the wall when it comes to re-usability. I find that Ansible requires me to duplicate many of my tasks just to cater that specific needs. Maybe it’s the …

---

## [Column does not work in lineinfile module](https://forum.ansible.com/t/column-does-not-work-in-lineinfile-module/14332)

<div class="topic-metadata">

**Author:** [@Stas\_Oskin](https://forum.ansible.com/u/Stas_Oskin)\
**Replies:** 2\
**Last updated:** [January 15, 2014, 9:48pm UTC](https://forum.ansible.com/t/column-does-not-work-in-lineinfile-module/14332 "2014-01-15T21:48:30Z")

</div>

Hi, I’m trying to use an instruction with lineinfile: lineinfile: dest=“{{deploy\_root}}/{{instance}}/{{project}}/{{project}}/local\_settings.py” regexp=‘^NAME’ line=“‘NAME’: ‘{{db\_name}}’,” No matter what I try, the c…

---

## [Known regression in sysctl module?](https://forum.ansible.com/t/known-regression-in-sysctl-module/14354)

<div class="topic-metadata">

**Author:** [@Peter\_Gehres](https://forum.ansible.com/u/Peter_Gehres)\
**Replies:** 5\
**Last updated:** [January 15, 2014, 9:22pm UTC](https://forum.ansible.com/t/known-regression-in-sysctl-module/14354 "2014-01-15T21:22:27Z")

</div>

Was the commit “Fixes #5469 Refactor sysctl module into object oriented code,” ca055844954ac74116b606feee9a1ef498865da0 intended to not be backward compatible? A git bisect show that the commit broke the following task: …

---

## [gathering metrics on ansible runs](https://forum.ansible.com/t/gathering-metrics-on-ansible-runs/14355)

<div class="topic-metadata">

**Author:** [@Paul\_Sutyrin](https://forum.ansible.com/u/Paul_Sutyrin)\
**Replies:** 2\
**Last updated:** [January 15, 2014, 8:52pm UTC](https://forum.ansible.com/t/gathering-metrics-on-ansible-runs/14355 "2014-01-15T20:52:43Z")

</div>

Hi folks, Thanks again for this great new generation tool. What is the most straightforward way to gather statistics on repeated ansible runs? I plan to configure and deploy many things, unattended tasks also — and hav…

---

## [Creating a network with libvirt](https://forum.ansible.com/t/creating-a-network-with-libvirt/14351)

<div class="topic-metadata">

**Author:** [@Andrew\_Martin](https://forum.ansible.com/u/Andrew_Martin)\
**Replies:** 2\
**Last updated:** [January 15, 2014, 8:04pm UTC](https://forum.ansible.com/t/creating-a-network-with-libvirt/14351 "2014-01-15T20:04:01Z")

</div>

Hello, As part of a playbook I’m writing for creating a KVM virtualization server, I’d also like to create a new virtual network for VMs to use. The commands I would normally run to do this are: virsh net-define /path/…

---

## [Managing overlapping roles the "Ansible Way"](https://forum.ansible.com/t/managing-overlapping-roles-the-ansible-way/14353)

<div class="topic-metadata">

**Author:** [@Mike\_Titus](https://forum.ansible.com/u/Mike_Titus)\
**Replies:** 1\
**Last updated:** [January 15, 2014, 7:39pm UTC](https://forum.ansible.com/t/managing-overlapping-roles-the-ansible-way/14353 "2014-01-15T19:39:19Z")

</div>

I’m having trouble figuring out the “Ansible way” of handling groups of servers with overlapping roles. By overlapping I mean that a playbook for a type of application server (e.g. haproxy) will deploy to servers in two …

---

## [invalid selinux context](https://forum.ansible.com/t/invalid-selinux-context/14349)

<div class="topic-metadata">

**Author:** [@Pablo\_Hinojosa\_Nava](https://forum.ansible.com/u/Pablo_Hinojosa_Nava)\
**Replies:** 5\
**Last updated:** [January 15, 2014, 5:33pm UTC](https://forum.ansible.com/t/invalid-selinux-context/14349 "2014-01-15T17:33:41Z")

</div>

Hi, I am having problems when I use the template module over a ZFS filesystem (in NAS4Free) with NFS mounted with a selinux context for Apache. Here is all the information: https://gist.github.com/Pablohn26/8434558 O…

---

## [Forums vs mailing list? Here's a short 2-question voting survey.](https://forum.ansible.com/t/forums-vs-mailing-list-heres-a-short-2-question-voting-survey/14308)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 8\
**Last updated:** [January 15, 2014, 4:26pm UTC](https://forum.ansible.com/t/forums-vs-mailing-list-heres-a-short-2-question-voting-survey/14308 "2014-01-15T16:26:43Z")

</div>

Hi all, I’m really thankful for the huge amount of users here, but I’m also noticing that a disproportionately smaller amount of users joins the mailing list, and because it’s a mailing list, repeated questions sometime…

---

## [bootstrapping nodes - when the setup module fails](https://forum.ansible.com/t/bootstrapping-nodes-when-the-setup-module-fails/14340)

<div class="topic-metadata">

**Author:** [@Dave\_Cottlehuber](https://forum.ansible.com/u/Dave_Cottlehuber)\
**Replies:** 7\
**Last updated:** [January 15, 2014, 2:30pm UTC](https://forum.ansible.com/t/bootstrapping-nodes-when-the-setup-module-fails/14340 "2014-01-15T14:30:30Z")

</div>

Hi, Is it possible to handle the initial ssh connection failure rather than bail out completely? Let me clarify why, maybe there’s a better way to do this. I’ve got a wide variety of OS & cloud providers to test stuff …

---

## [Role lookup](https://forum.ansible.com/t/role-lookup/14344)

<div class="topic-metadata">

**Author:** [@Peter\_Gehres](https://forum.ansible.com/u/Peter_Gehres)\
**Replies:** 10\
**Last updated:** [January 15, 2014, 9:23am UTC](https://forum.ansible.com/t/role-lookup/14344 "2014-01-15T09:23:02Z")

</div>

tl;dr - Is there a reason that roles are looked for relative to the current location? We have a site.yml playbook that includes a bunch of other playbooks (one for each role), but this clutters our root directory. I was…

---

## [Multiple SSH Keys](https://forum.ansible.com/t/multiple-ssh-keys/14342)

<div class="topic-metadata">

**Author:** [@BrianAI](https://forum.ansible.com/u/BrianAI)\
**Replies:** 3\
**Last updated:** [January 14, 2014, 9:02pm UTC](https://forum.ansible.com/t/multiple-ssh-keys/14342 "2014-01-14T21:02:53Z")

</div>

So, I’ve noticed I have a tendency to do things a little backwards but, I’m hoping someone can clear something up for me. Originally, i was using the file/copy module in ansible to copy the authorized\_keys2 file from th…

---

## [Ansible "Mini" Fest in Austin, 3/06 before SXSW Interactive, CFP now open](https://forum.ansible.com/t/ansible-mini-fest-in-austin-3-06-before-sxsw-interactive-cfp-now-open/14343)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [January 14, 2014, 9:01pm UTC](https://forum.ansible.com/t/ansible-mini-fest-in-austin-3-06-before-sxsw-interactive-cfp-now-open/14343 "2014-01-14T21:01:09Z")

</div>

We’reWEWe We’re going to do a small half-day event in Austin, TX before South-by-Southwest Interactive on 3/06. Sign up for tickets here: http://t.co/VtIj83ClVl If you would like to speak, please submit a few paragrap…

---

## [Best approach to add or remove users to match list](https://forum.ansible.com/t/best-approach-to-add-or-remove-users-to-match-list/14326)

<div class="topic-metadata">

**Author:** [@Randolph\_Kahle](https://forum.ansible.com/u/Randolph_Kahle)\
**Replies:** 1\
**Last updated:** [January 14, 2014, 5:35pm UTC](https://forum.ansible.com/t/best-approach-to-add-or-remove-users-to-match-list/14326 "2014-01-14T17:35:30Z")

</div>

I am using a list of users to define the exact set of user accounts I need on all of my managed compute instances. For example: users: {name: randy, group: admin, shell: /bin/bash, uid: 1000, sshkey: /files/users/ran…

---

## [dynamic groups group\_by always gives "changed"](https://forum.ansible.com/t/dynamic-groups-group-by-always-gives-changed/12846)

<div class="topic-metadata">

**Author:** [@Oliver\_Heinz](https://forum.ansible.com/u/Oliver_Heinz)\
**Replies:** 8\
**Last updated:** [January 14, 2014, 4:44pm UTC](https://forum.ansible.com/t/dynamic-groups-group-by-always-gives-changed/12846 "2014-01-14T16:44:13Z")

</div>

Hello all, is there a specific reason why dynamic groups with group\_by always signal “changed” instead of “ok”? This way a playbook containing dynamic groups always signals that items changed, although nothing is change…

---

## [Finally tasks](https://forum.ansible.com/t/finally-tasks/14341)

<div class="topic-metadata">

**Author:** [@Shai\_Israel](https://forum.ansible.com/u/Shai_Israel)\
**Replies:** 1\
**Last updated:** [January 14, 2014, 4:43pm UTC](https://forum.ansible.com/t/finally-tasks/14341 "2014-01-14T16:43:45Z")

</div>

Hi, I need to run cleanup tasks at the end of the playbook, no matter what the results of the other tasks. Is there any way to do it with Ansible? Thanks, Shai.

---

## [Request for review: mongodb\_replica\_set](https://forum.ansible.com/t/request-for-review-mongodb-replica-set/14339)

<div class="topic-metadata">

**Author:** [@George\_Miroshnykov](https://forum.ansible.com/u/George_Miroshnykov)\
**Replies:** 0\
**Last updated:** [January 14, 2014, 1:44pm UTC](https://forum.ansible.com/t/request-for-review-mongodb-replica-set/14339 "2014-01-14T13:44:42Z")

</div>

Hello everyone! I’ve just submitted a pull request for the new module - mongodb\_replica\_set: https://github.com/ansible/ansible/pull/5615 As the name implies, this module can be used to manage MongoDB replica sets. P…

---

## [ansible\_python\_interpreter for ad-hoc ansible commands](https://forum.ansible.com/t/ansible-python-interpreter-for-ad-hoc-ansible-commands/14338)

<div class="topic-metadata">

**Author:** [@Walid](https://forum.ansible.com/u/Walid)\
**Replies:** 3\
**Last updated:** [January 14, 2014, 1:32pm UTC](https://forum.ansible.com/t/ansible-python-interpreter-for-ad-hoc-ansible-commands/14338 "2014-01-14T13:32:03Z")

</div>

Hi, What would be the best way to set ansible\_python\_interpreter for almost 50% of the hosts in the inventory for ad-hoc ansible command. what i did is i grouped them under one group in the inventory \[python27:children\]…

---

## [run multiple tasks in parallel for multiple hosts](https://forum.ansible.com/t/run-multiple-tasks-in-parallel-for-multiple-hosts/14327)

<div class="topic-metadata">

**Author:** [@Tao\_Fan](https://forum.ansible.com/u/Tao_Fan)\
**Replies:** 3\
**Last updated:** [January 14, 2014, 1:30pm UTC](https://forum.ansible.com/t/run-multiple-tasks-in-parallel-for-multiple-hosts/14327 "2014-01-14T13:30:24Z")

</div>

Hi all, I have search around for this but they are all about running one task concurrently for multiple hosts. What I am trying to get is running multiple tasks concurrently, meaning if one host, for whatever reason, ev…

---

## [Optional second key with\_subelements](https://forum.ansible.com/t/optional-second-key-with-subelements/14336)

<div class="topic-metadata">

**Author:** [@John\_Meredith](https://forum.ansible.com/u/John_Meredith)\
**Replies:** 1\
**Last updated:** [January 14, 2014, 1:24pm UTC](https://forum.ansible.com/t/optional-second-key-with-subelements/14336 "2014-01-14T13:24:30Z")

</div>

Hi, I have a vars file with the following: applications: name: app1 sublist: item11 item12 name: app2 sublist: item21 item22 name: app3 …and a playbook task of: debug: msg=“{{ item.0.nam…

---

## [Ignoring a line in a template file](https://forum.ansible.com/t/ignoring-a-line-in-a-template-file/14337)

<div class="topic-metadata">

**Author:** [@Eric\_Palmer1](https://forum.ansible.com/u/Eric_Palmer1)\
**Replies:** 1\
**Last updated:** [January 14, 2014, 10:44am UTC](https://forum.ansible.com/t/ignoring-a-line-in-a-template-file/14337 "2014-01-14T10:44:22Z")

</div>

I have this line LogFormat “{ "@timestamp": "%{%Y-%m-%dT%H:%M:%S%z}t", "@fields": { "client": "%a", "duration\_usec": %D, "status": %s, "request": "%U%q", "method": "%m", "referrer": "%{Referer}i", "vhost": "%v" , "respo…

---

## [roles with per-host config?](https://forum.ansible.com/t/roles-with-per-host-config/14335)

<div class="topic-metadata">

**Author:** [@Erik\_Anderson](https://forum.ansible.com/u/Erik_Anderson)\
**Replies:** 1\
**Last updated:** [January 14, 2014, 12:26am UTC](https://forum.ansible.com/t/roles-with-per-host-config/14335 "2014-01-14T00:26:24Z")

</div>

I’ve been using ansible (v1.4.3) with great success to manage our EC2 infrastructure. In this use case, I’m using role-based playbooks, where no single host has any config unique to itself. I have a smaller, much more a…

---

## [How would you set variables in this case?](https://forum.ansible.com/t/how-would-you-set-variables-in-this-case/14318)

<div class="topic-metadata">

**Author:** [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Replies:** 6\
**Last updated:** [January 14, 2014, 12:04am UTC](https://forum.ansible.com/t/how-would-you-set-variables-in-this-case/14318 "2014-01-14T00:04:06Z")

</div>

I have been building up a bunch of tasks for some standard configuration items. I have the basic tasks all working perfectly for new installs for both AIX and RedHat/CentOs 6. Now I’m testing against one of the older Red…

---

## [ec2: Why parameter "key\_name" is mandatory required?](https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324)

<div class="topic-metadata">

**Author:** [@Alex\_Lov](https://forum.ansible.com/u/Alex_Lov)\
**Replies:** 1\
**Last updated:** [January 13, 2014, 11:20pm UTC](https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324 "2014-01-13T23:20:21Z")

</div>

(copy-paste from https://github.com/ansible/ansible/issues/5579) Subj. As I can see in code, this module uses boto function run\_instance(), and in this function parameter “key\_name” is not required for creating new ins…

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

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