# Latest

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

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

**Page:** 780

---

## [use command output to trigger a new task](https://forum.ansible.com/t/use-command-output-to-trigger-a-new-task/20933)

<div class="topic-metadata">

**Author:** [@Peter\_Zoltan\_Kereszt](https://forum.ansible.com/u/Peter_Zoltan_Kereszt)\
**Replies:** 1\
**Last updated:** [March 21, 2016, 10:30am UTC](https://forum.ansible.com/t/use-command-output-to-trigger-a-new-task/20933 "2016-03-21T10:30:27Z")

</div>

Hello, I am trying to remove unused kernel packages when the command output is larger than 1 the tasks looks like this: name: Check if kernel upgrade is available command: dpkg -l linux-image\* | grep ii | wc -l 2\>&1 …

---

## [variable for list of targetted hosts](https://forum.ansible.com/t/variable-for-list-of-targetted-hosts/20921)

<div class="topic-metadata">

**Author:** [@jocelyn\_gibart](https://forum.ansible.com/u/jocelyn_gibart)\
**Replies:** 3\
**Last updated:** [March 21, 2016, 8:43am UTC](https://forum.ansible.com/t/variable-for-list-of-targetted-hosts/20921 "2016-03-21T08:43:31Z")

</div>

Hello dear Ansible wizards Is there a way to get the list of targetted hosts for a playbook or for a role ? I didnt find any variable or any way to get this. What I’m looking for is not merely the hosts: value, it is …

---

## [But in iptables module?](https://forum.ansible.com/t/but-in-iptables-module/20926)

<div class="topic-metadata">

**Author:** [@Joshua\_J\_Kugler](https://forum.ansible.com/u/Joshua_J_Kugler)\
**Replies:** 3\
**Last updated:** [March 20, 2016, 7:30pm UTC](https://forum.ansible.com/t/but-in-iptables-module/20926 "2016-03-20T19:30:46Z")

</div>

I'm trying to use the iptables module, and I \*think\* I'm hitting a bug. Wanted a sanity check before I open a bug report. This is Ansible 2.0.0.2. The action looks like this: - name: Update IPtables rules ipt…

---

## [Change of behaviour of delagate\_to between Ansible 1.9.4 and 2.0.1.0](https://forum.ansible.com/t/change-of-behaviour-of-delagate-to-between-ansible-1-9-4-and-2-0-1-0/20922)

<div class="topic-metadata">

**Author:** [@Jon\_B](https://forum.ansible.com/u/Jon_B)\
**Replies:** 2\
**Last updated:** [March 20, 2016, 6:11pm UTC](https://forum.ansible.com/t/change-of-behaviour-of-delagate-to-between-ansible-1-9-4-and-2-0-1-0/20922 "2016-03-20T18:11:41Z")

</div>

Apologies for the previous blank post. I have had a playbook in production for about 9 months that carries out a rolling update or our application across a number of servers by using a pre\_tasks section that removes a s…

---

## [Openstack os\_network - Binding: VNIC Type](https://forum.ansible.com/t/openstack-os-network-binding-vnic-type/20935)

<div class="topic-metadata">

**Author:** [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Replies:** 0\
**Last updated:** [March 20, 2016, 4:11pm UTC](https://forum.ansible.com/t/openstack-os-network-binding-vnic-type/20935 "2016-03-20T16:11:31Z")

</div>

Hello, I am trying to modify the Binding: VNIC Type of an instance. It does not seem to be supported in the OS network modules. I took a look on github and it does not appear to have code to support this feature. Any…

---

## [OpenStack os\_server os\_volume multiple instance launch](https://forum.ansible.com/t/openstack-os-server-os-volume-multiple-instance-launch/20934)

<div class="topic-metadata">

**Author:** [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Replies:** 0\
**Last updated:** [March 20, 2016, 4:03pm UTC](https://forum.ansible.com/t/openstack-os-server-os-volume-multiple-instance-launch/20934 "2016-03-20T16:03:55Z")

</div>

Hello, I am trying to launch/create multiple instances and attach multiple volumes with a loop but not having much luck. I can get it to work if I define each instance/volume but who wants to do that? Ideally I would…

---

## [How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch](https://forum.ansible.com/t/how-to-pass-command-line-arg-as-input-for-dynamic-inventory-executable-program-during-ansible-playbook-launch/20930)

<div class="topic-metadata">

**Author:** [@Naren](https://forum.ansible.com/u/Naren)\
**Replies:** 5\
**Last updated:** [March 20, 2016, 11:49am UTC](https://forum.ansible.com/t/how-to-pass-command-line-arg-as-input-for-dynamic-inventory-executable-program-during-ansible-playbook-launch/20930 "2016-03-20T11:49:18Z")

</div>

dynamic inventory can be achieved by ansible-playbook -i dynamicInventory.py myplaybook.yml in case I need to pass some dynamic input to the dynamicInventory.py program itself, how can I do that. Command line argument …

---

## [sudo permissions with apt module](https://forum.ansible.com/t/sudo-permissions-with-apt-module/20870)

<div class="topic-metadata">

**Author:** [@Rishabh\_Goyal](https://forum.ansible.com/u/Rishabh_Goyal)\
**Replies:** 2\
**Last updated:** [March 19, 2016, 11:24am UTC](https://forum.ansible.com/t/sudo-permissions-with-apt-module/20870 "2016-03-19T11:24:20Z")

</div>

Hi, I am trying to use apt module for installing multiple packages on my remote host. My user is not in sudoers list. However, I do have permissions to run following commands on remote host sudo apt-get update sudo ap…

---

## [restart docker when mounted file changes](https://forum.ansible.com/t/restart-docker-when-mounted-file-changes/20912)

<div class="topic-metadata">

**Author:** [@Koen\_Janssens](https://forum.ansible.com/u/Koen_Janssens)\
**Replies:** 1\
**Last updated:** [March 19, 2016, 9:40am UTC](https://forum.ansible.com/t/restart-docker-when-mounted-file-changes/20912 "2016-03-19T09:40:59Z")

</div>

Hi, I have an ansible tasklist that generates a cfg file from a template first and then starts a docker container using that cfg file as a volume. Works fine. But when the generated cfg file changes (cfg file is actua…

---

## [Backup file naming convention -- MyFile.2016-03-10@15:48:16~](https://forum.ansible.com/t/backup-file-naming-convention-myfile-2016-03-10-1516/20927)

<div class="topic-metadata">

**Author:** [@John\_Leo\_Huetter](https://forum.ansible.com/u/John_Leo_Huetter)\
**Replies:** 3\
**Last updated:** [March 19, 2016, 2:41am UTC](https://forum.ansible.com/t/backup-file-naming-convention-myfile-2016-03-10-1516/20927 "2016-03-19T02:41:10Z")

</div>

Hello, Is there a way to update the naming convention of the backup files: I see them being written as: MyFile.2016-03-10@15:48:16~ These files are placed by the template core module when backup=yes is given. Is this…

---

## [csvfile lookup plugin with a space-delimited file](https://forum.ansible.com/t/csvfile-lookup-plugin-with-a-space-delimited-file/20898)

<div class="topic-metadata">

**Author:** [@Anand\_Buddhdev](https://forum.ansible.com/u/Anand_Buddhdev)\
**Replies:** 2\
**Last updated:** [March 18, 2016, 10:01pm UTC](https://forum.ansible.com/t/csvfile-lookup-plugin-with-a-space-delimited-file/20898 "2016-03-18T22:01:46Z")

</div>

Hello Ansible folk, I have a text file of the form: 10.60.43.23 worker22.domain I was to use the “csvfile” lookup plugin to look up name host name, given an IP address. So I’m trying this: name: hostname lookup deb…

---

## [Sample skeleton for Ansible module written in Perl -- how should I contribute?](https://forum.ansible.com/t/sample-skeleton-for-ansible-module-written-in-perl-how-should-i-contribute/20916)

<div class="topic-metadata">

**Author:** [@Uditha\_Desilva](https://forum.ansible.com/u/Uditha_Desilva)\
**Replies:** 2\
**Last updated:** [March 18, 2016, 9:29pm UTC](https://forum.ansible.com/t/sample-skeleton-for-ansible-module-written-in-perl-how-should-i-contribute/20916 "2016-03-18T21:29:22Z")

</div>

Hi, being a hardened Perl coder and Python novice, I prefer to use Perl to write my modules. I’ve gotten a simple skeleton that I use for this, that uses the auto-replacer code with the magic JSON string ("\<\<INCLUDE\_AN…

---

## [Module to determine home directory for a named user](https://forum.ansible.com/t/module-to-determine-home-directory-for-a-named-user/20924)

<div class="topic-metadata">

**Author:** [@Gordon\_Mckeown](https://forum.ansible.com/u/Gordon_Mckeown)\
**Replies:** 2\
**Last updated:** [March 18, 2016, 9:05pm UTC](https://forum.ansible.com/t/module-to-determine-home-directory-for-a-named-user/20924 "2016-03-18T21:05:14Z")

</div>

Hi all, Have started playing around with Ansible over the last couple of days, and as part of my playbook to set up a new server I wanted to copy files to the home directories of some specific users. I couldn’t find an …

---

## [module lineinfile not found in configured module paths.  Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem.](https://forum.ansible.com/t/module-lineinfile-not-found-in-configured-module-paths-additionally-core-modules-are-missing-if-this-is-a-checkout-run-git-submodule-update-init-recursive-to-correct-this-problem/20901)

<div class="topic-metadata">

**Author:** [@Krishna\_Kanth](https://forum.ansible.com/u/Krishna_Kanth)\
**Replies:** 1\
**Last updated:** [March 18, 2016, 8:28pm UTC](https://forum.ansible.com/t/module-lineinfile-not-found-in-configured-module-paths-additionally-core-modules-are-missing-if-this-is-a-checkout-run-git-submodule-update-init-recursive-to-correct-this-problem/20901 "2016-03-18T20:28:22Z")

</div>

Hi Ansible Experts, I am facing the error in the subject line, when i tried to access a file and add a line to end of the file using lineinfile module. For some reason it unables to find the module or something, tried …

---

## [Parse error](https://forum.ansible.com/t/parse-error/20914)

<div class="topic-metadata">

**Author:** [@chinky\_gupta](https://forum.ansible.com/u/chinky_gupta)\
**Replies:** 1\
**Last updated:** [March 18, 2016, 8:22pm UTC](https://forum.ansible.com/t/parse-error/20914 "2016-03-18T20:22:12Z")

</div>

Parse error: playbooks must be formatted as a YAML list, got \<type dict\> What could be the reasons of such error

---

## [How to retrieve a specific result from multiple command registered to a variable](https://forum.ansible.com/t/how-to-retrieve-a-specific-result-from-multiple-command-registered-to-a-variable/20911)

<div class="topic-metadata">

**Author:** [@Arthur\_Reyes](https://forum.ansible.com/u/Arthur_Reyes)\
**Replies:** 6\
**Last updated:** [March 18, 2016, 7:49pm UTC](https://forum.ansible.com/t/how-to-retrieve-a-specific-result-from-multiple-command-registered-to-a-variable/20911 "2016-03-18T19:49:46Z")

</div>

I have a series of commands registered to the same var \` shell: ls -alh’{{ item }}’ register:cmd\_output with\_items: ‘/home/1’ ‘/home/2’ \` For some plays, I only need to evaluate a specific stdout. Assuming I want …

---

## [upgrading to ansible 2 mishaps](https://forum.ansible.com/t/upgrading-to-ansible-2-mishaps/20925)

<div class="topic-metadata">

**Author:** [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Replies:** 0\
**Last updated:** [March 18, 2016, 6:51pm UTC](https://forum.ansible.com/t/upgrading-to-ansible-2-mishaps/20925 "2016-03-18T18:51:30Z")

</div>

Hi, I just updated from ansible 1.9 to ansible 2 and I am somehow managed to break my playbooks. I can't seem to figure how whats wrong even after spending a good chunk of time with google Any pointer on what could …

---

## [Dynamically alter remote\_tmp](https://forum.ansible.com/t/dynamically-alter-remote-tmp/20920)

<div class="topic-metadata">

**Author:** [@chris\_scott](https://forum.ansible.com/u/chris_scott)\
**Replies:** 2\
**Last updated:** [March 18, 2016, 3:58pm UTC](https://forum.ansible.com/t/dynamically-alter-remote-tmp/20920 "2016-03-18T15:58:11Z")

</div>

I have a simple problem. I’m pushing up a tarball with the unarchive module, and the dest setting is pointing to a large volume. However it unarchive module pushes the file to the remote\_tmp dir 1st. This is on /home be …

---

## [when: state is present from variable dict hash list](https://forum.ansible.com/t/when-state-is-present-from-variable-dict-hash-list/20917)

<div class="topic-metadata">

**Author:** [@Chris\_Short](https://forum.ansible.com/u/Chris_Short)\
**Replies:** 3\
**Last updated:** [March 18, 2016, 1:57pm UTC](https://forum.ansible.com/t/when-state-is-present-from-variable-dict-hash-list/20917 "2016-03-18T13:57:28Z")

</div>

I have the following defined in group\_vars and I’m trying to run a task when the state is defined as present and the syntax is baffling me: staff: { netid: user001, uid: 12345, comment: “Chris Short”, state: present …

---

## [Ansible 2.0 changes in variables scoping in playbooks](https://forum.ansible.com/t/ansible-2-0-changes-in-variables-scoping-in-playbooks/20915)

<div class="topic-metadata">

**Author:** [@Simon\_Lipp](https://forum.ansible.com/u/Simon_Lipp)\
**Replies:** 0\
**Last updated:** [March 18, 2016, 11:42am UTC](https://forum.ansible.com/t/ansible-2-0-changes-in-variables-scoping-in-playbooks/20915 "2016-03-18T11:42:09Z")

</div>

Hello, I’m in the process of migrating my playbooks to Ansible 2.0, and I’m quite distressed by changes in variable scoping with Ansible 1.9. Let’s take this simple setup : https://gist.github.com/sloonz/7144dde17b3bb0…

---

## [\[gluster\_volume\] Can't set options for a gluster volume](https://forum.ansible.com/t/gluster-volume-cant-set-options-for-a-gluster-volume/20880)

<div class="topic-metadata">

**Author:** [@royal.forest.dept](https://forum.ansible.com/u/royal.forest.dept)\
**Replies:** 1\
**Last updated:** [March 18, 2016, 2:40am UTC](https://forum.ansible.com/t/gluster-volume-cant-set-options-for-a-gluster-volume/20880 "2016-03-18T02:40:09Z")

</div>

Hi, I’m trying to set an option for a gluster volume with this task: name: Include hosted\_engine volume in virt group gluster\_volume: state=present name=hosted\_engine options=‘{group: virt}’ run\_once: true The forma…

---

## [accessing localhost with dynamic hosts for limited tasks](https://forum.ansible.com/t/accessing-localhost-with-dynamic-hosts-for-limited-tasks/20877)

<div class="topic-metadata">

**Author:** [@Daniel\_Boland](https://forum.ansible.com/u/Daniel_Boland)\
**Replies:** 1\
**Last updated:** [March 18, 2016, 2:35am UTC](https://forum.ansible.com/t/accessing-localhost-with-dynamic-hosts-for-limited-tasks/20877 "2016-03-18T02:35:54Z")

</div>

I’m trying to access localhost when i specify other remote hosts (using ec2 dynamic inventory but not sure if that matters). But i get this: PLAY \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [When conditional can be used with variables??](https://forum.ansible.com/t/when-conditional-can-be-used-with-variables/20899)

<div class="topic-metadata">

**Author:** [@NEW\_HOMIE](https://forum.ansible.com/u/NEW_HOMIE)\
**Replies:** 4\
**Last updated:** [March 18, 2016, 12:21am UTC](https://forum.ansible.com/t/when-conditional-can-be-used-with-variables/20899 "2016-03-18T00:21:59Z")

</div>

Hello there~ Is this possible using when conditional with variables? For instance, I use two kind of was (Jboss, Weblogic) I create for checking process id some yml files like under line check.yml shell: ps -ef | g…

---

## [Ansible 2.0 playbook with python scripts.](https://forum.ansible.com/t/ansible-2-0-playbook-with-python-scripts/20874)

<div class="topic-metadata">

**Author:** [@techbayboy](https://forum.ansible.com/u/techbayboy)\
**Replies:** 3\
**Last updated:** [March 17, 2016, 10:51pm UTC](https://forum.ansible.com/t/ansible-2-0-playbook-with-python-scripts/20874 "2016-03-17T22:51:41Z")

</div>

Is there a way to trigger the playbook within a python script?

---

## [issue using become (to sudo su - msp" - Pl Help](https://forum.ansible.com/t/issue-using-become-to-sudo-su-msp-pl-help/20884)

<div class="topic-metadata">

**Author:** [@Srinivas\_Kuncham](https://forum.ansible.com/u/Srinivas_Kuncham)\
**Replies:** 1\
**Last updated:** [March 17, 2016, 10:06pm UTC](https://forum.ansible.com/t/issue-using-become-to-sudo-su-msp-pl-help/20884 "2016-03-17T22:06:54Z")

</div>

Hi All, I am facing issues with being able to login with my credentials and then sudo (become) msp user… When I manually ssh to the test\_server, I use the command “sudo su - msp” to switch user and run few commands. Bu…

---

## [Correct way to reduce useless information](https://forum.ansible.com/t/correct-way-to-reduce-useless-information/20909)

<div class="topic-metadata">

**Author:** [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Replies:** 0\
**Last updated:** [March 17, 2016, 8:46pm UTC](https://forum.ansible.com/t/correct-way-to-reduce-useless-information/20909 "2016-03-17T20:46:34Z")

</div>

Hi, I’m wondering if the latest version of Ansible allows developers to reduce the amount of useless information that is displayed while running playbooks. For example, a reasonable way to code the “fail” module is to …

---

## [os\_network module and changing project names not working](https://forum.ansible.com/t/os-network-module-and-changing-project-names-not-working/20896)

<div class="topic-metadata">

**Author:** [@Michael\_Gale](https://forum.ansible.com/u/Michael_Gale)\
**Replies:** 2\
**Last updated:** [March 17, 2016, 8:30pm UTC](https://forum.ansible.com/t/os-network-module-and-changing-project-names-not-working/20896 "2016-03-17T20:30:58Z")

</div>

Hello, I have an ansible playbook that is responsible for creating all of the projects we have defined in our projects.yml file. This playbook currently: creates all of our projects adds our admin\_group to the projec…

---

## [Jobs concurrency - Ansible Tower](https://forum.ansible.com/t/jobs-concurrency-ansible-tower/20908)

<div class="topic-metadata">

**Author:** [@a\_akin](https://forum.ansible.com/u/a_akin)\
**Replies:** 1\
**Last updated:** [March 17, 2016, 7:57pm UTC](https://forum.ansible.com/t/jobs-concurrency-ansible-tower/20908 "2016-03-17T19:57:26Z")

</div>

Jobs scheduled via Ansible Tower are sometimes backlogged for as much as 3 days and it appears only one job is being run at any one time. Any suggestions on how to change this and make jobs run concurrently? This docume…

---

## [ansible-pull support for git repo containing submodules?](https://forum.ansible.com/t/ansible-pull-support-for-git-repo-containing-submodules/20879)

<div class="topic-metadata">

**Author:** [@digitalsy](https://forum.ansible.com/u/digitalsy)\
**Replies:** 1\
**Last updated:** [March 17, 2016, 7:00pm UTC](https://forum.ansible.com/t/ansible-pull-support-for-git-repo-containing-submodules/20879 "2016-03-17T19:00:42Z")

</div>

I can’t seem to figure out if this is supported (if so what am I missing?) or if this just hasn’t come up yet anywhere. I haven’t found many/any scenarios online of anyone experiencing the same issues. I understand that…

---

## [Nagios play fails](https://forum.ansible.com/t/nagios-play-fails/20907)

<div class="topic-metadata">

**Author:** [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Replies:** 0\
**Last updated:** [March 17, 2016, 5:25pm UTC](https://forum.ansible.com/t/nagios-play-fails/20907 "2016-03-17T17:25:01Z")

</div>

I’m trying to quiet Nagios alerts after a Windows update, but before reboot. I call the playbook like this: ansible-playbook -l ws0 win\_updatelyrisserversB.yml (with or without -u) Here are the relevant parts of my pla…

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

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