# Latest

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

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

**Page:** 908

---

## [Can only add one host to a dynamic group](https://forum.ansible.com/t/can-only-add-one-host-to-a-dynamic-group/14839)

<div class="topic-metadata">

**Author:** [@Juergen\_Brendel](https://forum.ansible.com/u/Juergen_Brendel)\
**Replies:** 3\
**Last updated:** [December 24, 2014, 8:53pm UTC](https://forum.ansible.com/t/can-only-add-one-host-to-a-dynamic-group/14839 "2014-12-24T20:53:05Z")

</div>

Hello! I’m deploying a cluster of app-servers behind a load balancer. When an appserver has been installed - and has passed some basic tests - I would like to add it to a dynamic group. Later, in the nginx (the load bal…

---

## [negating  a command](https://forum.ansible.com/t/negating-a-command/17111)

<div class="topic-metadata">

**Author:** [@rambius](https://forum.ansible.com/u/rambius)\
**Replies:** 2\
**Last updated:** [December 24, 2014, 5:57pm UTC](https://forum.ansible.com/t/negating-a-command/17111 "2014-12-24T17:57:47Z")

</div>

Hello, I am new to ansible and I am experimenting with a simple playbook I created. My question is how to negate the return code of a command. I use pgrep to check if a server is running and if it is not running I will …

---

## [Some jinja filters don't work in host pattern](https://forum.ansible.com/t/some-jinja-filters-dont-work-in-host-pattern/17141)

<div class="topic-metadata">

**Author:** [@Raghu\_Udiyar](https://forum.ansible.com/u/Raghu_Udiyar)\
**Replies:** 4\
**Last updated:** [December 24, 2014, 4:05pm UTC](https://forum.ansible.com/t/some-jinja-filters-dont-work-in-host-pattern/17141 "2014-12-24T16:05:13Z")

</div>

Hello, I’m trying to work on a requirement to have the host pattern change depending on certain host groups or parameters being passed to the playbook : This is what I need exactly : When an external var cli\_hosts i…

---

## [How to obtain a value from one host in a play, and apply the value on another host.](https://forum.ansible.com/t/how-to-obtain-a-value-from-one-host-in-a-play-and-apply-the-value-on-another-host/17142)

<div class="topic-metadata">

**Author:** [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Replies:** 4\
**Last updated:** [December 24, 2014, 2:33pm UTC](https://forum.ansible.com/t/how-to-obtain-a-value-from-one-host-in-a-play-and-apply-the-value-on-another-host/17142 "2014-12-24T14:33:44Z")

</div>

I am trying to orchestrate a database replication setup. This means I need to read configuration details from the master node, and apply this on the slave to facilitate the replication setup. I try to read a configurati…

---

## [Keyword in playbook to include vault](https://forum.ansible.com/t/keyword-in-playbook-to-include-vault/17139)

<div class="topic-metadata">

**Author:** [@Andrew\_Martin](https://forum.ansible.com/u/Andrew_Martin)\
**Replies:** 1\
**Last updated:** [December 24, 2014, 1:28pm UTC](https://forum.ansible.com/t/keyword-in-playbook-to-include-vault/17139 "2014-12-24T13:28:25Z")

</div>

Is there a way to have a playbook for a particular server know to prompt for a vault password automatically, rather than needing to pass --ask-vault-pass on the command line? I only store encrypted information in a vault…

---

## [Feature request: rebuild in rax module](https://forum.ansible.com/t/feature-request-rebuild-in-rax-module/17140)

<div class="topic-metadata">

**Author:** [@Miguel\_David](https://forum.ansible.com/u/Miguel_David)\
**Replies:** 0\
**Last updated:** [December 24, 2014, 10:54am UTC](https://forum.ansible.com/t/feature-request-rebuild-in-rax-module/17140 "2014-12-24T10:54:02Z")

</div>

Hi, Could we possibly add a rebuild function to the rax module (usually at /usr/share/ansible/cloud/rax)? In Rackspace if a cloud server is deleted and a new one is created the IP is “lost” (i.e. re-assigned to another…

---

## [Creating subgroup of ec2 dynamic inventory](https://forum.ansible.com/t/creating-subgroup-of-ec2-dynamic-inventory/15196)

<div class="topic-metadata">

**Author:** [@igorc](https://forum.ansible.com/u/igorc)\
**Replies:** 3\
**Last updated:** [December 24, 2014, 4:57am UTC](https://forum.ansible.com/t/creating-subgroup-of-ec2-dynamic-inventory/15196 "2014-12-24T04:57:36Z")

</div>

Hi all, I have the following playbook trying to create a subgroup out of my ec2 dynamic inventory with instances matching given tags:

---

## [script module for powershell](https://forum.ansible.com/t/script-module-for-powershell/17127)

<div class="topic-metadata">

**Author:** [@Nicholas\_O\_Connor](https://forum.ansible.com/u/Nicholas_O_Connor)\
**Replies:** 4\
**Last updated:** [December 23, 2014, 8:43pm UTC](https://forum.ansible.com/t/script-module-for-powershell/17127 "2014-12-23T20:43:55Z")

</div>

I’m seeing some very inconsistent results when trying to run a Powershell script. through the script module. I can’t quite pinpoint it yet but I think it has to do when I run an external application, through Powershell. …

---

## [Limiting a Task execution on a subset of the host](https://forum.ansible.com/t/limiting-a-task-execution-on-a-subset-of-the-host/17134)

<div class="topic-metadata">

**Author:** [@Ritesh\_Shetty](https://forum.ansible.com/u/Ritesh_Shetty)\
**Replies:** 2\
**Last updated:** [December 23, 2014, 8:20pm UTC](https://forum.ansible.com/t/limiting-a-task-execution-on-a-subset-of-the-host/17134 "2014-12-23T20:20:48Z")

</div>

Hi, I have my /etc/ansible/hosts file as \[managementnodes\] 192.168.56.103 192.168.56.104 192.168.56.101 I am calling the playbook as below ansible-playbook testplaybook.yml --extra-vars=“target\_host=managementnode…

---

## [Possible to use a variable value for the playbook "hosts" attribute?](https://forum.ansible.com/t/possible-to-use-a-variable-value-for-the-playbook-hosts-attribute/17137)

<div class="topic-metadata">

**Author:** [@JD11](https://forum.ansible.com/u/JD11)\
**Replies:** 4\
**Last updated:** [December 23, 2014, 7:58pm UTC](https://forum.ansible.com/t/possible-to-use-a-variable-value-for-the-playbook-hosts-attribute/17137 "2014-12-23T19:58:17Z")

</div>

Hi ! I would like to use a variable value for the playbook “hosts” clause, eg.: name: PLAY\_NAME hosts: “{{myvariable}}” sudo: yes tasks: … where the variable is defined elsewhere as eg.: myvariable: “1.domain.com…

---

## [1.8 breaks previously documented behaviour of playbook level vars](https://forum.ansible.com/t/1-8-breaks-previously-documented-behaviour-of-playbook-level-vars/17136)

<div class="topic-metadata">

**Author:** [@Max\_Ivanov](https://forum.ansible.com/u/Max_Ivanov)\
**Replies:** 2\
**Last updated:** [December 23, 2014, 7:52pm UTC](https://forum.ansible.com/t/1-8-breaks-previously-documented-behaviour-of-playbook-level-vars/17136 "2014-12-23T19:52:26Z")

</div>

Hi All, I am writing regarding the https://github.com/ansible/ansible/issues/9877 where different behaviour of playbook level vars was reported for version 1.8. That issue was closed as not a bug, despite the fact that …

---

## [run\_once per group.](https://forum.ansible.com/t/run-once-per-group/17106)

<div class="topic-metadata">

**Author:** [@Nico\_K](https://forum.ansible.com/u/Nico_K)\
**Replies:** 5\
**Last updated:** [December 23, 2014, 7:04pm UTC](https://forum.ansible.com/t/run-once-per-group/17106 "2014-12-23T19:04:31Z")

</div>

Hi, I have groups of hosts that I copy files to, one those files are copied I call a webservice on the groups master; this webservice will call a deployment script. The problem I’m having is that the webservice call wi…

---

## [Running command "when"](https://forum.ansible.com/t/running-command-when/17128)

<div class="topic-metadata">

**Author:** [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Replies:** 1\
**Last updated:** [December 23, 2014, 5:31pm UTC](https://forum.ansible.com/t/running-command-when/17128 "2014-12-23T17:31:23Z")

</div>

Hi, all. I’m an Ansible newbie trying to create a playbook which will: 1) update all packages on a CentOS 6 box via yum, and 2) reboot the server if the kernel has been updated. Here’s my palybook:

---

## [to\_json not working on variable](https://forum.ansible.com/t/to-json-not-working-on-variable/17117)

<div class="topic-metadata">

**Author:** [@Dane\_Lipscombe](https://forum.ansible.com/u/Dane_Lipscombe)\
**Replies:** 3\
**Last updated:** [December 23, 2014, 12:50pm UTC](https://forum.ansible.com/t/to-json-not-working-on-variable/17117 "2014-12-23T12:50:31Z")

</div>

When running ansible v1.8.2, in the below playbook, to\_json fails to handle a basic variable \` name: a play that runs entirely on the ansible host hosts: localhost vars: users: bob joe tasks: no problem debug: m…

---

## [Is there a way to add hosts from a file to inventory\_hosts at the runtime of the playbook?](https://forum.ansible.com/t/is-there-a-way-to-add-hosts-from-a-file-to-inventory-hosts-at-the-runtime-of-the-playbook/17133)

<div class="topic-metadata">

**Author:** [@Fazal-e-Rehman\_Khan](https://forum.ansible.com/u/Fazal-e-Rehman_Khan)\
**Replies:** 1\
**Last updated:** [December 23, 2014, 8:49am UTC](https://forum.ansible.com/t/is-there-a-way-to-add-hosts-from-a-file-to-inventory-hosts-at-the-runtime-of-the-playbook/17133 "2014-12-23T08:49:50Z")

</div>

I have a script that I run at the start of my first play like this. - hosts: localhost local\_action: command python runScript.py It gnerates me a file in roles/abc/vars/main.yml which looks like this. newHosts: - ho…

---

## [Async "Fire and Forget" Issues - Ansible 1.7.1](https://forum.ansible.com/t/async-fire-and-forget-issues-ansible-1-7-1/17113)

<div class="topic-metadata">

**Author:** [@Xavier\_Krantz](https://forum.ansible.com/u/Xavier_Krantz)\
**Replies:** 7\
**Last updated:** [December 23, 2014, 12:26am UTC](https://forum.ansible.com/t/async-fire-and-forget-issues-ansible-1-7-1/17113 "2014-12-23T00:26:06Z")

</div>

Hello, I am trying to use the Async capabilities of ansible to “fire and forget” a job and then check it later and wait till its end. I have followed the example mentioned here : http://docs.ansible.com/playbooks\_async…

---

## [Figuring out EC2 Support 'IAM Role Per Service'](https://forum.ansible.com/t/figuring-out-ec2-support-iam-role-per-service/17129)

<div class="topic-metadata">

**Author:** [@Gary\_Malouf](https://forum.ansible.com/u/Gary_Malouf)\
**Replies:** 0\
**Last updated:** [December 22, 2014, 10:18pm UTC](https://forum.ansible.com/t/figuring-out-ec2-support-iam-role-per-service/17129 "2014-12-22T22:18:59Z")

</div>

We have a setup around creating one IAM role per application. Both within and outside of VPC, can this be managed via the Ansible EC2 modules or is there some additional scripting necessary on my end?

---

## [for loop in template gives error undefined variables: list object has no element](https://forum.ansible.com/t/for-loop-in-template-gives-error-undefined-variables-list-object-has-no-element/17126)

<div class="topic-metadata">

**Author:** [@sivel](https://forum.ansible.com/u/sivel)\
**Replies:** 0\
**Last updated:** [December 22, 2014, 2:55pm UTC](https://forum.ansible.com/t/for-loop-in-template-gives-error-undefined-variables-list-object-has-no-element/17126 "2014-12-22T14:55:20Z")

</div>

I believe you need to make 2 changes: loop.index instead of usenet\_servers\[server\].loop.index And just use server instead usenet\_servers\[server\] everywhere else. server isn’t the index, it is the actual hash/dict.

---

## [for loop in template gives error undefined variables: list object has no element](https://forum.ansible.com/t/for-loop-in-template-gives-error-undefined-variables-list-object-has-no-element/17125)

<div class="topic-metadata">

**Author:** [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Replies:** 0\
**Last updated:** [December 22, 2014, 2:48pm UTC](https://forum.ansible.com/t/for-loop-in-template-gives-error-undefined-variables-list-object-has-no-element/17125 "2014-12-22T14:48:12Z")

</div>

you seem to be trying to use the jinja2 implicit loop.index but you are branching it off of the server dictionary I believe you want: Server{{ usenet\_servers\[server\] + '.' + loop.index }}.Level={{ usenet\_servers\[serv…

---

## [postgresql\_user module: fe\_sendauth: no password supplied](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104)

<div class="topic-metadata">

**Author:** [@Michael\_Shi](https://forum.ansible.com/u/Michael_Shi)\
**Replies:** 2\
**Last updated:** [December 22, 2014, 12:28pm UTC](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104 "2014-12-22T12:28:49Z")

</div>

I’m trying to use the postgresql\_user module, but I keep getting unable to connect to database: fe\_sendauth: no password supplied Doing the same on postgresql\_db module seems to work Is it a problem authenticating as t…

---

## [Problems with Ubuntu install: no modules detected](https://forum.ansible.com/t/problems-with-ubuntu-install-no-modules-detected/17118)

<div class="topic-metadata">

**Author:** [@Bence\_Takacs](https://forum.ansible.com/u/Bence_Takacs)\
**Replies:** 8\
**Last updated:** [December 22, 2014, 8:16am UTC](https://forum.ansible.com/t/problems-with-ubuntu-install-no-modules-detected/17118 "2014-12-22T08:16:49Z")

</div>

Following the official Ubuntu guide (http://docs.ansible.com/intro\_installation.html#latest-releases-via-apt-ubuntu) I experienced the following problem: $ ansible --version ansible 1.9 configured module search path …

---

## [GTID Mysql replication?](https://forum.ansible.com/t/gtid-mysql-replication/17073)

<div class="topic-metadata">

**Author:** [@Evan\_Tahler](https://forum.ansible.com/u/Evan_Tahler)\
**Replies:** 2\
**Last updated:** [December 22, 2014, 12:46am UTC](https://forum.ansible.com/t/gtid-mysql-replication/17073 "2014-12-22T00:46:12Z")

</div>

Hi! Is there any (planned) support for GTID-based replication in the mysql-replication package? It looks like someone started this here, but didn’t get it back into master.

---

## [pip tries to install to /usr/local/ not to my virtualenv](https://forum.ansible.com/t/pip-tries-to-install-to-usr-local-not-to-my-virtualenv/17124)

<div class="topic-metadata">

**Author:** [@Roy\_Smith](https://forum.ansible.com/u/Roy_Smith)\
**Replies:** 1\
**Last updated:** [December 21, 2014, 9:09pm UTC](https://forum.ansible.com/t/pip-tries-to-install-to-usr-local-not-to-my-virtualenv/17124 "2014-12-21T21:09:30Z")

</div>

Local setup: ansible 1.8.2 python 2.7.1 Remote: ansible 1.8.2 python 2.7.6 pip 1.5.4 Playbook:

---

## [when do variables become hostvars ?](https://forum.ansible.com/t/when-do-variables-become-hostvars/13993)

<div class="topic-metadata">

**Author:** [@Jerome\_Wagner](https://forum.ansible.com/u/Jerome_Wagner)\
**Replies:** 2\
**Last updated:** [December 21, 2014, 4:48pm UTC](https://forum.ansible.com/t/when-do-variables-become-hostvars/13993 "2014-12-21T16:48:12Z")

</div>

Hello, some of my plays on hosts need dynamic information from other hosts so I am trying to understand when/which variable in the playbooks become available in hostvars. I undestand that : a variable defined via gat…

---

## [vsphere\_guest](https://forum.ansible.com/t/vsphere-guest/16866)

<div class="topic-metadata">

**Author:** [@Dann\_Bohn](https://forum.ansible.com/u/Dann_Bohn)\
**Replies:** 9\
**Last updated:** [December 21, 2014, 3:23pm UTC](https://forum.ansible.com/t/vsphere-guest/16866 "2014-12-21T15:23:09Z")

</div>

Folks, For my needs, vsphere\_guest didn’t quite fit the bill, and over time I’ve ended up re-writing most of the vsphere\_guest functions into a separate module that I call ‘vcenter’, using pyvmomi.The reason for this wa…

---

## [root of hg tree?](https://forum.ansible.com/t/root-of-hg-tree/17119)

<div class="topic-metadata">

**Author:** [@Roy\_Smith](https://forum.ansible.com/u/Roy_Smith)\
**Replies:** 1\
**Last updated:** [December 21, 2014, 2:27pm UTC](https://forum.ansible.com/t/root-of-hg-tree/17119 "2014-12-21T14:27:17Z")

</div>

I want to set a playbook variable to the root of my hg tree, i.e. capture the output of the “hg root” command run on my local host. How do I do that?

---

## [digital\_ocean module problem, dopy \>= 0.2.3 required](https://forum.ansible.com/t/digital-ocean-module-problem-dopy-0-2-3-required/16831)

<div class="topic-metadata">

**Author:** [@Sergey\_Puliaiev](https://forum.ansible.com/u/Sergey_Puliaiev)\
**Replies:** 2\
**Last updated:** [December 21, 2014, 12:14pm UTC](https://forum.ansible.com/t/digital-ocean-module-problem-dopy-0-2-3-required/16831 "2014-12-21T12:14:22Z")

</div>

Hello all, I have posted next issue on github: https://github.com/ansible/ansible-modules-core/issues/360 Can someone explain what I have to do to use digital\_ocean module? Best regards, Sergey

---

## [Proper method of padding text](https://forum.ansible.com/t/proper-method-of-padding-text/17120)

<div class="topic-metadata">

**Author:** [@Rick\_Kasten](https://forum.ansible.com/u/Rick_Kasten)\
**Replies:** 3\
**Last updated:** [December 21, 2014, 1:09am UTC](https://forum.ansible.com/t/proper-method-of-padding-text/17120 "2014-12-21T01:09:13Z")

</div>

I am trying to print a line of text to a file such that field1 is separated from field2 by 16 characters. I have a template like this working: {% for item in collection %} {{ item.name }}{{ " " |truncate(16-(item.name|…

---

## [Receiving "unsupported parameter" when module reports unchanged](https://forum.ansible.com/t/receiving-unsupported-parameter-when-module-reports-unchanged/17112)

<div class="topic-metadata">

**Author:** [@Derek\_Anderson](https://forum.ansible.com/u/Derek_Anderson)\
**Replies:** 2\
**Last updated:** [December 21, 2014, 1:04am UTC](https://forum.ansible.com/t/receiving-unsupported-parameter-when-module-reports-unchanged/17112 "2014-12-21T01:04:30Z")

</div>

I updated the copy module to support base 64 encoded content (details here https://github.com/ansible/ansible-modules-extras/pull/142). In order to update the copy module, I needed to update the ActionModule object which…

---

## [enigmatic traceback](https://forum.ansible.com/t/enigmatic-traceback/16660)

<div class="topic-metadata">

**Author:** [@Diogene\_Laerce](https://forum.ansible.com/u/Diogene_Laerce)\
**Replies:** 5\
**Last updated:** [December 21, 2014, 12:51am UTC](https://forum.ansible.com/t/enigmatic-traceback/16660 "2014-12-21T00:51:37Z")

</div>

Hi, I got this traceback when trying to run a playbook with ansible 1.8 on Debian Wheezy : Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in \<module\> sys.exit(main(sys.argv\[1:\])) Fil…

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

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