# Latest

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

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

**Page:** 549

---

## [error running win\_command with playbook](https://forum.ansible.com/t/error-running-win-command-with-playbook/27759)

<div class="topic-metadata">

**Author:** [@doppalapudi\_saikumar](https://forum.ansible.com/u/doppalapudi_saikumar)\
**Replies:** 1\
**Last updated:** [June 11, 2018, 10:09am UTC](https://forum.ansible.com/t/error-running-win-command-with-playbook/27759 "2018-06-11T10:09:41Z")

</div>

I was able to run on cmd prompt but when I run it it hangs .Nothing happens. please let me know how to execute this using playbook. hosts: web-servers vars: SnapdriveAcc: xxxxx\\xxxxxxx SnapdrivePW: xxxxxxxx tasks: …

---

## [playbook error for external parameter](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745)

<div class="topic-metadata">

**Author:** [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Replies:** 4\
**Last updated:** [June 11, 2018, 9:12am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745 "2018-06-11T09:12:11Z")

</div>

Hi All, I am having one issue, -e’switch\_desc=“interface Gi1/0/16”’ Created ansible playbook for ios\_config but when passing the external parameter I am getting one error of Incomplete command as it is reading only “i…

---

## [Issue getting VLAN if  network is Distribution virtual switch](https://forum.ansible.com/t/issue-getting-vlan-if-network-is-distribution-virtual-switch/27763)

<div class="topic-metadata">

**Author:** [@Umesh\_Gowda](https://forum.ansible.com/u/Umesh_Gowda)\
**Replies:** 0\
**Last updated:** [June 11, 2018, 6:37am UTC](https://forum.ansible.com/t/issue-getting-vlan-if-network-is-distribution-virtual-switch/27763 "2018-06-11T06:37:47Z")

</div>

Having issue Deploy vm from template network is Distribution virtual switch standard switch works fine Need help regrading issue I am able to deploy vm from the template successfully with out any issue if the network i…

---

## [Having issue Deploy vm from template network is Distribution virtual switch](https://forum.ansible.com/t/having-issue-deploy-vm-from-template-network-is-distribution-virtual-switch/27682)

<div class="topic-metadata">

**Author:** [@Umesh\_Gowda](https://forum.ansible.com/u/Umesh_Gowda)\
**Replies:** 1\
**Last updated:** [June 11, 2018, 6:34am UTC](https://forum.ansible.com/t/having-issue-deploy-vm-from-template-network-is-distribution-virtual-switch/27682 "2018-06-11T06:34:25Z")

</div>

Having issue Deploy vm from template network is Distribution virtual switch standard switch works fine Need help regrading issue I am able to deploy vm from the template successfully with out any issue if the network i…

---

## [I have trouble understanding the variable hierarchy](https://forum.ansible.com/t/i-have-trouble-understanding-the-variable-hierarchy/13730)

<div class="topic-metadata">

**Author:** [@Guillem\_Liarte](https://forum.ansible.com/u/Guillem_Liarte)\
**Replies:** 3\
**Last updated:** [June 11, 2018, 4:20am UTC](https://forum.ansible.com/t/i-have-trouble-understanding-the-variable-hierarchy/13730 "2018-06-11T04:20:38Z")

</div>

Hello, I have experience in CfEngine and Puppet and I am trying to get to understand Ansible, but soem simple things as expading a variable do not seem to work as easy as it says in tin. I am following the structure de…

---

## [URI module fails with SSL cert validation set to no](https://forum.ansible.com/t/uri-module-fails-with-ssl-cert-validation-set-to-no/27730)

<div class="topic-metadata">

**Author:** [@Gilberto\_Valentin](https://forum.ansible.com/u/Gilberto_Valentin)\
**Replies:** 5\
**Last updated:** [June 11, 2018, 12:28am UTC](https://forum.ansible.com/t/uri-module-fails-with-ssl-cert-validation-set-to-no/27730 "2018-06-11T00:28:57Z")

</div>

When running a task from a playbook using the URI module, I am getting the following SSL error: \` workstation:documents me$ ansible-playbook --tags checkHealth myplaybook.yml PLAY \[check indexing status\] \*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Trouble with output from script module task](https://forum.ansible.com/t/trouble-with-output-from-script-module-task/27760)

<div class="topic-metadata">

**Author:** [@Ab\_Generette](https://forum.ansible.com/u/Ab_Generette)\
**Replies:** 0\
**Last updated:** [June 10, 2018, 1:22pm UTC](https://forum.ansible.com/t/trouble-with-output-from-script-module-task/27760 "2018-06-10T13:22:58Z")

</div>

Hi, I have a python script “expect\_again.py” that is meant to support a minimal amount of operator input, when that script in turn runs an expect script, “run\_primary.exp”. I’m not seeing all of the output, though, from…

---

## [Advice on updating a preview module to newer version and backwards compatability](https://forum.ansible.com/t/advice-on-updating-a-preview-module-to-newer-version-and-backwards-compatability/27758)

<div class="topic-metadata">

**Author:** [@Stephen\_Barry](https://forum.ansible.com/u/Stephen_Barry)\
**Replies:** 0\
**Last updated:** [June 9, 2018, 7:48pm UTC](https://forum.ansible.com/t/advice-on-updating-a-preview-module-to-newer-version-and-backwards-compatability/27758 "2018-06-09T19:48:28Z")

</div>

Hi fellow Ansible users, I am thinking of contributing to Ansible modules, by way of updating an existing module, namely pagerduty\_alert to use PagerDuty Events API V2, as the PagerDuty v1 API is being decommissioned on…

---

## [Nested variables inside templates](https://forum.ansible.com/t/nested-variables-inside-templates/27750)

<div class="topic-metadata">

**Author:** [@Varun\_Chopra](https://forum.ansible.com/u/Varun_Chopra)\
**Replies:** 2\
**Last updated:** [June 9, 2018, 7:34pm UTC](https://forum.ansible.com/t/nested-variables-inside-templates/27750 "2018-06-09T19:34:04Z")

</div>

Interfaces are different for every server I’m working with, so to print details of each interface, let’s say I’m using the following code in a template: interfaces: {% for a\_value in ansible\_interfaces %}{{ a\_value }} {…

---

## [ansible xml; setting child element based on node attribute value](https://forum.ansible.com/t/ansible-xml-setting-child-element-based-on-node-attribute-value/27756)

<div class="topic-metadata">

**Author:** [@Ali\_Khawaja](https://forum.ansible.com/u/Ali_Khawaja)\
**Replies:** 1\
**Last updated:** [June 9, 2018, 2:59pm UTC](https://forum.ansible.com/t/ansible-xml-setting-child-element-based-on-node-attribute-value/27756 "2018-06-09T14:59:35Z")

</div>

Hi, i have multiple xml node which multiple child elements. each node differs from other based on the value of its attribute. i want to set the value of child elements based on the value of the parent node’s attribute.…

---

## [How to send email with content from .yml file\[Ansible\]](https://forum.ansible.com/t/how-to-send-email-with-content-from-yml-file-ansible/27757)

<div class="topic-metadata">

**Author:** [@devopsram2012](https://forum.ansible.com/u/devopsram2012)\
**Replies:** 0\
**Last updated:** [June 9, 2018, 1:03pm UTC](https://forum.ansible.com/t/how-to-send-email-with-content-from-yml-file-ansible/27757 "2018-06-09T13:03:48Z")

</div>

Dear All, I want to send email with content from .yml file output . I’ve created Jenkins job using groovy script and Inside groovy I’m using shell script to call .yml file and inside I’m checking urls health check usin…

---

## [Error While nesting the with\_item](https://forum.ansible.com/t/error-while-nesting-the-with-item/27747)

<div class="topic-metadata">

**Author:** [@devopsram2012](https://forum.ansible.com/u/devopsram2012)\
**Replies:** 3\
**Last updated:** [June 9, 2018, 12:35pm UTC](https://forum.ansible.com/t/error-while-nesting-the-with-item/27747 "2018-06-09T12:35:51Z")

</div>

Dear All, I want to get output message of the log using ansible debug . \[Case-1\] If I know the no of results and I want too print then I can use below code CODE\[start\] name: Display all Endpoints Health\_Check test …

---

## [Ansible 2.6.0 Release Candidate 2 is available](https://forum.ansible.com/t/ansible-2-6-0-release-candidate-2-is-available/27755)

<div class="topic-metadata">

**Author:** [@Matt\_Clay1](https://forum.ansible.com/u/Matt_Clay1)\
**Replies:** 0\
**Last updated:** [June 9, 2018, 6:48am UTC](https://forum.ansible.com/t/ansible-2-6-0-release-candidate-2-is-available/27755 "2018-06-09T06:48:03Z")

</div>

Hi all – we’re happy to announce that Release Candidate 2 of Ansible 2.6.0 is now available! How do you get it?

---

## [Format to specify two regex in contains parameter in find module](https://forum.ansible.com/t/format-to-specify-two-regex-in-contains-parameter-in-find-module/27739)

<div class="topic-metadata">

**Author:** [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Replies:** 3\
**Last updated:** [June 9, 2018, 6:18am UTC](https://forum.ansible.com/t/format-to-specify-two-regex-in-contains-parameter-in-find-module/27739 "2018-06-09T06:18:40Z")

</div>

I want to grep for two words in contains attribute. It doesn't work if I give like this to search for patterns scm.com and DD: Contains: .\*scm\\.com.\* , dd\\:

---

## [How to make -vvvv the default for ansible-playbook in ansible.cfg](https://forum.ansible.com/t/how-to-make-vvvv-the-default-for-ansible-playbook-in-ansible-cfg/26145)

<div class="topic-metadata">

**Author:** [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Replies:** 2\
**Last updated:** [June 8, 2018, 8:40pm UTC](https://forum.ansible.com/t/how-to-make-vvvv-the-default-for-ansible-playbook-in-ansible-cfg/26145 "2018-06-08T20:40:42Z")

</div>

I read through the document at http://docs.ansible.com/ansible/latest/intro\_configuration.html, and I didn’t find any setting that can make -vvvv the default if ansible-playbook is ran outout -vvvv. For example, ansible…

---

## [setting host too use custom port](https://forum.ansible.com/t/setting-host-too-use-custom-port/27751)

<div class="topic-metadata">

**Author:** [@Frank\_Dias](https://forum.ansible.com/u/Frank_Dias)\
**Replies:** 2\
**Last updated:** [June 8, 2018, 6:12pm UTC](https://forum.ansible.com/t/setting-host-too-use-custom-port/27751 "2018-06-08T18:12:35Z")

</div>

can someone explain how to set a custom port for ansible connection I have a dynamic inventory from AWS, but we have changed the ssh port to none standard. how can I add the information to host(s) Frnk

---

## [Ansible yum module unable to find certain packages](https://forum.ansible.com/t/ansible-yum-module-unable-to-find-certain-packages/23076)

<div class="topic-metadata">

**Author:** [@Jeffrey\_Wen](https://forum.ansible.com/u/Jeffrey_Wen)\
**Replies:** 9\
**Last updated:** [June 8, 2018, 4:20pm UTC](https://forum.ansible.com/t/ansible-yum-module-unable-to-find-certain-packages/23076 "2018-06-08T16:20:09Z")

</div>

My playbook that installs some generic applications on all of my servers: \` name: Install base applications yum: name={{ item }} state=present with\_items: epel-release vim-enhanced gcc wget libsemanage-python policy…

---

## [Missing method KSU in "PRIVILEGE ESCALATION METHOD"](https://forum.ansible.com/t/missing-method-ksu-in-privilege-escalation-method/25708)

<div class="topic-metadata">

**Author:** [@Kjell\_Tillstrand](https://forum.ansible.com/u/Kjell_Tillstrand)\
**Replies:** 3\
**Last updated:** [June 8, 2018, 3:31pm UTC](https://forum.ansible.com/t/missing-method-ksu-in-privilege-escalation-method/25708 "2018-06-08T15:31:59Z")

</div>

So I can’t find KSU in the list or any documentation why it should be gone. Is it by design or is it a bug? Regards Kjell

---

## [custom module and connection local and python dependencies](https://forum.ansible.com/t/custom-module-and-connection-local-and-python-dependencies/27749)

<div class="topic-metadata">

**Author:** [@hdulay](https://forum.ansible.com/u/hdulay)\
**Replies:** 0\
**Last updated:** [June 8, 2018, 3:28pm UTC](https://forum.ansible.com/t/custom-module-and-connection-local-and-python-dependencies/27749 "2018-06-08T15:28:03Z")

</div>

Hello All; Is it possible to execute a custom task locally by setting connection: local and be able to load its python-module dependencies? I’m trying to maximize usability. I attempted to added my python modules to th…

---

## [SAML integration error](https://forum.ansible.com/t/saml-integration-error/27736)

<div class="topic-metadata">

**Author:** [@ahmed](https://forum.ansible.com/u/ahmed)\
**Replies:** 2\
**Last updated:** [June 8, 2018, 2:15pm UTC](https://forum.ansible.com/t/saml-integration-error/27736 "2018-06-08T14:15:35Z")

</div>

Hi, I’m currently trying to implement SAML on AWX 1.0.3 in the IdP-initiated mode. This is the current configuration: AWX is behind a RP ACS URL: https://10.203.12.139:8443/sso/metadata/saml/ Entity ID : aia-0…

---

## [Ansible and Active Directory DNS updates](https://forum.ansible.com/t/ansible-and-active-directory-dns-updates/27552)

<div class="topic-metadata">

**Author:** [@ADB101](https://forum.ansible.com/u/ADB101)\
**Replies:** 1\
**Last updated:** [June 8, 2018, 2:02pm UTC](https://forum.ansible.com/t/ansible-and-active-directory-dns-updates/27552 "2018-06-08T14:02:16Z")

</div>

Hi We’re using MS Active Directory to provide DNS resolution. I need to be able to add DNS entries to Active Directory but, not being a MS-techie, I’m not sure about the technicalities of doing so…The nsupdate module se…

---

## [launch ad hoc commands with preselected credentials](https://forum.ansible.com/t/launch-ad-hoc-commands-with-preselected-credentials/27748)

<div class="topic-metadata">

**Author:** [@Lars\_Behrens](https://forum.ansible.com/u/Lars_Behrens)\
**Replies:** 0\
**Last updated:** [June 8, 2018, 12:41pm UTC](https://forum.ansible.com/t/launch-ad-hoc-commands-with-preselected-credentials/27748 "2018-06-08T12:41:07Z")

</div>

Hello, Via Inventory-\> Hosts it is possible to run ad hoc commands on specific machines. Since we will have several different credentials in our setup, it would be nice to have a preselected credential for administrativ…

---

## [adding vcenter to tower caused hosts displayed with ids](https://forum.ansible.com/t/adding-vcenter-to-tower-caused-hosts-displayed-with-ids/25855)

<div class="topic-metadata">

**Author:** [@Oguz\_Yarimtepe](https://forum.ansible.com/u/Oguz_Yarimtepe)\
**Replies:** 2\
**Last updated:** [June 7, 2018, 10:42pm UTC](https://forum.ansible.com/t/adding-vcenter-to-tower-caused-hosts-displayed-with-ids/25855 "2018-06-07T22:42:43Z")

</div>

I added VMWare VCenter credential type to AWX interface and also added source of my VCenter. I can see the vms on my VCenter but all are imported with their name\_id format which i don’t want. How can i tell AWX (Tower) t…

---

## [Appending Hostname to a File](https://forum.ansible.com/t/appending-hostname-to-a-file/27737)

<div class="topic-metadata">

**Author:** [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Replies:** 2\
**Last updated:** [June 7, 2018, 8:32pm UTC](https://forum.ansible.com/t/appending-hostname-to-a-file/27737 "2018-06-07T20:32:43Z")

</div>

I have playbook that search for file in specific folder then fetch the files to my ansible host. During the fetch process, is there a way to append the hostname of the server the file came from for each file that’s being…

---

## [ansible-playbook using -i inventory on a playbook fails on pyVmomi not found](https://forum.ansible.com/t/ansible-playbook-using-i-inventory-on-a-playbook-fails-on-pyvmomi-not-found/27704)

<div class="topic-metadata">

**Author:** [@Wendell\_MacKenzie](https://forum.ansible.com/u/Wendell_MacKenzie)\
**Replies:** 17\
**Last updated:** [June 7, 2018, 7:55pm UTC](https://forum.ansible.com/t/ansible-playbook-using-i-inventory-on-a-playbook-fails-on-pyvmomi-not-found/27704 "2018-06-07T19:55:59Z")

</div>

Hi: I have a playbook that uses vmware\_guest module to create a new VM on an esxi server. The inventory specified on the command line does not have localhost defined. I DO specify delegate\_to: localhost in the task def…

---

## [Retrieving file names/sizes in dir](https://forum.ansible.com/t/retrieving-file-names-sizes-in-dir/27740)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 4\
**Last updated:** [June 7, 2018, 7:51pm UTC](https://forum.ansible.com/t/retrieving-file-names-sizes-in-dir/27740 "2018-06-07T19:51:56Z")

</div>

I wish to be able to get the name and filesize of all files under /var/spool/mail. I was trying to do this with the following: \` name: Stat mail dir stat: path: “{{ item }}” with\_fileglob: “/var/spool/mail/\*” regi…

---

## [MySQLdb dependency in mysql module](https://forum.ansible.com/t/mysqldb-dependency-in-mysql-module/27741)

<div class="topic-metadata">

**Author:** [@Josef\_Fortier](https://forum.ansible.com/u/Josef_Fortier)\
**Replies:** 1\
**Last updated:** [June 7, 2018, 7:50pm UTC](https://forum.ansible.com/t/mysqldb-dependency-in-mysql-module/27741 "2018-06-07T19:50:13Z")

</div>

I’ve been working with the newly released Opensuse Leap 15 which no longer packages python MySQLdb. Suspicious that this was intentional, I googled a bit and found this on the saltstack Github issues pages: https://git…

---

## [revert changes in specific file using ansible.](https://forum.ansible.com/t/revert-changes-in-specific-file-using-ansible/27738)

<div class="topic-metadata">

**Author:** [@Hasan\_Syed](https://forum.ansible.com/u/Hasan_Syed)\
**Replies:** 3\
**Last updated:** [June 7, 2018, 4:44pm UTC](https://forum.ansible.com/t/revert-changes-in-specific-file-using-ansible/27738 "2018-06-07T16:44:31Z")

</div>

Team, Could you please guide me how we can revert changes of a remote server file using ansible? like I have a file on server 1 abc.txt and someone have changed it my requirement is to make the abc.txt file in previous …

---

## [include\_role with different user is not working](https://forum.ansible.com/t/include-role-with-different-user-is-not-working/27732)

<div class="topic-metadata">

**Author:** [@SS1](https://forum.ansible.com/u/SS1)\
**Replies:** 2\
**Last updated:** [June 7, 2018, 2:23pm UTC](https://forum.ansible.com/t/include-role-with-different-user-is-not-working/27732 "2018-06-07T14:23:01Z")

</div>

Ansible Version 2.5.4 I have a playbook which include two different role. Playbook run on localhost as root using ansible-pull role1. rpm installation require root access. role2. Application Configuration need to run …

---

## [replacing second word/string in file using replace module](https://forum.ansible.com/t/replacing-second-word-string-in-file-using-replace-module/27735)

<div class="topic-metadata">

**Author:** [@dkishore.unix](https://forum.ansible.com/u/dkishore.unix)\
**Replies:** 0\
**Last updated:** [June 7, 2018, 2:04pm UTC](https://forum.ansible.com/t/replacing-second-word-string-in-file-using-replace-module/27735 "2018-06-07T14:04:02Z")

</div>

I am trying to replace a second occurrence string or word in particular file using replace module but its replace all the strings/words matched in file. Ansible playbook:

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

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