# Latest

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

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

**Page:** 883

---

## [How gather additional facts by the role?](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809)

<div class="topic-metadata">

**Author:** [@Jan\_Koprowski](https://forum.ansible.com/u/Jan_Koprowski)\
**Replies:** 2\
**Last updated:** [March 30, 2015, 7:00am UTC](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809 "2015-03-30T07:00:46Z")

</div>

Hi, Often, running part of the role using --tags or --start-at-task I need information gathered by previous tasks. I thought that gathering information e.g. all available gpg keys should not be task but part of ‘gather…

---

## [EC2 Query Module](https://forum.ansible.com/t/ec2-query-module/17742)

<div class="topic-metadata">

**Author:** [@Jeff\_Gonzalez](https://forum.ansible.com/u/Jeff_Gonzalez)\
**Replies:** 1\
**Last updated:** [March 30, 2015, 1:50am UTC](https://forum.ansible.com/t/ec2-query-module/17742 "2015-03-30T01:50:41Z")

</div>

Is there an EC2 query module that allows you to look up various resources and associated metadata that can be registered as variables? I consistently seem to run across a problem using Ansible (I assume this is a lack of…

---

## [lineinfile when two lines are the same](https://forum.ansible.com/t/lineinfile-when-two-lines-are-the-same/17865)

<div class="topic-metadata">

**Author:** [@Vince\_Skahan](https://forum.ansible.com/u/Vince_Skahan)\
**Replies:** 2\
**Last updated:** [March 29, 2015, 7:41pm UTC](https://forum.ansible.com/t/lineinfile-when-two-lines-are-the-same/17865 "2015-03-29T19:41:03Z")

</div>

I’m installing a piece of software that requires me to edit a user=xyz line into a monolithic config file that is .ini like in format. \[function-x\] user=myuserhere \[function-y\] other stuff here more stuff here \[…

---

## [\-b and password prompting in ansible 1.9](https://forum.ansible.com/t/b-and-password-prompting-in-ansible-1-9/17853)

<div class="topic-metadata">

**Author:** [@Anand\_Buddhdev2](https://forum.ansible.com/u/Anand_Buddhdev2)\
**Replies:** 8\
**Last updated:** [March 29, 2015, 3:55pm UTC](https://forum.ansible.com/t/b-and-password-prompting-in-ansible-1-9/17853 "2015-03-29T15:55:28Z")

</div>

I usually use ansible with the “-sK” flags (use sudo, and ask for sudo password). Now I’ve noticed the new “-b” flag. So I wanted to use it, but I’m told I can’t use “-b” and “-K” together. So I have to type: -b --ask-b…

---

## [create multiple directories (one-by-one slow)?](https://forum.ansible.com/t/create-multiple-directories-one-by-one-slow/17866)

<div class="topic-metadata">

**Author:** [@Dan5](https://forum.ansible.com/u/Dan5)\
**Replies:** 3\
**Last updated:** [March 29, 2015, 3:17pm UTC](https://forum.ansible.com/t/create-multiple-directories-one-by-one-slow/17866 "2015-03-29T15:17:51Z")

</div>

The following works, but is pretty slow (much slower than a mkdir – it creates directories one-by-one, with a delay before each sub-task) name: create directories file: dest=/volumes/{{item}} state=directory with\_ite…

---

## [Core Module ec2\_elb\_lb working on tags](https://forum.ansible.com/t/core-module-ec2-elb-lb-working-on-tags/17867)

<div class="topic-metadata">

**Author:** [@Ben\_Doyle](https://forum.ansible.com/u/Ben_Doyle)\
**Replies:** 0\
**Last updated:** [March 29, 2015, 9:11am UTC](https://forum.ansible.com/t/core-module-ec2-elb-lb-working-on-tags/17867 "2015-03-29T09:11:46Z")

</div>

Howdy folks, Looking at getting into contributing and I think I’ve found (relatively) low hanging fruit that I need to have for a current project - that is setting/modifying tags on ELBs. Current Github issue for this …

---

## [On the same server, how to run a role twice with different arguments](https://forum.ansible.com/t/on-the-same-server-how-to-run-a-role-twice-with-different-arguments/17808)

<div class="topic-metadata">

**Author:** [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Replies:** 5\
**Last updated:** [March 28, 2015, 5:53pm UTC](https://forum.ansible.com/t/on-the-same-server-how-to-run-a-role-twice-with-different-arguments/17808 "2015-03-28T17:53:23Z")

</div>

Hello all, I am new with ansible and trying to understand how, on the same server, to run a role twice with different arguments. What I am trying to do is to install twice the same software but using a different path. …

---

## [Ansible --diff --check only display changes](https://forum.ansible.com/t/ansible-diff-check-only-display-changes/17820)

<div class="topic-metadata">

**Author:** [@David\_Neudorfer1](https://forum.ansible.com/u/David_Neudorfer1)\
**Replies:** 1\
**Last updated:** [March 28, 2015, 5:44pm UTC](https://forum.ansible.com/t/ansible-diff-check-only-display-changes/17820 "2015-03-28T17:44:02Z")

</div>

Would a callback plugin be the right place to start if I wanted to only the display “changed:” tasks including the changes: — before: /etc/motd +++ after: /opt/wp/app/hegemon/ansible/roles/common/templates/motd.j2 and…

---

## [rsync file permissions](https://forum.ansible.com/t/rsync-file-permissions/17814)

<div class="topic-metadata">

**Author:** [@niko.stojanovski](https://forum.ansible.com/u/niko.stojanovski)\
**Replies:** 1\
**Last updated:** [March 28, 2015, 5:26pm UTC](https://forum.ansible.com/t/rsync-file-permissions/17814 "2015-03-28T17:26:48Z")

</div>

I’m trying to copy over files with rsync. file creates main directory and any additional as catalogs. Owner and permission are set correctly. For now I only have a file in the catalogs directory. When synchronize kicks i…

---

## [conditionally running tasks](https://forum.ansible.com/t/conditionally-running-tasks/17822)

<div class="topic-metadata">

**Author:** [@Vince\_Skahan](https://forum.ansible.com/u/Vince_Skahan)\
**Replies:** 5\
**Last updated:** [March 28, 2015, 5:04pm UTC](https://forum.ansible.com/t/conditionally-running-tasks/17822 "2015-03-28T17:04:21Z")

</div>

What’s the preferred way to conditionally configure something if the ‘how’ changes from os to os, and version to version ‘of’ any particular os ? Here’s an example - setting up a serial console on a SysVinit system (exa…

---

## [Do not restart service if it was just started?](https://forum.ansible.com/t/do-not-restart-service-if-it-was-just-started/17857)

<div class="topic-metadata">

**Author:** [@Kyle](https://forum.ansible.com/u/Kyle)\
**Replies:** 1\
**Last updated:** [March 28, 2015, 3:00pm UTC](https://forum.ansible.com/t/do-not-restart-service-if-it-was-just-started/17857 "2015-03-28T15:00:19Z")

</div>

Newish to Ansible. I’m setting up a playbook for Splunk and it works great, the only part I’m unsure of is how to prevent a restart after splunk had just started. The whole play and the handler is below. So on initial …

---

## [Ansible Playbook structure for my first playbook with AWS and python](https://forum.ansible.com/t/ansible-playbook-structure-for-my-first-playbook-with-aws-and-python/17864)

<div class="topic-metadata">

**Author:** [@Sakthivel\_Subramania](https://forum.ansible.com/u/Sakthivel_Subramania)\
**Replies:** 0\
**Last updated:** [March 28, 2015, 2:42am UTC](https://forum.ansible.com/t/ansible-playbook-structure-for-my-first-playbook-with-aws-and-python/17864 "2015-03-28T02:42:05Z")

</div>

Hi, I am new to Ansible Playbook. I need helps on structuring my playbook, here is my requirement. → Create new instance in AWS using ansible playbook (User needs to provide ami ID, security group, tag name etc at ru…

---

## [Conditional evaluation of lists](https://forum.ansible.com/t/conditional-evaluation-of-lists/17863)

<div class="topic-metadata">

**Author:** [@Anand\_Buddhdev2](https://forum.ansible.com/u/Anand_Buddhdev2)\
**Replies:** 2\
**Last updated:** [March 27, 2015, 10:50pm UTC](https://forum.ansible.com/t/conditional-evaluation-of-lists/17863 "2015-03-27T22:50:51Z")

</div>

I want to install some packages on a server. Additionally, if a certain condition is true, I want to add an extra package to the list of packages to be installed. What I would love is have this: name: install packages …

---

## [Wrapping action\_plugins in an action\_plugin](https://forum.ansible.com/t/wrapping-action-plugins-in-an-action-plugin/17860)

<div class="topic-metadata">

**Author:** [@Christian\_Schwarz](https://forum.ansible.com/u/Christian_Schwarz)\
**Replies:** 0\
**Last updated:** [March 27, 2015, 3:42pm UTC](https://forum.ansible.com/t/wrapping-action-plugins-in-an-action-plugin/17860 "2015-03-27T15:42:22Z")

</div>

Hi, I am writing an action\_plugin that gets a list of files to transfer, their mode and if they are a template. The action\_plugin shall check the template flag (boolean) and depending on its value either (false) run …

---

## [Docker not Pulling from Registry](https://forum.ansible.com/t/docker-not-pulling-from-registry/17859)

<div class="topic-metadata">

**Author:** [@Shapath\_Neupane](https://forum.ansible.com/u/Shapath_Neupane)\
**Replies:** 0\
**Last updated:** [March 27, 2015, 3:40pm UTC](https://forum.ansible.com/t/docker-not-pulling-from-registry/17859 "2015-03-27T15:40:33Z")

</div>

I’m trying to install Docker images using Ansible. tasks: name: Fetch Docker Images docker: name: RethinkDB image: rethinkdb:latest state: present I DON’T have any docker images installed in the target machin…

---

## [copy module with\_first\_found strange behavour](https://forum.ansible.com/t/copy-module-with-first-found-strange-behavour/17858)

<div class="topic-metadata">

**Author:** [@ansible\_user2](https://forum.ansible.com/u/ansible_user2)\
**Replies:** 0\
**Last updated:** [March 27, 2015, 2:59pm UTC](https://forum.ansible.com/t/copy-module-with-first-found-strange-behavour/17858 "2015-03-27T14:59:52Z")

</div>

i have the following: copy: src={{ item }} dest=“/var/lib/one/.ssh/id\_rsa” owner=oneadmin group=oneadmin mode=0600 with\_first\_found: “./files/id\_rsa” This creates “/var/lib/one/.ssh/id\_rsa/files/” folder at the…

---

## [Global HTTP proxy setting for all roles/tasks?](https://forum.ansible.com/t/global-http-proxy-setting-for-all-roles-tasks/17786)

<div class="topic-metadata">

**Author:** [@Timo\_Ahokas](https://forum.ansible.com/u/Timo_Ahokas)\
**Replies:** 7\
**Last updated:** [March 27, 2015, 2:09pm UTC](https://forum.ansible.com/t/global-http-proxy-setting-for-all-roles-tasks/17786 "2015-03-27T14:09:36Z")

</div>

Hi, We’re working in an environment where all access outside needs to go through HTTP/HTTPS proxies. We have previously solved this by defining a global environment variable with the necessary proxy definitions (http\_pr…

---

## [How to create a variable with value based on some condition?](https://forum.ansible.com/t/how-to-create-a-variable-with-value-based-on-some-condition/17757)

<div class="topic-metadata">

**Author:** [@Long\_Vu](https://forum.ansible.com/u/Long_Vu)\
**Replies:** 2\
**Last updated:** [March 27, 2015, 2:01pm UTC](https://forum.ansible.com/t/how-to-create-a-variable-with-value-based-on-some-condition/17757 "2015-03-27T14:01:07Z")

</div>

Hi, In Centos 7, mysql is now “mariadb”, in Centos 6 or below it is “mysq”. Looking at “ansible\_distribution\_major\_version” fact I will be able to find if my target host is Centos 6 or 7. How would I create a variable…

---

## [Parameter "role\_names" in playbooks](https://forum.ansible.com/t/parameter-role-names-in-playbooks/17856)

<div class="topic-metadata">

**Author:** [@Anand\_Buddhdev2](https://forum.ansible.com/u/Anand_Buddhdev2)\
**Replies:** 1\
**Last updated:** [March 27, 2015, 12:53pm UTC](https://forum.ansible.com/t/parameter-role-names-in-playbooks/17856 "2015-03-27T12:53:36Z")

</div>

I was looking at the code for playbooks, and noticed that it can take a parameter called “role\_names”. This parameter isn’t documented, or at least, I can’t find it. What is its purpose, and how is it meant to be used? R…

---

## [syntax error with lineinfile](https://forum.ansible.com/t/syntax-error-with-lineinfile/17851)

<div class="topic-metadata">

**Author:** [@Dave\_Thacker](https://forum.ansible.com/u/Dave_Thacker)\
**Replies:** 1\
**Last updated:** [March 27, 2015, 11:47am UTC](https://forum.ansible.com/t/syntax-error-with-lineinfile/17851 "2015-03-27T11:47:12Z")

</div>

I’m getting an unbalance quote error on this short playbook. I’m not seeing the error

---

## [Ansible and playbook variables](https://forum.ansible.com/t/ansible-and-playbook-variables/17855)

<div class="topic-metadata">

**Author:** [@Adnan\_Arab](https://forum.ansible.com/u/Adnan_Arab)\
**Replies:** 0\
**Last updated:** [March 27, 2015, 6:59am UTC](https://forum.ansible.com/t/ansible-and-playbook-variables/17855 "2015-03-27T06:59:20Z")

</div>

Hi, I running a play book via a python program. I pass extra\_vars when initialising the Playbook object but the variables in here I cannot access in my playbook. So I use: import ansible.playbook pb = ansible.playbo…

---

## [module is missing interpreter line during ansible file copy](https://forum.ansible.com/t/module-is-missing-interpreter-line-during-ansible-file-copy/17736)

<div class="topic-metadata">

**Author:** [@satheesh\_kumar](https://forum.ansible.com/u/satheesh_kumar)\
**Replies:** 2\
**Last updated:** [March 26, 2015, 10:19pm UTC](https://forum.ansible.com/t/module-is-missing-interpreter-line-during-ansible-file-copy/17736 "2015-03-26T22:19:30Z")

</div>

I am trying to copy a file from local to the remote VM using ansible, but got below error. My Playbook:

---

## [Tiered application start/stop orchestration ordering](https://forum.ansible.com/t/tiered-application-start-stop-orchestration-ordering/17829)

<div class="topic-metadata">

**Author:** [@Jeff\_Sussna](https://forum.ansible.com/u/Jeff_Sussna)\
**Replies:** 3\
**Last updated:** [March 26, 2015, 10:08pm UTC](https://forum.ansible.com/t/tiered-application-start-stop-orchestration-ordering/17829 "2015-03-26T22:08:51Z")

</div>

Dumb question re orchestrating the starting and stopping of tiered services with ordering dependencies: Imagine tier A depends on tier B. To bring up the app, start B then A. To bring it down, stop A then B. I can’t fig…

---

## [Ansible windows unzip](https://forum.ansible.com/t/ansible-windows-unzip/17448)

<div class="topic-metadata">

**Author:** [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Replies:** 8\
**Last updated:** [March 26, 2015, 9:21pm UTC](https://forum.ansible.com/t/ansible-windows-unzip/17448 "2015-03-26T21:21:44Z")

</div>

I’ve been working on orchestrating our windows hosts with ansible and had the need to be able to unzip files. Since the unarchive module was \*nix only I wrote an unzip.ps1/py module. I’d love to have feedback on it. I ha…

---

## [Intelligent loop for yum packages installation](https://forum.ansible.com/t/intelligent-loop-for-yum-packages-installation/13431)

<div class="topic-metadata">

**Author:** [@Steven\_Truong](https://forum.ansible.com/u/Steven_Truong)\
**Replies:** 26\
**Last updated:** [March 26, 2015, 4:34pm UTC](https://forum.ansible.com/t/intelligent-loop-for-yum-packages-installation/13431 "2015-03-26T16:34:49Z")

</div>

Hi all, I am running into this performance issue with installing a bunch of packages through yum. name: install additional requirements yum: name=$item state=present with\_items: vim-enhanced readline readline-devel n…

---

## [Have ansible manage the contents of a directory (including subdirectories)](https://forum.ansible.com/t/have-ansible-manage-the-contents-of-a-directory-including-subdirectories/17852)

<div class="topic-metadata">

**Author:** [@Mark\_Raider](https://forum.ansible.com/u/Mark_Raider)\
**Replies:** 1\
**Last updated:** [March 26, 2015, 3:10pm UTC](https://forum.ansible.com/t/have-ansible-manage-the-contents-of-a-directory-including-subdirectories/17852 "2015-03-26T15:10:54Z")

</div>

I am having difficulty figuring out how to have ansible manage the content of a directory, including subdirectories. For example… if I have the following example\_top\_level\_dir/ → subdir1 → subdir2 And I remove th…

---

## [yet another question about loops](https://forum.ansible.com/t/yet-another-question-about-loops/17794)

<div class="topic-metadata">

**Author:** [@user66](https://forum.ansible.com/u/user66)\
**Replies:** 2\
**Last updated:** [March 26, 2015, 2:14pm UTC](https://forum.ansible.com/t/yet-another-question-about-loops/17794 "2015-03-26T14:14:38Z")

</div>

yet another question about loops I want to be able to merge users across servers. For example, I want user1 to be on all of my hosts and I want user\_special\_at\_office to be only at my office’s servers So I made inve…

---

## [Extending YAML to support {{ at the beginning of a value](https://forum.ansible.com/t/extending-yaml-to-support-at-the-beginning-of-a-value/17845)

<div class="topic-metadata">

**Author:** [@Warren\_Seine](https://forum.ansible.com/u/Warren_Seine)\
**Replies:** 3\
**Last updated:** [March 26, 2015, 1:44pm UTC](https://forum.ansible.com/t/extending-yaml-to-support-at-the-beginning-of-a-value/17845 "2015-03-26T13:44:09Z")

</div>

Hi, Ansible handles pretty well the incompatibility between YAML and Jinja templates with a nice, informative, explicit error message. I suppose this is so because writing foo: {{ bar }} is an extremely common pattern a…

---

## [Dynamic variables when looping over a list in a role](https://forum.ansible.com/t/dynamic-variables-when-looping-over-a-list-in-a-role/17848)

<div class="topic-metadata">

**Author:** [@Daniel\_Sandbecker](https://forum.ansible.com/u/Daniel_Sandbecker)\
**Replies:** 0\
**Last updated:** [March 26, 2015, 1:34pm UTC](https://forum.ansible.com/t/dynamic-variables-when-looping-over-a-list-in-a-role/17848 "2015-03-26T13:34:11Z")

</div>

I’ve seen a few threads about looping over a list on a role, and the currently preferred method seems to be to pass the list as a variable and do the looping in each task. My problem is that I not only want to use each …

---

## [Support for running commands in different namespaces remotely](https://forum.ansible.com/t/support-for-running-commands-in-different-namespaces-remotely/17847)

<div class="topic-metadata">

**Author:** [@Bjornar\_Ness](https://forum.ansible.com/u/Bjornar_Ness)\
**Replies:** 0\
**Last updated:** [March 26, 2015, 1:24pm UTC](https://forum.ansible.com/t/support-for-running-commands-in-different-namespaces-remotely/17847 "2015-03-26T13:24:51Z")

</div>

Is any work beeing done on enabling running a task in a remote namespace (setns)? Reason I am asking is I have a network oob namespace sshd is running in, and for some of the ansible tasks I would like beeing able to s…

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

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