# Ansible Project

**URL:** https://forum.ansible.com/c/archives/ansible-project/30.md?page=291

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

**Page:** 292

---

## [iisue when evaluating a complex var in become](https://forum.ansible.com/t/iisue-when-evaluating-a-complex-var-in-become/26280)

<div class="topic-metadata">

**Author:** [@Mike\_C1](https://forum.ansible.com/u/Mike_C1)\
**Replies:** 4\
**Last updated:** [December 20, 2017, 12:30pm UTC](https://forum.ansible.com/t/iisue-when-evaluating-a-complex-var-in-become/26280 "2017-12-20T12:30:40Z")

</div>

Hi all, im trying to use a ‘complex’ expression to evaluate if a task should run as root or not. Here is what i have defined: debian\_based\_system: ansible\_os\_family == 'Debian' or ansible\_os\_family == 'Linuxmint' My …

---

## [ios\_modules](https://forum.ansible.com/t/ios-modules/24123)

<div class="topic-metadata">

**Author:** [@Dave3](https://forum.ansible.com/u/Dave3)\
**Replies:** 2\
**Last updated:** [December 20, 2017, 6:55am UTC](https://forum.ansible.com/t/ios-modules/24123 "2017-12-20T06:55:23Z")

</div>

Hi All, I’ve got a question regarding the supported platforms I hope someone can answer that. Does ansible support SG200 and SG300 switches? They do not really use the classic Cisco IOS hence I am not sure about it. Tha…

---

## [How to make a library with custom params like ./configure](https://forum.ansible.com/t/how-to-make-a-library-with-custom-params-like-configure/26335)

<div class="topic-metadata">

**Author:** [@gitted](https://forum.ansible.com/u/gitted)\
**Replies:** 2\
**Last updated:** [December 20, 2017, 5:59am UTC](https://forum.ansible.com/t/how-to-make-a-library-with-custom-params-like-configure/26335 "2017-12-20T05:59:02Z")

</div>

Hi, A manual install of the library is like this: $ wget http://www.freetds.org/files/stable/freetds-1.00.21.tar.gz $ tar -xzf freetds-1.00.21.tar.gz $ cd freetds-1.00.21 $ ./configure --prefix=/usr/local --with-tdsver…

---

## [(Windows) Service Fails to Stop in Actual Play - But Actually Stops On Test Server](https://forum.ansible.com/t/windows-service-fails-to-stop-in-actual-play-but-actually-stops-on-test-server/26334)

<div class="topic-metadata">

**Author:** [@Heather\_Luna](https://forum.ansible.com/u/Heather_Luna)\
**Replies:** 4\
**Last updated:** [December 20, 2017, 4:44am UTC](https://forum.ansible.com/t/windows-service-fails-to-stop-in-actual-play-but-actually-stops-on-test-server/26334 "2017-12-20T04:44:42Z")

</div>

Weird thing happening with my Windows Playbook for Splunk. I run the play which includes stopping the Splunk Service. When it gets to the Splunk Service part with the service is supposed to stop, it seemingly fails. Now…

---

## [Creating multiple json files with jinja2 loop](https://forum.ansible.com/t/creating-multiple-json-files-with-jinja2-loop/26316)

<div class="topic-metadata">

**Author:** [@alanpassel7](https://forum.ansible.com/u/alanpassel7)\
**Replies:** 3\
**Last updated:** [December 19, 2017, 11:40pm UTC](https://forum.ansible.com/t/creating-multiple-json-files-with-jinja2-loop/26316 "2017-12-19T23:40:35Z")

</div>

Hi, I’m trying to create a batch of json files, that will pull values from an inventory group. Ideally, what I would like to have happen is 10 different files are created (the inventory group has 10 nodes in it), using…

---

## [what is mean by play and what's the diffrence plays vs tasks, example please?](https://forum.ansible.com/t/what-is-mean-by-play-and-whats-the-diffrence-plays-vs-tasks-example-please/26328)

<div class="topic-metadata">

**Author:** [@Chandramohan\_Reddy](https://forum.ansible.com/u/Chandramohan_Reddy)\
**Replies:** 1\
**Last updated:** [December 19, 2017, 8:54pm UTC](https://forum.ansible.com/t/what-is-mean-by-play-and-whats-the-diffrence-plays-vs-tasks-example-please/26328 "2017-12-19T20:54:12Z")

</div>

Hi All, Can you please explain me what is play and play vs tasks . Could you give any example for play. Thanks & Regards ChandraMohan

---

## [Problem handling spaces in  vm\_nic in vsphere\_guest](https://forum.ansible.com/t/problem-handling-spaces-in-vm-nic-in-vsphere-guest/26333)

<div class="topic-metadata">

**Author:** [@George\_Chiles](https://forum.ansible.com/u/George_Chiles)\
**Replies:** 0\
**Last updated:** [December 19, 2017, 7:27pm UTC](https://forum.ansible.com/t/problem-handling-spaces-in-vm-nic-in-vsphere-guest/26333 "2017-12-19T19:27:57Z")

</div>

I am having a issue when trying to configure my network adapter when a space is present in the network label. I am using vsphere\_guest module to accomplish this task . When I pass in VLAN 123 I get the below behavior. H…

---

## [How to hot deploy to tomcat with ansible?](https://forum.ansible.com/t/how-to-hot-deploy-to-tomcat-with-ansible/26229)

<div class="topic-metadata">

**Author:** [@Michael\_Hoeller](https://forum.ansible.com/u/Michael_Hoeller)\
**Replies:** 5\
**Last updated:** [December 19, 2017, 5:16pm UTC](https://forum.ansible.com/t/how-to-hot-deploy-to-tomcat-with-ansible/26229 "2017-12-19T17:16:11Z")

</div>

Hello Currently I build my app with maven and use the tomcat manager to hot deploy the war file (both on windows servers). Now I want to use ansible to move away from the manual process. Would it make sense to buil…

---

## [Enable playbook logging via callback plugin](https://forum.ansible.com/t/enable-playbook-logging-via-callback-plugin/26329)

<div class="topic-metadata">

**Author:** [@ansiblekrazy](https://forum.ansible.com/u/ansiblekrazy)\
**Replies:** 2\
**Last updated:** [December 19, 2017, 4:58pm UTC](https://forum.ansible.com/t/enable-playbook-logging-via-callback-plugin/26329 "2017-12-19T16:58:42Z")

</div>

Hi, I want to log playbook execution on per host basis. Have tried log\_plays, it is helping but the logs output is not so good to read. Is it possible to get the output in human readable format or some other suggestions …

---

## [how to comment out or remove the characters (\<!-- --\>) in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file](https://forum.ansible.com/t/how-to-comment-out-or-remove-the-characters-in-the-tomcat-web-xml-file-using-ansible-and-also-a-simple-playbbok-to-add-the-tomcat-filters-to-web-xml-file/26306)

<div class="topic-metadata">

**Author:** [@Veeresh\_Reddy](https://forum.ansible.com/u/Veeresh_Reddy)\
**Replies:** 1\
**Last updated:** [December 19, 2017, 12:44pm UTC](https://forum.ansible.com/t/how-to-comment-out-or-remove-the-characters-in-the-tomcat-web-xml-file-using-ansible-and-also-a-simple-playbbok-to-add-the-tomcat-filters-to-web-xml-file/26306 "2017-12-19T12:44:00Z")

</div>

how to comment out or remove the characters () in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file.please help me

---

## [Unable to pass Role/X/Var variables to Task](https://forum.ansible.com/t/unable-to-pass-role-x-var-variables-to-task/26325)

<div class="topic-metadata">

**Author:** [@Yogi\_Raghunathan](https://forum.ansible.com/u/Yogi_Raghunathan)\
**Replies:** 1\
**Last updated:** [December 19, 2017, 5:44am UTC](https://forum.ansible.com/t/unable-to-pass-role-x-var-variables-to-task/26325 "2017-12-19T05:44:05Z")

</div>

Hello Folks, Trying to do a basic example for roles for generating configs. I cannot get to pass the variable to the tasks. Any help is appreciated. $ ansible --version ansible 2.4.2.0 config file = /home/cisco/ansib…

---

## [How can I run a powershell script locally?](https://forum.ansible.com/t/how-can-i-run-a-powershell-script-locally/26326)

<div class="topic-metadata">

**Author:** [@Kessy\_Similien](https://forum.ansible.com/u/Kessy_Similien)\
**Replies:** 1\
**Last updated:** [December 19, 2017, 2:59am UTC](https://forum.ansible.com/t/how-can-i-run-a-powershell-script-locally/26326 "2017-12-19T02:59:18Z")

</div>

I’ve created a script to install SQL Server silently. I’m using Ansible to push the files to my machine and trying to run the .ps1 script but none of the modules I’ve tried have successfully called the script. Ive tried…

---

## [ANSIBLE\_KEEP\_REMOTE\_FILES location on windows target?](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277)

<div class="topic-metadata">

**Author:** [@Gareth\_Stockdale](https://forum.ansible.com/u/Gareth_Stockdale)\
**Replies:** 3\
**Last updated:** [December 19, 2017, 2:18am UTC](https://forum.ansible.com/t/ansible-keep-remote-files-location-on-windows-target/26277 "2017-12-19T02:18:55Z")

</div>

Anyone know the default location of files on windows when using this to run a playbook? ANSIBLE\_KEEP\_REMOTE\_FILES=1 Thanks

---

## [How can we access the variables defined in host\_vars/\* files into playbook](https://forum.ansible.com/t/how-can-we-access-the-variables-defined-in-host-vars-files-into-playbook/26320)

<div class="topic-metadata">

**Author:** [@Chandramohan\_Reddy](https://forum.ansible.com/u/Chandramohan_Reddy)\
**Replies:** 1\
**Last updated:** [December 18, 2017, 9:17pm UTC](https://forum.ansible.com/t/how-can-we-access-the-variables-defined-in-host-vars-files-into-playbook/26320 "2017-12-18T21:17:49Z")

</div>

Hey there, I am facing below error when i am trying to access the variables defined in host\_vars/ansible.com. I have defined variable name in host vars file called “ansible.com” like

---

## [AWS ELB IP grep and update the inventory for the respective domain](https://forum.ansible.com/t/aws-elb-ip-grep-and-update-the-inventory-for-the-respective-domain/26322)

<div class="topic-metadata">

**Author:** [@DHAVAL\_JAISWAL](https://forum.ansible.com/u/DHAVAL_JAISWAL)\
**Replies:** 0\
**Last updated:** [December 18, 2017, 6:31pm UTC](https://forum.ansible.com/t/aws-elb-ip-grep-and-update-the-inventory-for-the-respective-domain/26322 "2017-12-18T18:31:05Z")

</div>

I am trying to grep the IP available on the AWS ELB (nodes attached to it) and then doing some operation on it. Now, the issue is how can I on the fly update the ansible inventory of the new available IP, so that next o…

---

## [I've come across an Ansible question asking for your help](https://forum.ansible.com/t/ive-come-across-an-ansible-question-asking-for-your-help/26317)

<div class="topic-metadata">

**Author:** [@user112](https://forum.ansible.com/u/user112)\
**Replies:** 0\
**Last updated:** [December 18, 2017, 8:07am UTC](https://forum.ansible.com/t/ive-come-across-an-ansible-question-asking-for-your-help/26317 "2017-12-18T08:07:54Z")

</div>

Hi,About Ansible-Tower,There is a problem I think impassability, this two days we Ansible based automation tasks on the Tower platform, one from a local server directory copy the file to the local server to another direc…

---

## [Ansible AWS EC2 create scripts gives this error:: "Timeout when waiting for 172.31.25.6:22"}](https://forum.ansible.com/t/ansible-aws-ec2-create-scripts-gives-this-error-timeout-when-waiting-for-172-31-25-6-22/26273)

<div class="topic-metadata">

**Author:** [@Ajay\_Sharma1](https://forum.ansible.com/u/Ajay_Sharma1)\
**Replies:** 2\
**Last updated:** [December 18, 2017, 6:26am UTC](https://forum.ansible.com/t/ansible-aws-ec2-create-scripts-gives-this-error-timeout-when-waiting-for-172-31-25-6-22/26273 "2017-12-18T06:26:20Z")

</div>

My Ansible AWS EC2 instance creation script gives this error. "Timeout when waiting for 172.31.25.6:22"} to retry, use: --limit @/root/instance/provision-ec2.retry this code is causing problem, Please let me k…

---

## [Querying Registry and Using Output](https://forum.ansible.com/t/querying-registry-and-using-output/26305)

<div class="topic-metadata">

**Author:** [@Heather\_Luna](https://forum.ansible.com/u/Heather_Luna)\
**Replies:** 3\
**Last updated:** [December 17, 2017, 8:46pm UTC](https://forum.ansible.com/t/querying-registry-and-using-output/26305 "2017-12-17T20:46:26Z")

</div>

I’m new to Ansible and trying to figure out the best way to account for: If software version of Splunk = 6.4.1 trigger certain task sequence that includes an uninstall of the software It felt like I needed to grab the …

---

## [win\_Shell or win\_command executing a variable taken from win\_reg\_stat](https://forum.ansible.com/t/win-shell-or-win-command-executing-a-variable-taken-from-win-reg-stat/26276)

<div class="topic-metadata">

**Author:** [@Gareth\_Stockdale](https://forum.ansible.com/u/Gareth_Stockdale)\
**Replies:** 7\
**Last updated:** [December 17, 2017, 8:34pm UTC](https://forum.ansible.com/t/win-shell-or-win-command-executing-a-variable-taken-from-win-reg-stat/26276 "2017-12-17T20:34:28Z")

</div>

I have some vendor software where I am trying to uninstall (following their procedure) by obtaining the uninstall command and install location from the windows registry. I do this by querying win\_reg\_stat and storing res…

---

## [I an remote to server and login using root just fine, but ansible task is failing](https://forum.ansible.com/t/i-an-remote-to-server-and-login-using-root-just-fine-but-ansible-task-is-failing/26315)

<div class="topic-metadata">

**Author:** [@gitted](https://forum.ansible.com/u/gitted)\
**Replies:** 0\
**Last updated:** [December 17, 2017, 8:32pm UTC](https://forum.ansible.com/t/i-an-remote-to-server-and-login-using-root-just-fine-but-ansible-task-is-failing/26315 "2017-12-17T20:32:50Z")

</div>

My task throws an error as follows: TASK \[mysql : Update MySQL root password for all root accounts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* failed: \[1.2.3.4\] (item=127.0.0.1) =\> {“chang…

---

## [awx surveys and nested yaml variables don't appear to work as expected](https://forum.ansible.com/t/awx-surveys-and-nested-yaml-variables-dont-appear-to-work-as-expected/26314)

<div class="topic-metadata">

**Author:** [@Brandon\_Jozsa](https://forum.ansible.com/u/Brandon_Jozsa)\
**Replies:** 0\
**Last updated:** [December 17, 2017, 5:17pm UTC](https://forum.ansible.com/t/awx-surveys-and-nested-yaml-variables-dont-appear-to-work-as-expected/26314 "2017-12-17T17:17:54Z")

</div>

Hey everyone. I have some questions about how AWX handles nested yaml values for things like surveys. I have a nested yaml declaration in previous playbook for group\_vars, and they look like this: OS API User Login Inf…

---

## [High CPU usage for process ansible command md and mdx](https://forum.ansible.com/t/high-cpu-usage-for-process-ansible-command-md-and-mdx/26313)

<div class="topic-metadata">

**Author:** [@TNK](https://forum.ansible.com/u/TNK)\
**Replies:** 1\
**Last updated:** [December 17, 2017, 1:19am UTC](https://forum.ansible.com/t/high-cpu-usage-for-process-ansible-command-md-and-mdx/26313 "2017-12-17T01:19:55Z")

</div>

Hi, I am new to ansible but and started to have a weird issue with CPU load. I am running on debian 9 with ansible 2.4 from backports (the same issue was on 2.2). This is the load I am getting straight after booting (no…

---

## [getting more detail from os\_stack module?](https://forum.ansible.com/t/getting-more-detail-from-os-stack-module/26310)

<div class="topic-metadata">

**Author:** [@Tim1](https://forum.ansible.com/u/Tim1)\
**Replies:** 0\
**Last updated:** [December 16, 2017, 6:48am UTC](https://forum.ansible.com/t/getting-more-detail-from-os-stack-module/26310 "2017-12-16T06:48:41Z")

</div>

Is it possible to get any more detail about a stack failure than what I’m getting when I use it? Running with -vvvv, I get an error like this “msg”: “(400) Client Error for url: https://…7408cd0d01ad/stacks”, if i run…

---

## [mysql\_users SHOW VIEW permission not granted.](https://forum.ansible.com/t/mysql-users-show-view-permission-not-granted/26309)

<div class="topic-metadata">

**Author:** [@Colin\_Byrne](https://forum.ansible.com/u/Colin_Byrne)\
**Replies:** 0\
**Last updated:** [December 15, 2017, 11:11pm UTC](https://forum.ansible.com/t/mysql-users-show-view-permission-not-granted/26309 "2017-12-15T23:11:22Z")

</div>

I am struggling to set the SHOW VIEW permission for a user on a DATABASE. I have tried with the following syntax, to no avail: \` mysql\_user: name: “{{ } }” password: “{{ } }” priv: “\<my\_database\>.\*:SELECT,SHOW VI…

---

## [More efficient inventory lookups](https://forum.ansible.com/t/more-efficient-inventory-lookups/26293)

<div class="topic-metadata">

**Author:** [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Replies:** 5\
**Last updated:** [December 15, 2017, 10:27pm UTC](https://forum.ansible.com/t/more-efficient-inventory-lookups/26293 "2017-12-15T22:27:13Z")

</div>

We’re using a custom inventory script that calls a webservice which again calls the aws ec2 api to list instances. The reason we do this, is that we store auto-generated and unique instance credentials, and the webservi…

---

## [Dynamic hosts in playbook with roles](https://forum.ansible.com/t/dynamic-hosts-in-playbook-with-roles/26307)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 0\
**Last updated:** [December 15, 2017, 9:04pm UTC](https://forum.ansible.com/t/dynamic-hosts-in-playbook-with-roles/26307 "2017-12-15T21:04:55Z")

</div>

that is not a valid playbook, you are putting tasks in vars\_prompt, they belong in a 'tasks' section, roles also shoudl be at play level: - name: Enter variables hosts: localhost gather\_facts: no vars\_…

---

## [Best Practices to setup docker container with internal configuration files](https://forum.ansible.com/t/best-practices-to-setup-docker-container-with-internal-configuration-files/26298)

<div class="topic-metadata">

**Author:** [@Florian\_Schimmer](https://forum.ansible.com/u/Florian_Schimmer)\
**Replies:** 0\
**Last updated:** [December 15, 2017, 12:02am UTC](https://forum.ansible.com/t/best-practices-to-setup-docker-container-with-internal-configuration-files/26298 "2017-12-15T00:02:57Z")

</div>

Hello, everyone, I’ve played a lot with ansible and docker. The whole thing works really well, except if I want to configure files etc. internally in the container. One possibility is to mount the internal configuratio…

---

## [Integrate ansible in CI/CD tools](https://forum.ansible.com/t/integrate-ansible-in-ci-cd-tools/26272)

<div class="topic-metadata">

**Author:** [@Helio\_Campos\_Mello\_1](https://forum.ansible.com/u/Helio_Campos_Mello_1)\
**Replies:** 1\
**Last updated:** [December 14, 2017, 10:33pm UTC](https://forum.ansible.com/t/integrate-ansible-in-ci-cd-tools/26272 "2017-12-14T22:33:58Z")

</div>

Hi guys, I’m trying to integrate an ansible playbook with my CI/CD tool (GOCD https://www.gocd.org/). It happens I have to pass a complex data structure (a hash with lists of hashes) to it and don’t know how to do it. …

---

## [Starting sysv service when systemd is installed](https://forum.ansible.com/t/starting-sysv-service-when-systemd-is-installed/26295)

<div class="topic-metadata">

**Author:** [@Jacob\_Weber1](https://forum.ansible.com/u/Jacob_Weber1)\
**Replies:** 4\
**Last updated:** [December 14, 2017, 7:06pm UTC](https://forum.ansible.com/t/starting-sysv-service-when-systemd-is-installed/26295 "2017-12-14T19:06:09Z")

</div>

Say my target machine has an OS running systemd, like CentOS 7, and I want to start a sysv service in /etc/init.d. These tickets suggest I pass use=service to the service module: https://github.com/ansible/ansible-modu…

---

## [Mail Callback With Items](https://forum.ansible.com/t/mail-callback-with-items/26294)

<div class="topic-metadata">

**Author:** [@bobby.czechova](https://forum.ansible.com/u/bobby.czechova)\
**Replies:** 0\
**Last updated:** [December 14, 2017, 5:01pm UTC](https://forum.ansible.com/t/mail-callback-with-items/26294 "2017-12-14T17:01:31Z")

</div>

Hi, I’m running Ansible 2.4.1.0. I have the below but for some reason I’m not getting the expected behaviour. Maybe I’m wrong or have assumed incorrectly? I’m expecting the mail callback plugin to output the fail msg…

[Previous page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=290)

[Next page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=292)
