# Latest

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

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

**Page:** 885

---

## [lookup("template") but only if template exists](https://forum.ansible.com/t/lookup-template-but-only-if-template-exists/17819)

<div class="topic-metadata">

**Author:** [@Bret\_Martin](https://forum.ansible.com/u/Bret_Martin)\
**Replies:** 0\
**Last updated:** [March 23, 2015, 8:12pm UTC](https://forum.ansible.com/t/lookup-template-but-only-if-template-exists/17819 "2015-03-23T20:12:33Z")

</div>

I used to be able to do this in order to construct EC2 instance user data from a template, but only if the template file existed – otherwise, leave the user data empty. name: create {{ description }} instance ec2: \[……

---

## [Dynamic conditionals via with\_items](https://forum.ansible.com/t/dynamic-conditionals-via-with-items/17818)

<div class="topic-metadata">

**Author:** [@Bruce\_Pennypacker](https://forum.ansible.com/u/Bruce_Pennypacker)\
**Replies:** 0\
**Last updated:** [March 23, 2015, 7:47pm UTC](https://forum.ansible.com/t/dynamic-conditionals-via-with-items/17818 "2015-03-23T19:47:14Z")

</div>

We have a role that’s designed to install & configure nagios in one of our myriad environments. I’m in the process of getting it to work in a new environment. One of the tasks in this role installs a bunch of common nagi…

---

## [which syntax is right for latest ansible](https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 1\
**Last updated:** [March 23, 2015, 6:36pm UTC](https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816 "2015-03-23T18:36:55Z")

</div>

Which syntax is correct for latest ansible? for example: sudo: True or sudo: yes Although both are working fine, but which is the recommended way from latest ansible? using True/False or yes/no? Thanks,

---

## [Ansible 1.8.2 Error whilst debugging variable.stdout - "A variable inserted a new parameter into the module args"](https://forum.ansible.com/t/ansible-1-8-2-error-whilst-debugging-variable-stdout-a-variable-inserted-a-new-parameter-into-the-module-args/17811)

<div class="topic-metadata">

**Author:** [@Mike\_S](https://forum.ansible.com/u/Mike_S)\
**Replies:** 3\
**Last updated:** [March 23, 2015, 6:26pm UTC](https://forum.ansible.com/t/ansible-1-8-2-error-whilst-debugging-variable-stdout-a-variable-inserted-a-new-parameter-into-the-module-args/17811 "2015-03-23T18:26:35Z")

</div>

Hi all, I’ve detailed this issue here https://github.com/ansible/ansible/issues/10519 To summarise, this was my task, \` - name: Build base image shell: docker build -t {{docker\_image\_namespace}}/trusty-base {{docke…

---

## [ec2 elb set subnets from vpc return value](https://forum.ansible.com/t/ec2-elb-set-subnets-from-vpc-return-value/16117)

<div class="topic-metadata">

**Author:** [@itarchmerc](https://forum.ansible.com/u/itarchmerc)\
**Replies:** 10\
**Last updated:** [March 23, 2015, 3:57pm UTC](https://forum.ansible.com/t/ec2-elb-set-subnets-from-vpc-return-value/16117 "2015-03-23T15:57:31Z")

</div>

I have a playbook that creates a VPC with multiple subnets which works fine. I then have a playbook that tries to create an ELB and I need to set the subnets to 2 of the subnets returned from the vpc creation. There are …

---

## [Ansible Inventory and daemonize](https://forum.ansible.com/t/ansible-inventory-and-daemonize/17812)

<div class="topic-metadata">

**Author:** [@Adham\_H](https://forum.ansible.com/u/Adham_H)\
**Replies:** 1\
**Last updated:** [March 23, 2015, 3:43pm UTC](https://forum.ansible.com/t/ansible-inventory-and-daemonize/17812 "2015-03-23T15:43:30Z")

</div>

Hi, I created an ansible inventory script for joyent. The script does smart caching where it can serve from cache and create a daemon thats does an API to update cache. The script uses “daemonize” to create a backgroun…

---

## [Error with installing elasticsearch plugins using shell or command](https://forum.ansible.com/t/error-with-installing-elasticsearch-plugins-using-shell-or-command/17805)

<div class="topic-metadata">

**Author:** [@Greg\_Levine](https://forum.ansible.com/u/Greg_Levine)\
**Replies:** 4\
**Last updated:** [March 23, 2015, 2:51pm UTC](https://forum.ansible.com/t/error-with-installing-elasticsearch-plugins-using-shell-or-command/17805 "2015-03-23T14:51:15Z")

</div>

I posted the following question to SO. TIA for any guidance that you may be able to provide. http://stackoverflow.com/questions/29190666/what-does-this-ansible-error-mean

---

## [VPC redefine: TypeError: string indices must be integers, not str](https://forum.ansible.com/t/vpc-redefine-typeerror-string-indices-must-be-integers-not-str/17810)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 0\
**Last updated:** [March 23, 2015, 9:40am UTC](https://forum.ansible.com/t/vpc-redefine-typeerror-string-indices-must-be-integers-not-str/17810 "2015-03-23T09:40:05Z")

</div>

Hi Everyone, I am need of help to make it work in order to add the nat instance id as gw for private subnet inside the routing table. Here is my vpc playbook: /tasks/vpc.yml

---

## [Dynamic inventory doesn't include private EC2 instances](https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807)

<div class="topic-metadata">

**Author:** [@Brenda\_Bell](https://forum.ansible.com/u/Brenda_Bell)\
**Replies:** 1\
**Last updated:** [March 23, 2015, 1:40am UTC](https://forum.ansible.com/t/dynamic-inventory-doesnt-include-private-ec2-instances/17807 "2015-03-23T01:40:34Z")

</div>

I’ve refreshed my cache using ec2.py --refresh-cache. When I run ec2.py --list, it only lists the public instances. My AWS infrastructure has three public servers (one being a jump server) and several private ones. I wa…

---

## [Missing a split function in Jinja](https://forum.ansible.com/t/missing-a-split-function-in-jinja/17806)

<div class="topic-metadata">

**Author:** [@Patrick\_Ogenstad](https://forum.ansible.com/u/Patrick_Ogenstad)\
**Replies:** 2\
**Last updated:** [March 22, 2015, 4:26pm UTC](https://forum.ansible.com/t/missing-a-split-function-in-jinja/17806 "2015-03-22T16:26:44Z")

</div>

Hi, I’m setting up a new test network and had some plans for how I wanted to setup DNS. However I ran into a brick wall since Jinja doesn’t have a split function. However I found that Ansible has it’s own Jinja functio…

---

## [Sync folder from remote permissions denied](https://forum.ansible.com/t/sync-folder-from-remote-permissions-denied/17804)

<div class="topic-metadata">

**Author:** [@Anatol](https://forum.ansible.com/u/Anatol)\
**Replies:** 1\
**Last updated:** [March 21, 2015, 4:35pm UTC](https://forum.ansible.com/t/sync-folder-from-remote-permissions-denied/17804 "2015-03-21T16:35:31Z")

</div>

Hi, I´d like to sync logfiles from a remote ubuntu 12.04 server to my local computer: That´s what my Playbook looks like: \` hosts: “{{targets}}” vars: remote\_user: “{{username}}” tasks: name: Synchronize log …

---

## [Playbook inclusion and Host Intersections](https://forum.ansible.com/t/playbook-inclusion-and-host-intersections/17803)

<div class="topic-metadata">

**Author:** [@Alan\_Ray](https://forum.ansible.com/u/Alan_Ray)\
**Replies:** 1\
**Last updated:** [March 21, 2015, 1:49am UTC](https://forum.ansible.com/t/playbook-inclusion-and-host-intersections/17803 "2015-03-21T01:49:05Z")

</div>

I’m trying to figure out how to make includable playbooks that Work like normal playbooks when run via ansible, running an a group of hosts Only run on the group of hosts from (1) that intersects with the hosts of the …

---

## [String manipulation ansible.](https://forum.ansible.com/t/string-manipulation-ansible/17802)

<div class="topic-metadata">

**Author:** [@Antoine\_Voiry](https://forum.ansible.com/u/Antoine_Voiry)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 11:25pm UTC](https://forum.ansible.com/t/string-manipulation-ansible/17802 "2015-03-20T23:25:48Z")

</div>

Hello, I would like to change a file based on the lower case of a variable. How do I do that? I tried name: replace string in file replace: dest=‘{{base\_dir}}/{{lower(attribute\_name)}}.file.properties’ regexp=‘CHAN…

---

## [Ansible 1.9.0 rc2 is now available](https://forum.ansible.com/t/ansible-1-9-0-rc2-is-now-available/17801)

<div class="topic-metadata">

**Author:** [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 8:43pm UTC](https://forum.ansible.com/t/ansible-1-9-0-rc2-is-now-available/17801 "2015-03-20T20:43:09Z")

</div>

Hi all, we’ve just tagged the rc2 release for 1.9 To test from source, simply clone the git repository (if you haven’t already) and do the following: $ git checkout v1.9.0-0.2.rc2 $ . hacking/env-setup After which ti…

---

## [Ansible command line](https://forum.ansible.com/t/ansible-command-line/17797)

<div class="topic-metadata">

**Author:** [@nebular.wolf](https://forum.ansible.com/u/nebular.wolf)\
**Replies:** 3\
**Last updated:** [March 20, 2015, 7:51pm UTC](https://forum.ansible.com/t/ansible-command-line/17797 "2015-03-20T19:51:14Z")

</div>

Is there a way to get the command line used to invoke ansible from a playbook/role. After the playbook is completed I’d like to send a notification (Email, Hipchat, etc) to a group with the details of what was run and h…

---

## [Referencing files of depending role in meta/main.yml](https://forum.ansible.com/t/referencing-files-of-depending-role-in-meta-main-yml/17796)

<div class="topic-metadata">

**Author:** [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 7:42pm UTC](https://forum.ansible.com/t/referencing-files-of-depending-role-in-meta-main-yml/17796 "2015-03-20T19:42:53Z")

</div>

Hello, say I have two roles a and b: roles/a/defaults/main.yml

---

## [Role inclusion mechanics](https://forum.ansible.com/t/role-inclusion-mechanics/17799)

<div class="topic-metadata">

**Author:** [@nuwan.ag](https://forum.ansible.com/u/nuwan.ag)\
**Replies:** 2\
**Last updated:** [March 20, 2015, 4:37pm UTC](https://forum.ansible.com/t/role-inclusion-mechanics/17799 "2015-03-20T16:37:25Z")

</div>

Hi, I’d like to make a feature request wrt to role dependencies. Currently, role dependencies must be defined via the dependencies section in meta/main.yaml and always execute prior to the tasks in the parent role. Howe…

---

## [Docker module state argument](https://forum.ansible.com/t/docker-module-state-argument/17800)

<div class="topic-metadata">

**Author:** [@cselden](https://forum.ansible.com/u/cselden)\
**Replies:** 2\
**Last updated:** [March 20, 2015, 4:08pm UTC](https://forum.ansible.com/t/docker-module-state-argument/17800 "2015-03-20T16:08:45Z")

</div>

Community, I’m using the docker module and the documentation appears to be wrong. I’m not sure where the right place is to bring this up. I’m running ansible version 1.8.2. Ansible Documentation: http://docs.ansible.…

---

## [Accessing elements in a list](https://forum.ansible.com/t/accessing-elements-in-a-list/17790)

<div class="topic-metadata">

**Author:** [@David\_Vosbury](https://forum.ansible.com/u/David_Vosbury)\
**Replies:** 8\
**Last updated:** [March 20, 2015, 3:15pm UTC](https://forum.ansible.com/t/accessing-elements-in-a-list/17790 "2015-03-20T15:15:23Z")

</div>

I’m not sure if this is the right mailing list group to ask general questions or if this is just for developers. If not, then let me know what the correct group is. Anyway, my question is I’m trying to update some old pl…

---

## [How to run ansible command in php code but it not working](https://forum.ansible.com/t/how-to-run-ansible-command-in-php-code-but-it-not-working/17771)

<div class="topic-metadata">

**Author:** [@Be\_T\_p\_Code](https://forum.ansible.com/u/Be_T_p_Code)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 2:16pm UTC](https://forum.ansible.com/t/how-to-run-ansible-command-in-php-code-but-it-not-working/17771 "2015-03-20T14:16:39Z")

</div>

Hi All ! I’m build web ui view and i want to running ansible command with php . for example: \<?php $output = system("ansible host -m ping"); ?\> But it not working, Please help me. Thanks !

---

## ["unrecognized service" for custom upstart script on CentOS 6.5](https://forum.ansible.com/t/unrecognized-service-for-custom-upstart-script-on-centos-6-5/17795)

<div class="topic-metadata">

**Author:** [@Skyler\_Slade](https://forum.ansible.com/u/Skyler_Slade)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 1:21pm UTC](https://forum.ansible.com/t/unrecognized-service-for-custom-upstart-script-on-centos-6-5/17795 "2015-03-20T13:21:08Z")

</div>

I have a custom upstart script that starts, stops, and restarts successfully via initctl but when Ansible attempts the same, it errors with the message “unrecognized service”. I’ve seen https://github.com/ansible/ansibl…

---

## [Using win\_feature to add multiple features does not appear to work](https://forum.ansible.com/t/using-win-feature-to-add-multiple-features-does-not-appear-to-work/17788)

<div class="topic-metadata">

**Author:** [@Ian\_Clegg](https://forum.ansible.com/u/Ian_Clegg)\
**Replies:** 1\
**Last updated:** [March 20, 2015, 10:52am UTC](https://forum.ansible.com/t/using-win-feature-to-add-multiple-features-does-not-appear-to-work/17788 "2015-03-20T10:52:41Z")

</div>

Hi all, According to the documentation it should be possible to install multiple windows features at once by comma separating them using the win\_feature module: http://docs.ansible.com/win\_feature\_module.htm $ ansible…

---

## [Issues with sudo\_user](https://forum.ansible.com/t/issues-with-sudo-user/17772)

<div class="topic-metadata">

**Author:** [@Jacek](https://forum.ansible.com/u/Jacek)\
**Replies:** 14\
**Last updated:** [March 19, 2015, 8:01pm UTC](https://forum.ansible.com/t/issues-with-sudo-user/17772 "2015-03-19T20:01:21Z")

</div>

Hi, I’m using “ansible 1.9 (devel b11be68249) last updated 2015/03/17 12:39:00 (GMT +000)” and am facing an issue with the ‘sudo\_user’ switch. My role fails on the postgres user not being able to be authenticated. The…

---

## [Kerberos domain authentication for Windows hosts](https://forum.ansible.com/t/kerberos-domain-authentication-for-windows-hosts/16205)

<div class="topic-metadata">

**Author:** [@Nicolas\_Deslandes](https://forum.ansible.com/u/Nicolas_Deslandes)\
**Replies:** 31\
**Last updated:** [March 19, 2015, 6:39pm UTC](https://forum.ansible.com/t/kerberos-domain-authentication-for-windows-hosts/16205 "2015-03-19T18:39:45Z")

</div>

Hi, I’ve been looking at adding support for Kerberos for deployments to Windows hosts in Ansible/Ansible Tower. There are 2 open PR on the subject: #8345: Suppport for kerberos\\domain authentication for winrm #8914…

---

## [File/directory change detection in Ansible?](https://forum.ansible.com/t/file-directory-change-detection-in-ansible/17792)

<div class="topic-metadata">

**Author:** [@techtacho](https://forum.ansible.com/u/techtacho)\
**Replies:** 1\
**Last updated:** [March 19, 2015, 6:03pm UTC](https://forum.ansible.com/t/file-directory-change-detection-in-ansible/17792 "2015-03-19T18:03:51Z")

</div>

Hello, I am interested in migrating over to Ansible. However, currently I use cfengine3, and one of the important features is the ability to detect changes to files and directories. The cfengine agent can monitor file c…

---

## [Take the Ansible Community Survey](https://forum.ansible.com/t/take-the-ansible-community-survey/17793)

<div class="topic-metadata">

**Author:** [@Bill\_Nottingham](https://forum.ansible.com/u/Bill_Nottingham)\
**Replies:** 0\
**Last updated:** [March 19, 2015, 5:31pm UTC](https://forum.ansible.com/t/take-the-ansible-community-survey/17793 "2015-03-19T17:31:54Z")

</div>

Hi all - You may have seen this already under different cover, but we’re running one of our usual Ansible user surveys again - collecting some basic data from our Ansible users, such as how you get Ansible, your deploym…

---

## [postgresql\_user and granting select on pg\_stat\_database](https://forum.ansible.com/t/postgresql-user-and-granting-select-on-pg-stat-database/17782)

<div class="topic-metadata">

**Author:** [@Brent\_Clark](https://forum.ansible.com/u/Brent_Clark)\
**Replies:** 3\
**Last updated:** [March 19, 2015, 4:50pm UTC](https://forum.ansible.com/t/postgresql-user-and-granting-select-on-pg-stat-database/17782 "2015-03-19T16:50:10Z")

</div>

Hello, I am trying to use the postgresql\_user function to create and grant privs on the user. Im getting failure messages relating to the priv. postgresql\_user: name=bobby password={{ pg\_dd\_password }} db=pg\_stat\_data…

---

## [Gathering list of unique variable values and number of servers with each value](https://forum.ansible.com/t/gathering-list-of-unique-variable-values-and-number-of-servers-with-each-value/17780)

<div class="topic-metadata">

**Author:** [@js12](https://forum.ansible.com/u/js12)\
**Replies:** 5\
**Last updated:** [March 19, 2015, 3:22pm UTC](https://forum.ansible.com/t/gathering-list-of-unique-variable-values-and-number-of-servers-with-each-value/17780 "2015-03-19T15:22:13Z")

</div>

Hi, I have an inventory file set up like this: \[loc1\] server1 server2 \[loc1:vars\] loc\_name=“location1” \[loc2\] server3 \[loc2:vars\] loc\_name=“location2” \[loc3\] server4 server5 server6 \[loc3:vars\] loc\_name=“…

---

## [Accessing elements in a list from a playbook](https://forum.ansible.com/t/accessing-elements-in-a-list-from-a-playbook/17789)

<div class="topic-metadata">

**Author:** [@David\_Vosbury](https://forum.ansible.com/u/David_Vosbury)\
**Replies:** 0\
**Last updated:** [March 19, 2015, 2:42pm UTC](https://forum.ansible.com/t/accessing-elements-in-a-list-from-a-playbook/17789 "2015-03-19T14:42:26Z")

</div>

I’m not sure if this is the right mailing list group to ask general questions or if this is just for developers. If not, then let me know what the correct group is. Anyway, my question is I’m trying to update some old pl…

---

## [version\_compare not working](https://forum.ansible.com/t/version-compare-not-working/17745)

<div class="topic-metadata">

**Author:** [@Rick\_Kasten](https://forum.ansible.com/u/Rick_Kasten)\
**Replies:** 2\
**Last updated:** [March 19, 2015, 2:36pm UTC](https://forum.ansible.com/t/version-compare-not-working/17745 "2015-03-19T14:36:28Z")

</div>

This is doing the complete opposite of matching, right? TASK: \[play | debug var=installed\_app\_version\] \*\*\* \<10.101.1.105\> ok: \[twp01\] =\> { “installed\_app\_version”: “5.4.0” } TASK: \[play | debug var=package\_versions…

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

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