# Ansible Project

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

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

**Page:** 133

---

## [ansible add esxi host to datacenter or folder](https://forum.ansible.com/t/ansible-add-esxi-host-to-datacenter-or-folder/32673)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 9\
**Last updated:** [April 14, 2020, 12:49am UTC](https://forum.ansible.com/t/ansible-add-esxi-host-to-datacenter-or-folder/32673 "2020-04-14T00:49:52Z")

</div>

I am new to ansible and want to know how to add a esxi host to vcenter in a datacenter I have the following in a yml file but not sure what else to do hosts: localhost connection: local tasks: name: include vars …

---

## [Iterating ansible\_mounts and adding items to a list](https://forum.ansible.com/t/iterating-ansible-mounts-and-adding-items-to-a-list/32674)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 6:15pm UTC](https://forum.ansible.com/t/iterating-ansible-mounts-and-adding-items-to-a-list/32674 "2020-04-13T18:15:52Z")

</div>

I’m trying to come up a way to iterate through ansible\_mounts and, if one of the mounts is over 80% used, add that to a list that i can print out later and possibly email it. Here’s what I have so far:

---

## [strategy=free with adhoc?](https://forum.ansible.com/t/strategy-free-with-adhoc/32669)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [April 13, 2020, 10:53am UTC](https://forum.ansible.com/t/strategy-free-with-adhoc/32669 "2020-04-13T10:53:06Z")

</div>

Hi For simple fire & forget commands with ansible there is no requirement to go over the hosts sequentially. Ideally i'd use strategy=free - but that doesn't seem to be possible with ansible, only with ansible-playbo…

---

## [Problem Role Mysql](https://forum.ansible.com/t/problem-role-mysql/32670)

<div class="topic-metadata">

**Author:** [@marcksonjr](https://forum.ansible.com/u/marcksonjr)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 10:51am UTC](https://forum.ansible.com/t/problem-role-mysql/32670 "2020-04-13T10:51:36Z")

</div>

Hi guys, Im having a problem when i run one playbook with my role to install and create a database inside mysql. The first time i run the playbook it finishes successfully. But when i run again i get an error saying a…

---

## [Ansible netconf module supporting netconf notifications](https://forum.ansible.com/t/ansible-netconf-module-supporting-netconf-notifications/32642)

<div class="topic-metadata">

**Author:** [@Senthil\_Jayakumar](https://forum.ansible.com/u/Senthil_Jayakumar)\
**Replies:** 3\
**Last updated:** [April 13, 2020, 9:21am UTC](https://forum.ansible.com/t/ansible-netconf-module-supporting-netconf-notifications/32642 "2020-04-13T09:21:14Z")

</div>

Hi There, I’m newbie to Ansible and would like to know if Ansible netconf module supports subscribing and processing of netconf notifications? Please confirm and redirect me to appropriate documentation and samples. T…

---

## [Change hosts variable when including another playbook](https://forum.ansible.com/t/change-hosts-variable-when-including-another-playbook/22634)

<div class="topic-metadata">

**Author:** [@Tristan\_Muntsinger](https://forum.ansible.com/u/Tristan_Muntsinger)\
**Replies:** 10\
**Last updated:** [April 13, 2020, 7:10am UTC](https://forum.ansible.com/t/change-hosts-variable-when-including-another-playbook/22634 "2020-04-13T07:10:50Z")

</div>

How do I change hosts when including tasks from another playbook? I’ve tried both methods I could find below, but neither seems to work: \` name: example hosts: localhost tasks: name: execute this task include: task…

---

## [Installing the node\_modules](https://forum.ansible.com/t/installing-the-node-modules/32665)

<div class="topic-metadata">

**Author:** [@sai\_kumar](https://forum.ansible.com/u/sai_kumar)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 12:10am UTC](https://forum.ansible.com/t/installing-the-node-modules/32665 "2020-04-13T00:10:02Z")

</div>

I did the node package managers with nvm nvm is installed in usr profile directory ~/.nvm node is installed at ~/.nvm/versions/v10.19.0 , v13.10.0 now i need to install the node modules I tried with command: bash -c …

---

## [ansible updating vmware tools on windows vms](https://forum.ansible.com/t/ansible-updating-vmware-tools-on-windows-vms/32662)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 10:20pm UTC](https://forum.ansible.com/t/ansible-updating-vmware-tools-on-windows-vms/32662 "2020-04-12T22:20:26Z")

</div>

does anyone have a playbook or how do i get started with a playbook updating vmwasr tools on windows guests?

---

## [json\_query & regular expression](https://forum.ansible.com/t/json-query-regular-expression/32658)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 8\
**Last updated:** [April 12, 2020, 9:08pm UTC](https://forum.ansible.com/t/json-query-regular-expression/32658 "2020-04-12T21:08:57Z")

</div>

In jason query how can i add regular expression ? eg if have vm1, vm2,vm3 below query can be adjusted ? eg query: “\[?guest\_name == ‘vm\*’ \]” , seems does not work in below case https://jmespath.org/specification.html#fil…

---

## [Hosts File - Get group name , only one item from group based on lookup](https://forum.ansible.com/t/hosts-file-get-group-name-only-one-item-from-group-based-on-lookup/32659)

<div class="topic-metadata">

**Author:** [@Adam\_McGill](https://forum.ansible.com/u/Adam_McGill)\
**Replies:** 4\
**Last updated:** [April 12, 2020, 8:09pm UTC](https://forum.ansible.com/t/hosts-file-get-group-name-only-one-item-from-group-based-on-lookup/32659 "2020-04-12T20:09:00Z")

</div>

Is it possible to specify in a playbook hosts value to be a group item from hosts file? example: Hosts file contains: \[groupone\] comname1 comname2 comname3 in the playbook would like it to grab the group (groupone…

---

## [Ansible managed host issue](https://forum.ansible.com/t/ansible-managed-host-issue/32664)

<div class="topic-metadata">

**Author:** [@Orkhan\_Mammadov](https://forum.ansible.com/u/Orkhan_Mammadov)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 6:42pm UTC](https://forum.ansible.com/t/ansible-managed-host-issue/32664 "2020-04-12T18:42:52Z")

</div>

Hi guys, Could you please help me regarding to the following issue? I have setup a control host and 2 managed host, IP Addresses are static and dns is over /etc/hosts file. SSH Keygen is created and copied to managed h…

---

## [How do I find which community a module has moved to?](https://forum.ansible.com/t/how-do-i-find-which-community-a-module-has-moved-to/32663)

<div class="topic-metadata">

**Author:** [@Ben\_Coleman](https://forum.ansible.com/u/Ben_Coleman)\
**Replies:** 0\
**Last updated:** [April 12, 2020, 5:17pm UTC](https://forum.ansible.com/t/how-do-i-find-which-community-a-module-has-moved-to/32663 "2020-04-12T17:17:09Z")

</div>

Just looked over the structure changes for Ansible 2.10, and I'm left with one question - how do I figure out which community a module has moved to? E.g., I was wanting to find where the linode\_v4 module went to, and…

---

## [file not found](https://forum.ansible.com/t/file-not-found/32422)

<div class="topic-metadata">

**Author:** [@eddie\_eakemu1](https://forum.ansible.com/u/eddie_eakemu1)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 9:34am UTC](https://forum.ansible.com/t/file-not-found/32422 "2020-04-12T09:34:26Z")

</div>

I am trying to run a playbook and the details come from a file but it is giving me an error message ansible-playbook -i inventory junos\_config.yml PLAY \[Juniper SRX configuration compliance checks\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Manage Windows Patching with Ansible](https://forum.ansible.com/t/manage-windows-patching-with-ansible/32661)

<div class="topic-metadata">

**Author:** [@Thanh\_Nguyen\_Duc](https://forum.ansible.com/u/Thanh_Nguyen_Duc)\
**Replies:** 0\
**Last updated:** [April 12, 2020, 7:31am UTC](https://forum.ansible.com/t/manage-windows-patching-with-ansible/32661 "2020-04-12T07:31:24Z")

</div>

Currently, i am setting up an Ansible Engine server to manage the Window Patching in my test environment, i tried with the attached playbook but somehow ansible not able to complete it and always stuck at: META: ran hand…

---

## [Task duplication issue](https://forum.ansible.com/t/task-duplication-issue/32660)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 0\
**Last updated:** [April 12, 2020, 7:05am UTC](https://forum.ansible.com/t/task-duplication-issue/32660 "2020-04-12T07:05:12Z")

</div>

I have a playbook that requires to run disk format on 3 servers. The servers are under a worker group In my main playbook, I’m calling to “disk\_managment” playbook and I’m reading variables from an external file Main P…

---

## [using vars\_prompt in a vars file being addressed by include\_vars](https://forum.ansible.com/t/using-vars-prompt-in-a-vars-file-being-addressed-by-include-vars/32647)

<div class="topic-metadata">

**Author:** [@Dave\_Zarei](https://forum.ansible.com/u/Dave_Zarei)\
**Replies:** 2\
**Last updated:** [April 11, 2020, 4:19pm UTC](https://forum.ansible.com/t/using-vars-prompt-in-a-vars-file-being-addressed-by-include-vars/32647 "2020-04-11T16:19:47Z")

</div>

HI, Got a quick question, I’m trying to use include\_vars in a main play which addresses a vars file in which there is vars\_prompt (i also have an include\_tasks in the same main play which uses the variables being addres…

---

## [Using OpenSSL module without files](https://forum.ansible.com/t/using-openssl-module-without-files/32657)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [April 11, 2020, 8:07am UTC](https://forum.ansible.com/t/using-openssl-module-without-files/32657 "2020-04-11T08:07:48Z")

</div>

Hi Our ansible deployments are using OpenSSL key materials that are stored as multiline values in yaml vars files. I’d like to use openssl\_certificate\_info but that seems to require a path parameter: https://docs.ansi…

---

## [Append data to json file using ansible modules](https://forum.ansible.com/t/append-data-to-json-file-using-ansible-modules/32656)

<div class="topic-metadata">

**Author:** [@shyam.awk](https://forum.ansible.com/u/shyam.awk)\
**Replies:** 3\
**Last updated:** [April 11, 2020, 7:15am UTC](https://forum.ansible.com/t/append-data-to-json-file-using-ansible-modules/32656 "2020-04-11T07:15:25Z")

</div>

Hi All, Is it possible to update the data of json file using ansible modules. I tried on windows machine using win\_lineinfile module but the required file is not updating. The line is updating at the end of the file. …

---

## [Powershell code in Ansible playbook returns non zero error code](https://forum.ansible.com/t/powershell-code-in-ansible-playbook-returns-non-zero-error-code/32654)

<div class="topic-metadata">

**Author:** [@Nasir\_Nasir](https://forum.ansible.com/u/Nasir_Nasir)\
**Replies:** 2\
**Last updated:** [April 10, 2020, 9:51pm UTC](https://forum.ansible.com/t/powershell-code-in-ansible-playbook-returns-non-zero-error-code/32654 "2020-04-10T21:51:03Z")

</div>

Hi All, i have an issue respect to powershell code which i am using to delete file from windows machine using an Ansible code via AWX i have mongodb lookup value= ‘C:/Users/abcd/abcd/’,‘C:/abc/’, code is delete the…

---

## [Ansible on CentOS 7 problem with "selinux" on a Cisco Wireless LAN Controller](https://forum.ansible.com/t/ansible-on-centos-7-problem-with-selinux-on-a-cisco-wireless-lan-controller/32618)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 4\
**Last updated:** [April 10, 2020, 3:53pm UTC](https://forum.ansible.com/t/ansible-on-centos-7-problem-with-selinux-on-a-cisco-wireless-lan-controller/32618 "2020-04-10T15:53:07Z")

</div>

You can’t expect us to visit random URLs in order to help. Please post the playbook and error inline in your message.

---

## [Every SSH connection logs mux\_client\_read\_packet: read header failed: Broken pipe](https://forum.ansible.com/t/every-ssh-connection-logs-mux-client-read-packet-read-header-failed-broken-pipe/32320)

<div class="topic-metadata">

**Author:** [@John\_Bateman](https://forum.ansible.com/u/John_Bateman)\
**Replies:** 6\
**Last updated:** [April 10, 2020, 12:59pm UTC](https://forum.ansible.com/t/every-ssh-connection-logs-mux-client-read-packet-read-header-failed-broken-pipe/32320 "2020-04-10T12:59:51Z")

</div>

Each SSH connection throughout every playbook execution ends with Broken Pipe error message mux\_client\_read\_packet: read header failed: Broken pipe, seen with verbose logging enabled. This doesn’t cause the failure of a …

---

## [Short output from playbook like ansible -o](https://forum.ansible.com/t/short-output-from-playbook-like-ansible-o/32649)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 8:04am UTC](https://forum.ansible.com/t/short-output-from-playbook-like-ansible-o/32649 "2020-04-10T08:04:13Z")

</div>

Please suggest how can get one liner o/p eg what i get with ansible temp -b -a uptime -o , in below playbook hosts: all gather\_facts: true tasks: debug: var: ansible\_all\_ipv4\_addresses

---

## [Jason\_query on setup](https://forum.ansible.com/t/jason-query-on-setup/32648)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 7:48am UTC](https://forum.ansible.com/t/jason-query-on-setup/32648 "2020-04-10T07:48:06Z")

</div>

I am looking to find vm with 4 CPUs , Please suggest what i am doing wrong

---

## [Abort playbook in case ping task failed](https://forum.ansible.com/t/abort-playbook-in-case-ping-task-failed/32611)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 2\
**Last updated:** [April 10, 2020, 6:50am UTC](https://forum.ansible.com/t/abort-playbook-in-case-ping-task-failed/32611 "2020-04-10T06:50:34Z")

</div>

HI I’m checking ping on a few of my groups. I wish to abort the playbook if one of the IPs is not reachable - How should I update the playbook Thanks Playbook hosts: postgres1 kafka repository become: true gather…

---

## [Problems Creating VMs From Template](https://forum.ansible.com/t/problems-creating-vms-from-template/32645)

<div class="topic-metadata">

**Author:** [@AJ1](https://forum.ansible.com/u/AJ1)\
**Replies:** 5\
**Last updated:** [April 9, 2020, 7:18pm UTC](https://forum.ansible.com/t/problems-creating-vms-from-template/32645 "2020-04-09T19:18:11Z")

</div>

I have created a playbook to spin up three VMs from a vSphere template and add configurations. The VM creation portion looks like this: \` name: Clone {{ webtier\_vm\_template }} Template as Web1 & Apply Network Configu…

---

## [with\_items to get values from a shell cmd output](https://forum.ansible.com/t/with-items-to-get-values-from-a-shell-cmd-output/32640)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 3\
**Last updated:** [April 9, 2020, 5:16pm UTC](https://forum.ansible.com/t/with-items-to-get-values-from-a-shell-cmd-output/32640 "2020-04-09T17:16:51Z")

</div>

I got this error for below code - FAILED! =\> {“msg”: “template error while templating string: expected token ‘end of print statement’, got ‘=’. String: {{ var=oom.stdout }}”} Please suggest , i am trying to get pid from…

---

## [when tools status "guestToolsNotRunning" , power off the vm.](https://forum.ansible.com/t/when-tools-status-guesttoolsnotrunning-power-off-the-vm/32641)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 4\
**Last updated:** [April 9, 2020, 5:06pm UTC](https://forum.ansible.com/t/when-tools-status-guesttoolsnotrunning-power-off-the-vm/32641 "2020-04-09T17:06:24Z")

</div>

Please suggest how can i add when clause in above, ie when tools status “guestToolsNotRunning” , power off the vm.

---

## [trying to download the AIM from url using win\_get\_url - zipped file](https://forum.ansible.com/t/trying-to-download-the-aim-from-url-using-win-get-url-zipped-file/32644)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 0\
**Last updated:** [April 9, 2020, 12:36pm UTC](https://forum.ansible.com/t/trying-to-download-the-aim-from-url-using-win-get-url-zipped-file/32644 "2020-04-09T12:36:43Z")

</div>

I am trying to download AIM Client using win\_get\_url and it is failing. Is this the correct win module for downloading the zipped file from internet? If you would mind to read the error message thoroughly ... it says…

---

## [Problems with \\u001b\[31m ANSI colour codes](https://forum.ansible.com/t/problems-with-u001b-31m-ansi-colour-codes/32629)

<div class="topic-metadata">

**Author:** [@Gobi](https://forum.ansible.com/u/Gobi)\
**Replies:** 1\
**Last updated:** [April 9, 2020, 10:51am UTC](https://forum.ansible.com/t/problems-with-u001b-31m-ansi-colour-codes/32629 "2020-04-09T10:51:29Z")

</div>

Ansible Version: ansible 2.9.4 config file = /etc/ansible/ansible.cfg configured module search path = \[u'/home/gobi/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'\] ansible python module location = /…

---

## [Ansible Winrm connectivity issue -  hosts behind Cyberark](https://forum.ansible.com/t/ansible-winrm-connectivity-issue-hosts-behind-cyberark/32622)

<div class="topic-metadata">

**Author:** [@Kumaresh\_kulal](https://forum.ansible.com/u/Kumaresh_kulal)\
**Replies:** 1\
**Last updated:** [April 9, 2020, 10:45am UTC](https://forum.ansible.com/t/ansible-winrm-connectivity-issue-hosts-behind-cyberark/32622 "2020-04-09T10:45:06Z")

</div>

I need to run ansible playbooks on windows hosts protected by CyberArk. My main purpose of setting up Ansible is to mange the Windows VM’s and so far I was able to manage them without the Cyberark. With this setup I was…

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

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