# Latest

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

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

**Page:** 731

---

## [In Ansible, how do I use the ec2\_group module to query if a security group exists, and then check for the result?](https://forum.ansible.com/t/in-ansible-how-do-i-use-the-ec2-group-module-to-query-if-a-security-group-exists-and-then-check-for-the-result/22414)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 1\
**Last updated:** [August 29, 2016, 6:37pm UTC](https://forum.ansible.com/t/in-ansible-how-do-i-use-the-ec2-group-module-to-query-if-a-security-group-exists-and-then-check-for-the-result/22414 "2016-08-29T18:37:47Z")

</div>

Im trying to write a role that queries a security group if it exists, and then create if if not. So I manually created the security group first via AWS GUI. Then I tried the following for the query. \` name: Query if …

---

## [replace public ip from /etc/hosts file with private ip using Ansible](https://forum.ansible.com/t/replace-public-ip-from-etc-hosts-file-with-private-ip-using-ansible/22402)

<div class="topic-metadata">

**Author:** [@Auto-mate](https://forum.ansible.com/u/Auto-mate)\
**Replies:** 1\
**Last updated:** [August 29, 2016, 6:02pm UTC](https://forum.ansible.com/t/replace-public-ip-from-etc-hosts-file-with-private-ip-using-ansible/22402 "2016-08-29T18:02:15Z")

</div>

I need to replace public ip from /etc/hosts file with private ip in bulk cluster of systems. Ansible gathered fact , may work but not sure which is for what. Another way, I can have public and private ip register as va…

---

## [Confused By EC2 Dynamic Inventory](https://forum.ansible.com/t/confused-by-ec2-dynamic-inventory/22407)

<div class="topic-metadata">

**Author:** [@Jon\_Forrest](https://forum.ansible.com/u/Jon_Forrest)\
**Replies:** 1\
**Last updated:** [August 29, 2016, 5:59pm UTC](https://forum.ansible.com/t/confused-by-ec2-dynamic-inventory/22407 "2016-08-29T17:59:43Z")

</div>

I'm 90% done with a problem. The remaining 10% requires using EC2 dynamic inventory, but I'm missing something important. I'm creating two instances ('frontend' and 'backend') where backend only allows SSH access from…

---

## [Ansible Expect module can't match string/regex script questions](https://forum.ansible.com/t/ansible-expect-module-cant-match-string-regex-script-questions/22393)

<div class="topic-metadata">

**Author:** [@Andrea\_Francesco\_Spe](https://forum.ansible.com/u/Andrea_Francesco_Spe)\
**Replies:** 1\
**Last updated:** [August 29, 2016, 3:05pm UTC](https://forum.ansible.com/t/ansible-expect-module-cant-match-string-regex-script-questions/22393 "2016-08-29T15:05:16Z")

</div>

I’m trying to automate a script installation through Ansible in a Vagrant machine. I tried a lot to find a solution across the web but the documentation and the examples are very weak. That script I’m trying to install…

---

## [Callback plugin with Ansible 2.0](https://forum.ansible.com/t/callback-plugin-with-ansible-2-0/22404)

<div class="topic-metadata">

**Author:** [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Replies:** 4\
**Last updated:** [August 29, 2016, 2:26pm UTC](https://forum.ansible.com/t/callback-plugin-with-ansible-2-0/22404 "2016-08-29T14:26:18Z")

</div>

I inherited a callback plugin that was woirking with Ansible 1.9. We upgraded to 2.1 and it no longer works. Looks like it’s trying to access the playbook object but it’s not getting passed into “v2\_playbook\_on\_stats.” …

---

## [Vaultier Installation Issue](https://forum.ansible.com/t/vaultier-installation-issue/22412)

<div class="topic-metadata">

**Author:** [@puneet.sharma](https://forum.ansible.com/u/puneet.sharma)\
**Replies:** 0\
**Last updated:** [August 29, 2016, 12:27pm UTC](https://forum.ansible.com/t/vaultier-installation-issue/22412 "2016-08-29T12:27:22Z")

</div>

Hi Guys, I have installing Vaultier on Ubuntu server 14.04 i am getting below error (venv)oneadmin@us-server3:/opt/vaultier$ vaultier init Traceback (most recent call last): File “/usr/local/bin/vaultier”, line 9, in…

---

## [Vars defined in host file not getting the value when the value is supplied as extra vars during playbook run](https://forum.ansible.com/t/vars-defined-in-host-file-not-getting-the-value-when-the-value-is-supplied-as-extra-vars-during-playbook-run/22410)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 0\
**Last updated:** [August 29, 2016, 10:44am UTC](https://forum.ansible.com/t/vars-defined-in-host-file-not-getting-the-value-when-the-value-is-supplied-as-extra-vars-during-playbook-run/22410 "2016-08-29T10:44:05Z")

</div>

My host file looks something like this: \[Group\] host.com \[Group:vars\] vars="{{src}}/varsFile.yaml And in my playbook:

---

## [Can i use variables as values to variables defined in inventory file](https://forum.ansible.com/t/can-i-use-variables-as-values-to-variables-defined-in-inventory-file/22304)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 2\
**Last updated:** [August 29, 2016, 6:14am UTC](https://forum.ansible.com/t/can-i-use-variables-as-values-to-variables-defined-in-inventory-file/22304 "2016-08-29T06:14:56Z")

</div>

I am trying to imply environment wide values via inventory file for which i need to use some other variables as values. My host file looks like this: \[linunx\] linux1 linux2 \[windows\] windows1 windows2 \[all\] linu…

---

## [print public dns name of ec2 instance](https://forum.ansible.com/t/print-public-dns-name-of-ec2-instance/22408)

<div class="topic-metadata">

**Author:** [@Benjamin\_Fernandis](https://forum.ansible.com/u/Benjamin_Fernandis)\
**Replies:** 0\
**Last updated:** [August 29, 2016, 3:50am UTC](https://forum.ansible.com/t/print-public-dns-name-of-ec2-instance/22408 "2016-08-29T03:50:25Z")

</div>

Hi, I am testing to print ec2 instance public dns names by ansible. hosts: localhost connection: local tasks: name: get instance public dns name ec2\_remote\_facts: region: ap-southeast-2 filters: instance-stat…

---

## [replace public ip from /etc/hosts file with private ip using Ansible](https://forum.ansible.com/t/replace-public-ip-from-etc-hosts-file-with-private-ip-using-ansible/22406)

<div class="topic-metadata">

**Author:** [@Auto-mate](https://forum.ansible.com/u/Auto-mate)\
**Replies:** 0\
**Last updated:** [August 27, 2016, 4:26pm UTC](https://forum.ansible.com/t/replace-public-ip-from-etc-hosts-file-with-private-ip-using-ansible/22406 "2016-08-27T16:26:16Z")

</div>

I need to replace public ip from /etc/hosts file with private ip in bulk cluster of systems. Ansible gathered fact , may work but not sure which is for what. Another way, I can have public and private ip register as va…

---

## [Python3 -- where are we now?](https://forum.ansible.com/t/python3-where-are-we-now/22384)

<div class="topic-metadata">

**Author:** [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Replies:** 1\
**Last updated:** [August 27, 2016, 1:49pm UTC](https://forum.ansible.com/t/python3-where-are-we-now/22384 "2016-08-27T13:49:09Z")

</div>

Hey everyone, just dropping a short status update on the progress on getting Ansible running on python3. Bad news first: I don't think that Ansible-2.2 on python3 will be production ready. There are large pieces of th…

---

## [Where'd self.playbook.extra\_vars get moved to](https://forum.ansible.com/t/whered-self-playbook-extra-vars-get-moved-to/21083)

<div class="topic-metadata">

**Author:** [@Zacharias\_Thompson](https://forum.ansible.com/u/Zacharias_Thompson)\
**Replies:** 1\
**Last updated:** [August 27, 2016, 1:17am UTC](https://forum.ansible.com/t/whered-self-playbook-extra-vars-get-moved-to/21083 "2016-08-27T01:17:09Z")

</div>

I’ve been using a callback plugin in Ansible 1.9.4 to pull a bunch of variables, format them into a string, and send out an email to users. I’m testing the upgrade to Ansible 2.0.1 and it looks like the property is not …

---

## [Access group vars from callback module in ansible-2.0](https://forum.ansible.com/t/access-group-vars-from-callback-module-in-ansible-2-0/20392)

<div class="topic-metadata">

**Author:** [@tinyzais](https://forum.ansible.com/u/tinyzais)\
**Replies:** 2\
**Last updated:** [August 26, 2016, 8:00pm UTC](https://forum.ansible.com/t/access-group-vars-from-callback-module-in-ansible-2-0/20392 "2016-08-26T20:00:02Z")

</div>

Hello, I’m trying to write callback plugin for ansible. Below code was working on in ansible-1.9, but it isn’t in ansible-2.0 \` def v2\_playbook\_on\_play\_start(self, play): self.play = play self.playbook = self.play.…

---

## [ssh connection other than root user](https://forum.ansible.com/t/ssh-connection-other-than-root-user/22403)

<div class="topic-metadata">

**Author:** [@Athul\_Devadas](https://forum.ansible.com/u/Athul_Devadas)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 7:28pm UTC](https://forum.ansible.com/t/ssh-connection-other-than-root-user/22403 "2016-08-26T19:28:59Z")

</div>

Hi I am new to Ansible and ssh. I have two Linux machine. I have a user named test in both. Copied the public key from the controller machine to node and i try to connect it through ansible. I am not able to connect. D…

---

## [Unable to ping](https://forum.ansible.com/t/unable-to-ping/22360)

<div class="topic-metadata">

**Author:** [@RICCARDO\_RUSSO](https://forum.ansible.com/u/RICCARDO_RUSSO)\
**Replies:** 1\
**Last updated:** [August 26, 2016, 7:06pm UTC](https://forum.ansible.com/t/unable-to-ping/22360 "2016-08-26T19:06:11Z")

</div>

Hello, the following ansible 2.1.1.0 command hangs: ansible@ansible:~/playbooks/APS/test$ ansible -vvv 10.162.38.161 -m ping -i /home/ansible/playbooks/APS/inventory/inventory.cfg

---

## [Inventory variable not available in hostvars](https://forum.ansible.com/t/inventory-variable-not-available-in-hostvars/22375)

<div class="topic-metadata">

**Author:** [@Douglas\_Hammond](https://forum.ansible.com/u/Douglas_Hammond)\
**Replies:** 1\
**Last updated:** [August 26, 2016, 6:39pm UTC](https://forum.ansible.com/t/inventory-variable-not-available-in-hostvars/22375 "2016-08-26T18:39:16Z")

</div>

I’m trying to create client configs for each host in a group. When the template is parsed the inventory set variable is not available in the template. bareos/Defaults/main.yml bareos\_client\_fileset: SomeFileSet bareos…

---

## [SSH not working to client machine (ssh from command line works) - Ansible 2.1.0](https://forum.ansible.com/t/ssh-not-working-to-client-machine-ssh-from-command-line-works-ansible-2-1-0/22373)

<div class="topic-metadata">

**Author:** [@Anfield](https://forum.ansible.com/u/Anfield)\
**Replies:** 5\
**Last updated:** [August 26, 2016, 6:07pm UTC](https://forum.ansible.com/t/ssh-not-working-to-client-machine-ssh-from-command-line-works-ansible-2-1-0/22373 "2016-08-26T18:07:49Z")

</div>

When I run ansible all -m ping -vvvv from the controller to the client (ubuntu) I get the following - Loaded callback minimal of type stdout, v2.0 \<10.10.128.0\> ESTABLISH WINRM CONNECTION FOR USER: Administrator on POR…

---

## [include\_role](https://forum.ansible.com/t/include-role/22401)

<div class="topic-metadata">

**Author:** [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 6:01pm UTC](https://forum.ansible.com/t/include-role/22401 "2016-08-26T18:01:09Z")

</div>

So hoping to get this ironed out for the 2.2 release, I’ve merged include\_role into devel which now allows you to use ‘roles as tasks’. I know this is a feature many of you are eager to play with, so I thought we should…

---

## [Merging dictionaries for "environment" parameter](https://forum.ansible.com/t/merging-dictionaries-for-environment-parameter/15827)

<div class="topic-metadata">

**Author:** [@Steven\_Ringo](https://forum.ansible.com/u/Steven_Ringo)\
**Replies:** 15\
**Last updated:** [August 26, 2016, 4:35pm UTC](https://forum.ansible.com/t/merging-dictionaries-for-environment-parameter/15827 "2016-08-26T16:35:43Z")

</div>

Hi, I am wanting to use the environment task parameter with dictionaries taken from two roles, e.g. in roles/ruby/vars/main.yml: ruby\_environment: GEM\_HOME: "/home/deploy/.gem/ruby/2.1.2" PATH: "/home/depl…

---

## [Retrying a command until a JSON response contains a specific key](https://forum.ansible.com/t/retrying-a-command-until-a-json-response-contains-a-specific-key/22398)

<div class="topic-metadata">

**Author:** [@Jean-Denis\_Vauguet](https://forum.ansible.com/u/Jean-Denis_Vauguet)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 4:34pm UTC](https://forum.ansible.com/t/retrying-a-command-until-a-json-response-contains-a-specific-key/22398 "2016-08-26T16:34:25Z")

</div>

Hi, I have somewhat of an edge-case I just have no idea how to properly handle using Ansible. In a playbook, I’m provisioning an AWS Elasticsearch domain, an asynchronous task. On AWS, booting the cluster takes a few m…

---

## [How to \<git submodule update\> with Ansible's Git module ?](https://forum.ansible.com/t/how-to-git-submodule-update-with-ansibles-git-module/22397)

<div class="topic-metadata">

**Author:** [@Soren\_Jentzsch](https://forum.ansible.com/u/Soren_Jentzsch)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 2:06pm UTC](https://forum.ansible.com/t/how-to-git-submodule-update-with-ansibles-git-module/22397 "2016-08-26T14:06:24Z")

</div>

Hi Ansible-Community, first of all I would like to mention that I am quite proud to be part of the Ansible Community. I introduced Ansible within some innovative Robotic-related projects inside a large company where I …

---

## [replacing public ip with private in /etc/hosts](https://forum.ansible.com/t/replacing-public-ip-with-private-in-etc-hosts/22396)

<div class="topic-metadata">

**Author:** [@Auto-mate](https://forum.ansible.com/u/Auto-mate)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 1:50pm UTC](https://forum.ansible.com/t/replacing-public-ip-with-private-in-etc-hosts/22396 "2016-08-26T13:50:45Z")

</div>

I am trying to replace public ip with private ip in /etc/hosts for bulk of hosts . Current setup PUBLIC\_IP hostname shot\_hostname Needed : PRIVATE \_IP hostname short\_hostname How I can do it using ansible? I wonder …

---

## [Processing ansible's output in shell script](https://forum.ansible.com/t/processing-ansibles-output-in-shell-script/22380)

<div class="topic-metadata">

**Author:** [@ankur.cool](https://forum.ansible.com/u/ankur.cool)\
**Replies:** 11\
**Last updated:** [August 26, 2016, 1:05pm UTC](https://forum.ansible.com/t/processing-ansibles-output-in-shell-script/22380 "2016-08-26T13:05:13Z")

</div>

Hi All, I have a shell script from which I am invoking an ansible playbook. My playbook checks for some status of my services and I want this information to be available in my shell script after playbook execution is c…

---

## [Role Dependencies Skipping Included Files](https://forum.ansible.com/t/role-dependencies-skipping-included-files/22395)

<div class="topic-metadata">

**Author:** [@steve5](https://forum.ansible.com/u/steve5)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 12:26pm UTC](https://forum.ansible.com/t/role-dependencies-skipping-included-files/22395 "2016-08-26T12:26:09Z")

</div>

I have a scenario where I have two top level roles in a playbook: {role: roleA, tag: roleA} {role: roleB, tag: roleB} Role A and Role both depend on Role C in their meta/main.yml meta/main.yml for Role A dependencies…

---

## [Tower Notification Template - Hipchat Fails](https://forum.ansible.com/t/tower-notification-template-hipchat-fails/22391)

<div class="topic-metadata">

**Author:** [@Dave\_Karakas](https://forum.ansible.com/u/Dave_Karakas)\
**Replies:** 1\
**Last updated:** [August 26, 2016, 3:09am UTC](https://forum.ansible.com/t/tower-notification-template-hipchat-fails/22391 "2016-08-26T03:09:03Z")

</div>

I’m trying to configure a HipChat Notification Template in Tower (v3.0.0), however this is not working as expected. Following the guidance provided in the docs (Ansible Documentation), I have configured a notification t…

---

## [Tower: setup.sh fails with "Please configure passwords in the inventory file before running setup"](https://forum.ansible.com/t/tower-setup-sh-fails-with-please-configure-passwords-in-the-inventory-file-before-running-setup/22085)

<div class="topic-metadata">

**Author:** [@Vasily\_Kirichenko](https://forum.ansible.com/u/Vasily_Kirichenko)\
**Replies:** 1\
**Last updated:** [August 25, 2016, 9:29pm UTC](https://forum.ansible.com/t/tower-setup-sh-fails-with-please-configure-passwords-in-the-inventory-file-before-running-setup/22085 "2016-08-25T21:29:51Z")

</div>

inventory: \[primary\] localhost ansible\_connection=local \[secondary\] \[database\] \[all:vars\] admin\_password=‘p1’ redis\_password=‘p1’ pg\_password=‘p1’ #pg\_host=‘’ #pg\_port=‘’ pg\_database=‘awx’ pg\_username=‘awx’ …

---

## [Variable declared in inventory not what is put in file - sometimes](https://forum.ansible.com/t/variable-declared-in-inventory-not-what-is-put-in-file-sometimes/22390)

<div class="topic-metadata">

**Author:** [@richard\_kappler](https://forum.ansible.com/u/richard_kappler)\
**Replies:** 2\
**Last updated:** [August 25, 2016, 8:32pm UTC](https://forum.ansible.com/t/variable-declared-in-inventory-not-what-is-put-in-file-sometimes/22390 "2016-08-25T20:32:39Z")

</div>

I have run a playbook that updates an app of ours on numerous customer VM’s. This playbook has run fine many times, but today when I ran it to update 6 servers, one of my variables was not properly put into the target fi…

---

## [Roles purpose](https://forum.ansible.com/t/roles-purpose/22383)

<div class="topic-metadata">

**Author:** [@Alan\_Evangelista](https://forum.ansible.com/u/Alan_Evangelista)\
**Replies:** 2\
**Last updated:** [August 25, 2016, 7:15pm UTC](https://forum.ansible.com/t/roles-purpose/22383 "2016-08-25T19:15:52Z")

</div>

I’m a little confused in understanding the exact purpose of roles. Reading http://docs.ansible.com/ansible/playbooks\_roles.html , the first examples use a 1:1 association between role and hosts group (eg webservers and d…

---

## [task using raw module is always skipped with "VARIABLE NOT DEFINED!" error](https://forum.ansible.com/t/task-using-raw-module-is-always-skipped-with-variable-not-defined-error/22387)

<div class="topic-metadata">

**Author:** [@Deep18](https://forum.ansible.com/u/Deep18)\
**Replies:** 1\
**Last updated:** [August 25, 2016, 6:55pm UTC](https://forum.ansible.com/t/task-using-raw-module-is-always-skipped-with-variable-not-defined-error/22387 "2016-08-25T18:55:18Z")

</div>

I am running winrm from my Mac with ansible: here is my task thats causes a failure, don’t know what variable is being referred here, any help appreciated. My task file for the playbook with the role: name: check if …

---

## [running ansible-galaxy install in a playbook](https://forum.ansible.com/t/running-ansible-galaxy-install-in-a-playbook/22389)

<div class="topic-metadata">

**Author:** [@eric\_skaggs1](https://forum.ansible.com/u/eric_skaggs1)\
**Replies:** 0\
**Last updated:** [August 25, 2016, 6:21pm UTC](https://forum.ansible.com/t/running-ansible-galaxy-install-in-a-playbook/22389 "2016-08-25T18:21:48Z")

</div>

Running ansible 2.1.0 I’m trying to run ansible-galaxy install in a play book to download the needed roles in an automated fashion to my local machine and it seems to skip the task. So far I have tried: hosts: local…

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

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