# Latest

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

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

**Page:** 1045

---

## [Conditional Execution: Conditional expression must evaluate to True or False](https://forum.ansible.com/t/conditional-execution-conditional-expression-must-evaluate-to-true-or-false/12839)

<div class="topic-metadata">

**Author:** [@Mark\_Mandel](https://forum.ansible.com/u/Mark_Mandel)\
**Replies:** 2\
**Last updated:** [May 21, 2013, 11:18pm UTC](https://forum.ansible.com/t/conditional-execution-conditional-expression-must-evaluate-to-true-or-false/12839 "2013-05-21T23:18:18Z")

</div>

All, I’m running Ansible latest from github. You can see the full example here: http://pastebin.com/LpKdhRBD But I have a conditional from a variable I’ve registered. I took the example pretty much straight out of ht…

---

## [Advice on structuring playbooks and tasks](https://forum.ansible.com/t/advice-on-structuring-playbooks-and-tasks/12835)

<div class="topic-metadata">

**Author:** [@Brian\_Candler](https://forum.ansible.com/u/Brian_Candler)\
**Replies:** 9\
**Last updated:** [May 21, 2013, 7:49pm UTC](https://forum.ansible.com/t/advice-on-structuring-playbooks-and-tasks/12835 "2013-05-21T19:49:03Z")

</div>

I am attempting to structure playbooks for reusability. Options seem to be: playbooks can include other playbooks playbooks can include tasks and handlers playbooks can include tasks and handlers via ‘roles’ Since eve…

---

## [Value of \`changed\` after a "search and remplace using \`sed\`?](https://forum.ansible.com/t/value-of-changed-after-a-search-and-remplace-using-sed/12833)

<div class="topic-metadata">

**Author:** [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Replies:** 1\
**Last updated:** [May 21, 2013, 5:47pm UTC](https://forum.ansible.com/t/value-of-changed-after-a-search-and-remplace-using-sed/12833 "2013-05-21T17:47:05Z")

</div>

Lineinfile module will also work, but templates are better imho. Brian Coca

---

## [only\_if file does not contain a certain line](https://forum.ansible.com/t/only-if-file-does-not-contain-a-certain-line/11942)

<div class="topic-metadata">

**Author:** [@Giuliano\_Barberi](https://forum.ansible.com/u/Giuliano_Barberi)\
**Replies:** 8\
**Last updated:** [May 21, 2013, 5:42pm UTC](https://forum.ansible.com/t/only-if-file-does-not-contain-a-certain-line/11942 "2013-05-21T17:42:07Z")

</div>

Not sure If I am doing this the proper way but I want to check a file for a certain line and only execute a command if the file does not contain this line. I see there is a lineinfile command but that seems to be for mod…

---

## [Aggregating and analyzing gathered facts](https://forum.ansible.com/t/aggregating-and-analyzing-gathered-facts/12831)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 1\
**Last updated:** [May 21, 2013, 3:12pm UTC](https://forum.ansible.com/t/aggregating-and-analyzing-gathered-facts/12831 "2013-05-21T15:12:11Z")

</div>

insert a play on localhost to run a command that does analysis and returns facts that subsequent plays can use You would write a custom fact module for this and call it like so: tasks: action: my\_custom\_facts\_mod…

---

## [Feedback on Vagrant plugin](https://forum.ansible.com/t/feedback-on-vagrant-plugin/12837)

<div class="topic-metadata">

**Author:** [@Mark\_Mandel](https://forum.ansible.com/u/Mark_Mandel)\
**Replies:** 0\
**Last updated:** [May 21, 2013, 5:23am UTC](https://forum.ansible.com/t/feedback-on-vagrant-plugin/12837 "2013-05-21T05:23:09Z")

</div>

All, I got annoyed with having to hardcode the IP that my Vagrant VM was using, so I wrote a small plugin for external inventory lookup to retrieve the IP of the VM from Vagrant. My python is pretty aweful (as I’m sure…

---

## [Could this be a bug in yum module?](https://forum.ansible.com/t/could-this-be-a-bug-in-yum-module/12825)

<div class="topic-metadata">

**Author:** [@Steven\_Truong](https://forum.ansible.com/u/Steven_Truong)\
**Replies:** 7\
**Last updated:** [May 20, 2013, 6:35pm UTC](https://forum.ansible.com/t/could-this-be-a-bug-in-yum-module/12825 "2013-05-20T18:35:05Z")

</div>

Hi all, I need to install about 60 perl rpm packages and there is one particular module that fell through the crack for yum module. On the 20 nodes that I applied this module, all of them still do not have this perl-Pa…

---

## [Removing an host out of playbook execution](https://forum.ansible.com/t/removing-an-host-out-of-playbook-execution/12834)

<div class="topic-metadata">

**Author:** [@jschulman](https://forum.ansible.com/u/jschulman)\
**Replies:** 0\
**Last updated:** [May 20, 2013, 3:22pm UTC](https://forum.ansible.com/t/removing-an-host-out-of-playbook-execution/12834 "2013-05-20T15:22:02Z")

</div>

Thank you! This worked perfectly. wrt to “False”, I am using Ruby as my module, and when I have a variable returning false, Ansible appears to change this to a string “False”. I’ll keep playing with it to see why this i…

---

## [Removing an host out of playbook execution](https://forum.ansible.com/t/removing-an-host-out-of-playbook-execution/12832)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [May 20, 2013, 3:13pm UTC](https://forum.ansible.com/t/removing-an-host-out-of-playbook-execution/12832 "2013-05-20T15:13:21Z")

</div>

Something like this will take it out of rotation for all remaining plays: note that I’m assuming False shouldn’t be a String here tasks: fail: msg=“missing IP address on host” when: not myswitch.ipaddr

---

## [some guidance with roles](https://forum.ansible.com/t/some-guidance-with-roles/12829)

<div class="topic-metadata">

**Author:** [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Replies:** 7\
**Last updated:** [May 20, 2013, 1:03pm UTC](https://forum.ansible.com/t/some-guidance-with-roles/12829 "2013-05-20T13:03:00Z")

</div>

Hi, Im using Ansible 1.2 latest dev release and trying the new feature of roles in order to migrate all of our infrastructure code from a specific vendor cloud manager to Ansible. In our existing infrastructure we use “…

---

## [complex variable lists with file contents](https://forum.ansible.com/t/complex-variable-lists-with-file-contents/12830)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [May 20, 2013, 1:37am UTC](https://forum.ansible.com/t/complex-variable-lists-with-file-contents/12830 "2013-05-20T01:37:02Z")

</div>

Ok, so since you are doing “{{” this means you are already using Ansible 1.2. It is therefore much easier to just use all of the 1.2 syntax and stop using the old “$foo”. This would make your example like this: name:…

---

## [1.2 release timetable](https://forum.ansible.com/t/1-2-release-timetable/12827)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [May 18, 2013, 8:57pm UTC](https://forum.ansible.com/t/1-2-release-timetable/12827 "2013-05-18T20:57:30Z")

</div>

Hi everyone, Officially Ansible 1/2 was time-scheduled for around 6/1 (the every two months mark). As we’ve added a lot of new things to 1.2, I’d like to give it a little more time than that. I am planning to release o…

---

## [file exists check with only\_if](https://forum.ansible.com/t/file-exists-check-with-only-if/12818)

<div class="topic-metadata">

**Author:** [@shirou](https://forum.ansible.com/u/shirou)\
**Replies:** 4\
**Last updated:** [May 18, 2013, 7:31pm UTC](https://forum.ansible.com/t/file-exists-check-with-only-if/12818 "2013-05-18T19:31:23Z")

</div>

Hello, In order to make a command task idempotence, I want to check a file exists by using "only\_if" something like this - name: do something command: do\_something.sh only\_if: not os.path.exists("result.file") I…

---

## [Problem with installation](https://forum.ansible.com/t/problem-with-installation/12823)

<div class="topic-metadata">

**Author:** [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Replies:** 3\
**Last updated:** [May 17, 2013, 9:41pm UTC](https://forum.ansible.com/t/problem-with-installation/12823 "2013-05-17T21:41:19Z")

</div>

Looks like your system cannot resolve the hosts. What do you get when you query those hostnames locally? If your system cannot query those hostnames you may have to put the ip’s in the hosts file like so: ansible-node1 …

---

## [handling failure to ssh?](https://forum.ansible.com/t/handling-failure-to-ssh/12816)

<div class="topic-metadata">

**Author:** [@David\_Birdsong](https://forum.ansible.com/u/David_Birdsong)\
**Replies:** 3\
**Last updated:** [May 17, 2013, 8:15pm UTC](https://forum.ansible.com/t/handling-failure-to-ssh/12816 "2013-05-17T20:15:31Z")

</div>

I’m trying to figure out a good way to bootstrap both my ec2 machines and my datacenter hardware machines. The basic bootstrap is: create an admin group create N users of which I am a member (last part is relavant sinc…

---

## [Problem with installation](https://forum.ansible.com/t/problem-with-installation/12821)

<div class="topic-metadata">

**Author:** [@Jean\_Paul\_Manjarres](https://forum.ansible.com/u/Jean_Paul_Manjarres)\
**Replies:** 2\
**Last updated:** [May 17, 2013, 7:24pm UTC](https://forum.ansible.com/t/problem-with-installation/12821 "2013-05-17T19:24:20Z")

</div>

I found the answer, it seems that i wasn’t allowed to use hostnames in the Ansible hosts file (don’t know why) . I changed to IP’s and now is working.

---

## [A catch-22 in the ec2 provisioning examples (plugins/inventory/ec2.py doesn't allow for local host)](https://forum.ansible.com/t/a-catch-22-in-the-ec2-provisioning-examples-plugins-inventory-ec2-py-doesnt-allow-for-local-host/12822)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 0\
**Last updated:** [May 17, 2013, 7:01pm UTC](https://forum.ansible.com/t/a-catch-22-in-the-ec2-provisioning-examples-plugins-inventory-ec2-py-doesnt-allow-for-local-host/12822 "2013-05-17T19:01:31Z")

</div>

We already addressed this on in an IRC conversation. You need to run provisioning playbooks when you want new nodes, and the provisioning playbook uses the ‘add-host’ module to add it to dynamic inventory, then there is…

---

## [Using dictionary keys as a list in with\_items](https://forum.ansible.com/t/using-dictionary-keys-as-a-list-in-with-items/12820)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Replies:** 0\
**Last updated:** [May 17, 2013, 7:00pm UTC](https://forum.ansible.com/t/using-dictionary-keys-as-a-list-in-with-items/12820 "2013-05-17T19:00:10Z")

</div>

You should use the wait\_for module to wait on the guests until they are running.

---

## [Value of \`changed\` after a "search and remplace using \`sed\`?](https://forum.ansible.com/t/value-of-changed-after-a-search-and-remplace-using-sed/12817)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 3\
**Last updated:** [May 17, 2013, 5:51pm UTC](https://forum.ansible.com/t/value-of-changed-after-a-search-and-remplace-using-sed/12817 "2013-05-17T17:51:11Z")

</div>

It returns changed=True because it had to run the command. You could precede the task with a “grep” command using “register” and attach a “when” to your task to conditionally decide to not run it, sure, but a even bette…

---

## [Combining with\_items with "when:".](https://forum.ansible.com/t/combining-with-items-with-when/12813)

<div class="topic-metadata">

**Author:** [@Lester\_Wade](https://forum.ansible.com/u/Lester_Wade)\
**Replies:** 5\
**Last updated:** [May 17, 2013, 5:11am UTC](https://forum.ansible.com/t/combining-with-items-with-when/12813 "2013-05-17T05:11:31Z")

</div>

Tried encapsulating it in " "? when: {{ omgeving }} == “{{ europort.environment }}”

---

## [supporting alternate install path for library files.](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811)

<div class="topic-metadata">

**Author:** [@Timothy\_Appnel](https://forum.ansible.com/u/Timothy_Appnel)\
**Replies:** 2\
**Last updated:** [May 16, 2013, 10:47pm UTC](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811 "2013-05-16T22:47:34Z")

</div>

Some months ago I had a problem installing Ansible at work because of our non-standard Linux setup. setup.py tries to install them to /usr/share regardless of standard --home and --root overrides. More details in the pul…

---

## [Suppress paramiko logging](https://forum.ansible.com/t/suppress-paramiko-logging/12814)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [May 16, 2013, 10:33pm UTC](https://forum.ansible.com/t/suppress-paramiko-logging/12814 "2013-05-16T22:33:45Z")

</div>

Sure, you should definitely submit a pull request through github. Github has a very good writeup of how to do this here: https://help.github.com/articles/using-pull-requests

---

## [Args for Custom Module](https://forum.ansible.com/t/args-for-custom-module/12812)

<div class="topic-metadata">

**Author:** [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Replies:** 3\
**Last updated:** [May 16, 2013, 9:49pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812 "2013-05-16T21:49:54Z")

</div>

​Set the optional item to an empty string?​ with\_items: - name: name1 other: value1 - name: name2 other: ​​

---

## [fcntl.flock error after ansible installation under Solaris10 x86](https://forum.ansible.com/t/fcntl-flock-error-after-ansible-installation-under-solaris10-x86/12809)

<div class="topic-metadata">

**Author:** [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Replies:** 12\
**Last updated:** [May 16, 2013, 12:11pm UTC](https://forum.ansible.com/t/fcntl-flock-error-after-ansible-installation-under-solaris10-x86/12809 "2013-05-16T12:11:46Z")

</div>

Can you check if you have TMPDIR, TEMP or TMP env variables set? Code assumes it successfully creates file in tmp dir (but this can fail), this uses python's tempfile.gettempdir.

---

## [Error when installing package with 'apt' module, not so when installing directly](https://forum.ansible.com/t/error-when-installing-package-with-apt-module-not-so-when-installing-directly/12102)

<div class="topic-metadata">

**Author:** [@Harm\_Aarts](https://forum.ansible.com/u/Harm_Aarts)\
**Replies:** 21\
**Last updated:** [May 16, 2013, 2:38am UTC](https://forum.ansible.com/t/error-when-installing-package-with-apt-module-not-so-when-installing-directly/12102 "2013-05-16T02:38:37Z")

</div>

Dear list, I’ve run into a puzzling issue. I’m creating a playbook to install Crashplan on my Raspberry Pi. On of the steps involves installing the Java lib “libjna-java”. This does not work: PLAY \[pi\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Value of 'inject' param in lookup plugins](https://forum.ansible.com/t/value-of-inject-param-in-lookup-plugins/12810)

<div class="topic-metadata">

**Author:** [@Darren\_Worrall](https://forum.ansible.com/u/Darren_Worrall)\
**Replies:** 3\
**Last updated:** [May 15, 2013, 8:01pm UTC](https://forum.ansible.com/t/value-of-inject-param-in-lookup-plugins/12810 "2013-05-15T20:01:17Z")

</div>

Is it expected that lookup plugins get a different value for ‘inject’ depending on how they’re called in a playbook? Here’s a simple test case: https://gist.github.com/DazWorrall/5584358 - in the first case, ‘inject’ is …

---

## [What is the difference with action: and without in a task?](https://forum.ansible.com/t/what-is-the-difference-with-action-and-without-in-a-task/12808)

<div class="topic-metadata">

**Author:** [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Replies:** 0\
**Last updated:** [May 15, 2013, 2:23pm UTC](https://forum.ansible.com/t/what-is-the-difference-with-action-and-without-in-a-task/12808 "2013-05-15T14:23:00Z")

</div>

​None. Leaving out "action:" is a shortcut notation. (Which you cannot do e.g. when doing a local\_action:​) Serge

---

## [Free online Ansible 3-hour quickstart class on 5/22](https://forum.ansible.com/t/free-online-ansible-3-hour-quickstart-class-on-5-22/12807)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 0\
**Last updated:** [May 15, 2013, 1:54pm UTC](https://forum.ansible.com/t/free-online-ansible-3-hour-quickstart-class-on-5-22/12807 "2013-05-15T13:54:47Z")

</div>

Hi everyone, This is a quick reminder that we are having a free class on Ansible things on 5/22. You can sign up here: http://www.ansibleworks.com/quickstart/ (There should be other times if this time isn’t timezone-…

---

## [Default "changed" state for notification modules](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806)

<div class="topic-metadata">

**Author:** [@Matt\_Coddington](https://forum.ansible.com/u/Matt_Coddington)\
**Replies:** 4\
**Last updated:** [May 14, 2013, 10:31pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806 "2013-05-14T22:31:04Z")

</div>

Hi all, I was looking at all the new notification modules and they generally appear to exit with changed=True. The except is the mail module which exits with changed=false. Initially I was thinking mail should just be u…

---

## [how to remove user from a group](https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805)

<div class="topic-metadata">

**Author:** [@Hudec\_Peter](https://forum.ansible.com/u/Hudec_Peter)\
**Replies:** 1\
**Last updated:** [May 14, 2013, 12:18pm UTC](https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805 "2013-05-14T12:18:08Z")

</div>

Hi all, I'm tryning to remove user from group if the user is in the group. The user module is not able to do this normal way, there is no flag user should not be in this group. In my scenarios the users are in sever…

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

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