# Latest

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

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

**Page:** 930

---

## [Sudo nuances](https://forum.ansible.com/t/sudo-nuances/16421)

<div class="topic-metadata">

**Author:** [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Replies:** 2\
**Last updated:** [October 8, 2014, 4:57pm UTC](https://forum.ansible.com/t/sudo-nuances/16421 "2014-10-08T16:57:56Z")

</div>

When trying this on Solaris 11 server. ansible --sudo -i hosts -m file -a “state=directory dest=/export/home/foo” sudo password: I kept getting this error: | FAILED =\> ssh connection closed waiting for sudo or su …

---

## [How to fetch a file from remote server without creating additional subfolders](https://forum.ansible.com/t/how-to-fetch-a-file-from-remote-server-without-creating-additional-subfolders/16463)

<div class="topic-metadata">

**Author:** [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Replies:** 3\
**Last updated:** [October 8, 2014, 3:48pm UTC](https://forum.ansible.com/t/how-to-fetch-a-file-from-remote-server-without-creating-additional-subfolders/16463 "2014-10-08T15:48:15Z")

</div>

This works except it creates additional subdirectories within the destination. I just want to copy into my current working directory where I’m running ansible from. ansible all -m fetch -a “src=/tmp/pci.{{ inventory\_hos…

---

## [sysctl module and removal of entry](https://forum.ansible.com/t/sysctl-module-and-removal-of-entry/16465)

<div class="topic-metadata">

**Author:** [@KSS](https://forum.ansible.com/u/KSS)\
**Replies:** 0\
**Last updated:** [October 8, 2014, 3:24pm UTC](https://forum.ansible.com/t/sysctl-module-and-removal-of-entry/16465 "2014-10-08T15:24:39Z")

</div>

Hi, I’ve come across a situation where the sysctl module is not removing an entry if the value matches even if the state is set to ‘absent’. e.g, The following does not remove the sysctl entry if the value below mat…

---

## [How to get a hold of the hostname from inventory file?](https://forum.ansible.com/t/how-to-get-a-hold-of-the-hostname-from-inventory-file/16464)

<div class="topic-metadata">

**Author:** [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Replies:** 0\
**Last updated:** [October 8, 2014, 1:59pm UTC](https://forum.ansible.com/t/how-to-get-a-hold-of-the-hostname-from-inventory-file/16464 "2014-10-08T13:59:42Z")

</div>

that would be the special var inventory\_hostname

---

## [How do you feed your inventories to CI server?](https://forum.ansible.com/t/how-do-you-feed-your-inventories-to-ci-server/16452)

<div class="topic-metadata">

**Author:** [@Andrei\_Pashkin](https://forum.ansible.com/u/Andrei_Pashkin)\
**Replies:** 1\
**Last updated:** [October 8, 2014, 1:36pm UTC](https://forum.ansible.com/t/how-do-you-feed-your-inventories-to-ci-server/16452 "2014-10-08T13:36:57Z")

</div>

Hi! Do you push your inventories directly to project repositories, or you feed them to CI server in some other ways?

---

## [Task YML Synthax](https://forum.ansible.com/t/task-yml-synthax/16454)

<div class="topic-metadata">

**Author:** [@Yoann\_DAVID](https://forum.ansible.com/u/Yoann_DAVID)\
**Replies:** 2\
**Last updated:** [October 8, 2014, 12:54pm UTC](https://forum.ansible.com/t/task-yml-synthax/16454 "2014-10-08T12:54:31Z")

</div>

Hello, depending of the playbook, the modules attribute’s in task are differently written : Colon synthax : name: APT | Update the general configuration (/etc/apt/apt.conf.ds/10general) | | template: | src: etc\_ap…

---

## [Do import statements need to be at the bottom in modules?](https://forum.ansible.com/t/do-import-statements-need-to-be-at-the-bottom-in-modules/16460)

<div class="topic-metadata">

**Author:** [@Lorin\_Hochstein](https://forum.ansible.com/u/Lorin_Hochstein)\
**Replies:** 1\
**Last updated:** [October 8, 2014, 12:47pm UTC](https://forum.ansible.com/t/do-import-statements-need-to-be-at-the-bottom-in-modules/16460 "2014-10-08T12:47:43Z")

</div>

I’ve noticed that all of the Ansible modules have their import statements near the bottom of the file instead of the top: from ansible.module\_utils.basic import \* If I’m writing a new module, do I need to put the impor…

---

## [Conditional exit](https://forum.ansible.com/t/conditional-exit/16461)

<div class="topic-metadata">

**Author:** [@Ning\_Chan](https://forum.ansible.com/u/Ning_Chan)\
**Replies:** 0\
**Last updated:** [October 8, 2014, 6:26am UTC](https://forum.ansible.com/t/conditional-exit/16461 "2014-10-08T06:26:07Z")

</div>

I have an ansible script, and i want to exit 0 if some condition is met. How can I do it? name: Exit if no pkg update fail: msg=“No new packages for update” when: (ncs\_db\_ccm\_pkg\_update.rc != 100 and ncs\_db\_common\_p…

---

## [synchronize module hangs after syncing files](https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448)

<div class="topic-metadata">

**Author:** [@paradigm100](https://forum.ansible.com/u/paradigm100)\
**Replies:** 1\
**Last updated:** [October 8, 2014, 5:15am UTC](https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448 "2014-10-08T05:15:37Z")

</div>

hi , when doing this task : name: rsync cms\_tcl code to server synchronize: src=/home/user/code\_checkout/cms\_tcl dest=/var/www/wsgi/code recursive=yes ansible hangs but i can see that the folder has been rsync’d c…

---

## [aws ec2 module getting error - One or more undefined variables: 'instances' is undefined](https://forum.ansible.com/t/aws-ec2-module-getting-error-one-or-more-undefined-variables-instances-is-undefined/16377)

<div class="topic-metadata">

**Author:** [@Andy\_Raj](https://forum.ansible.com/u/Andy_Raj)\
**Replies:** 2\
**Last updated:** [October 7, 2014, 11:01pm UTC](https://forum.ansible.com/t/aws-ec2-module-getting-error-one-or-more-undefined-variables-instances-is-undefined/16377 "2014-10-07T23:01:08Z")

</div>

Hello folks, New to ansible, using version - 1.7.2. I am trying to write a play to launch an instance on AWS and install my packages on it. i need to automatically add the DNS name of the launched instance to my hosts f…

---

## [how to install tagged release](https://forum.ansible.com/t/how-to-install-tagged-release/16453)

<div class="topic-metadata">

**Author:** [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Replies:** 2\
**Last updated:** [October 7, 2014, 4:41pm UTC](https://forum.ansible.com/t/how-to-install-tagged-release/16453 "2014-10-07T16:41:09Z")

</div>

Hi all, for weeks we´ve been successfully using Ansible 1.6.6 - now we got an update due to our current setup based just on “yum install ansible”, so we have version 1.7-1.el6. After this update I ran into some problem…

---

## [Nested loops](https://forum.ansible.com/t/nested-loops/16457)

<div class="topic-metadata">

**Author:** [@Kamil\_Lelonek](https://forum.ansible.com/u/Kamil_Lelonek)\
**Replies:** 0\
**Last updated:** [October 7, 2014, 4:29pm UTC](https://forum.ansible.com/t/nested-loops/16457 "2014-10-07T16:29:01Z")

</div>

What do I have: list of users’ names on my server list of developers’ names OR list of developers’ ssh keys What do I want: For every developer in my project I’d like to add his ssh key to authorized key of each user…

---

## [how to install tagged release](https://forum.ansible.com/t/how-to-install-tagged-release/16455)

<div class="topic-metadata">

**Author:** [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Replies:** 1\
**Last updated:** [October 7, 2014, 3:50pm UTC](https://forum.ansible.com/t/how-to-install-tagged-release/16455 "2014-10-07T15:50:55Z")

</div>

Hi all, for weeks we´ve been successfully using Ansible 1.6.6 - now we got an update due to our current setup based just on “yum install ansible”, so we have version 1.7-1.el6. After this update I ran into some problem…

---

## [shell commands and escaping characters](https://forum.ansible.com/t/shell-commands-and-escaping-characters/16445)

<div class="topic-metadata">

**Author:** [@Peter\_Palmieri](https://forum.ansible.com/u/Peter_Palmieri)\
**Replies:** 2\
**Last updated:** [October 7, 2014, 2:29pm UTC](https://forum.ansible.com/t/shell-commands-and-escaping-characters/16445 "2014-10-07T14:29:43Z")

</div>

I’m pulling data from EC2 instance metadata (from an IAM instance profile). The shell commands are: curl http://169.254.169.254/latest/meta-data/iam/security-credentials/PullCredentials \> creds.txt access=cat /home/ubu…

---

## ['command with\_items creates' syntax](https://forum.ansible.com/t/command-with-items-creates-syntax/16446)

<div class="topic-metadata">

**Author:** [@sampsont](https://forum.ansible.com/u/sampsont)\
**Replies:** 1\
**Last updated:** [October 7, 2014, 2:29pm UTC](https://forum.ansible.com/t/command-with-items-creates-syntax/16446 "2014-10-07T14:29:34Z")

</div>

I’m trying to generate pgp keys. Can’t find anything with Ansible to do it so I’m using Linux commands. If the keys are already generated, I don’t want them to be generated again. So, I need to use ‘creates’. I found th…

---

## [Ansible module - ec2\_elb Failing with Boto exeception ( throttling )](https://forum.ansible.com/t/ansible-module-ec2-elb-failing-with-boto-exeception-throttling/16382)

<div class="topic-metadata">

**Author:** [@Nate\_Dobbs](https://forum.ansible.com/u/Nate_Dobbs)\
**Replies:** 4\
**Last updated:** [October 7, 2014, 2:09pm UTC](https://forum.ansible.com/t/ansible-module-ec2-elb-failing-with-boto-exeception-throttling/16382 "2014-10-07T14:09:48Z")

</div>

Hello fellow ansible users. I have a process that turns on ec2 instances, then subsequently adds said instances to their respective load balancers. I get very intermittent results, sometimes the playbook will complete s…

---

## [Specify vault password file location inside of playbook?](https://forum.ansible.com/t/specify-vault-password-file-location-inside-of-playbook/16449)

<div class="topic-metadata">

**Author:** [@C\_S](https://forum.ansible.com/u/C_S)\
**Replies:** 0\
**Last updated:** [October 7, 2014, 7:10am UTC](https://forum.ansible.com/t/specify-vault-password-file-location-inside-of-playbook/16449 "2014-10-07T07:10:49Z")

</div>

Hi all, I'd like to use different vault passwords per env, does anyone know if there is a way to specify the vault password file location from within a playbook somehow? Thx! -cs

---

## ['join' a list and a dict](https://forum.ansible.com/t/join-a-list-and-a-dict/16359)

<div class="topic-metadata">

**Author:** [@oravirt](https://forum.ansible.com/u/oravirt)\
**Replies:** 5\
**Last updated:** [October 7, 2014, 6:59am UTC](https://forum.ansible.com/t/join-a-list-and-a-dict/16359 "2014-10-07T06:59:53Z")

</div>

Hi, I’ve got the following structures (or at least I’m hoping to be able to use them) \` list\_of\_files: { filename: file1, version: 1 } { filename: file2, version: 1 } { filename: file3, version: 1 } { filename: file…

---

## [Random cows!!!!](https://forum.ansible.com/t/random-cows/16447)

<div class="topic-metadata">

**Author:** [@Guy\_Matz](https://forum.ansible.com/u/Guy_Matz)\
**Replies:** 2\
**Last updated:** [October 7, 2014, 12:05am UTC](https://forum.ansible.com/t/random-cows/16447 "2014-10-07T00:05:49Z")

</div>

export ANSIBLE\_COW\_SELECTION=‘random’ You’re welcome!

---

## [Global variables file](https://forum.ansible.com/t/global-variables-file/16346)

<div class="topic-metadata">

**Author:** [@Ivaylo\_Bratoev](https://forum.ansible.com/u/Ivaylo_Bratoev)\
**Replies:** 12\
**Last updated:** [October 6, 2014, 8:32pm UTC](https://forum.ansible.com/t/global-variables-file/16346 "2014-10-06T20:32:31Z")

</div>

I need to define truly global variables. I know about using the ALL group\_vars but the variable there are not truly global. For example if groupname is defined in for the ALL group in group\_vars this doesn’t work: host…

---

## [How access dictionary in a jinja2 template?](https://forum.ansible.com/t/how-access-dictionary-in-a-jinja2-template/16443)

<div class="topic-metadata">

**Author:** [@skr989](https://forum.ansible.com/u/skr989)\
**Replies:** 2\
**Last updated:** [October 6, 2014, 8:00pm UTC](https://forum.ansible.com/t/how-access-dictionary-in-a-jinja2-template/16443 "2014-10-06T20:00:51Z")

</div>

I am trying to come up with a play book to install cassandra. Here each node has a calculated token (not a random hash) and is unique. So, I have defined a dictionary in the vars/cassandra\_variables.yml as below. The IPs…

---

## [How do I shuffle/randomize long lists of hosts please?](https://forum.ansible.com/t/how-do-i-shuffle-randomize-long-lists-of-hosts-please/16435)

<div class="topic-metadata">

**Author:** [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Replies:** 10\
**Last updated:** [October 6, 2014, 6:50pm UTC](https://forum.ansible.com/t/how-do-i-shuffle-randomize-long-lists-of-hosts-please/16435 "2014-10-06T18:50:09Z")

</div>

How do I shuffle/randomize long lists of hosts? That is, without writing an executable hosts file that randomizes them and then spits them out, and then dealing with all the groupings and variables and other wonderfulnes…

---

## [GovCloud on EC2](https://forum.ansible.com/t/govcloud-on-ec2/16427)

<div class="topic-metadata">

**Author:** [@Sam\_Oldak](https://forum.ansible.com/u/Sam_Oldak)\
**Replies:** 1\
**Last updated:** [October 6, 2014, 3:30pm UTC](https://forum.ansible.com/t/govcloud-on-ec2/16427 "2014-10-06T15:30:45Z")

</div>

Hi All, I’m trying to deploy to the AWS GovCloud, but Ansible is not accepting the us-gov-west-1 region. I modified ec2.ini in my local directory, and ec2.py as well, but the AWS\_REGIONS array does not seem to get reloa…

---

## [How to have each node get a different variable from an array](https://forum.ansible.com/t/how-to-have-each-node-get-a-different-variable-from-an-array/12464)

<div class="topic-metadata">

**Author:** [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Replies:** 7\
**Last updated:** [October 6, 2014, 3:12pm UTC](https://forum.ansible.com/t/how-to-have-each-node-get-a-different-variable-from-an-array/12464 "2014-10-06T15:12:19Z")

</div>

Hi, I am creating a playbook that creates a valid cassandra.yaml file for each node in a new cluster using a jinja2 template. What this file needs is a different token for each node, but I do not know how to do this wit…

---

## [Module Copy-Does not handle sparse files properly](https://forum.ansible.com/t/module-copy-does-not-handle-sparse-files-properly/16438)

<div class="topic-metadata">

**Author:** [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Replies:** 2\
**Last updated:** [October 6, 2014, 2:42pm UTC](https://forum.ansible.com/t/module-copy-does-not-handle-sparse-files-properly/16438 "2014-10-06T14:42:13Z")

</div>

I just found out that Ansible does not handle Sparse Files (A file with true empty space inside it) properly with the copy module. I don’t think this is a bug, but somebody should mention this in the documentation. Co…

---

## [Are extra\_vars accessible in plugins?](https://forum.ansible.com/t/are-extra-vars-accessible-in-plugins/16442)

<div class="topic-metadata">

**Author:** [@Guy\_Matz](https://forum.ansible.com/u/Guy_Matz)\
**Replies:** 1\
**Last updated:** [October 6, 2014, 2:20pm UTC](https://forum.ansible.com/t/are-extra-vars-accessible-in-plugins/16442 "2014-10-06T14:20:03Z")

</div>

Hi! Anyone know if it’s possible to access extra\_vars from a plugin? For example, let’s say I wanted to write an ec2 inventory plugin that could grab hosts for all regions, or as specified in an extra\_vars variable . . …

---

## [issues with yum](https://forum.ansible.com/t/issues-with-yum/16440)

<div class="topic-metadata">

**Author:** [@Dmitry\_Sukhodoyev](https://forum.ansible.com/u/Dmitry_Sukhodoyev)\
**Replies:** 2\
**Last updated:** [October 6, 2014, 1:34pm UTC](https://forum.ansible.com/t/issues-with-yum/16440 "2014-10-06T13:34:18Z")

</div>

hello. where is my mistake? yumtest: \`

---

## [Outputting stdout/stderr as it comes in](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 4\
**Last updated:** [October 6, 2014, 1:25pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082 "2014-10-06T13:25:18Z")

</div>

It's currently not possible. The closest thing we have is the way async can poll in a playbook. It may be possible to fiddle with async\_wrapper to get it to do something like this. It will probably have to pass …

---

## [How can I do multiple tests within a single when: statement](https://forum.ansible.com/t/how-can-i-do-multiple-tests-within-a-single-when-statement/16432)

<div class="topic-metadata">

**Author:** [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Replies:** 13\
**Last updated:** [October 6, 2014, 12:36pm UTC](https://forum.ansible.com/t/how-can-i-do-multiple-tests-within-a-single-when-statement/16432 "2014-10-06T12:36:52Z")

</div>

I’ve looked and looked but I can’t find it. How do I do multiple tests within a single when statement. For instance when: var1 == “X” AND var2 == “Y” And while I’m at it, how can I do OR statements along with multipl…

---

## [Whether to reopen issue.](https://forum.ansible.com/t/whether-to-reopen-issue/16439)

<div class="topic-metadata">

**Author:** [@Joseph\_Price](https://forum.ansible.com/u/Joseph_Price)\
**Replies:** 1\
**Last updated:** [October 6, 2014, 12:31pm UTC](https://forum.ansible.com/t/whether-to-reopen-issue/16439 "2014-10-06T12:31:46Z")

</div>

Howdy! I opened an issue for a behaviour change between 1.7.1 & 1.7.2: https://github.com/ansible/ansible/issues/9171 I’m pretty sure it’s fixed in devel though I seem to have confused myself with git bisect trying to …

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

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