# Ansible Project

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

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

**Page:** 146

---

## [How to connect to ec2 instance using .pem file in ansible](https://forum.ansible.com/t/how-to-connect-to-ec2-instance-using-pem-file-in-ansible/32134)

<div class="topic-metadata">

**Author:** [@anilkumar\_panditi](https://forum.ansible.com/u/anilkumar_panditi)\
**Replies:** 4\
**Last updated:** [February 4, 2020, 1:29pm UTC](https://forum.ansible.com/t/how-to-connect-to-ec2-instance-using-pem-file-in-ansible/32134 "2020-02-04T13:29:15Z")

</div>

Hi , I am trying to connect to ec2 instance using .pem file in ansible. I am getting below error. fatal: \[hdi\_master1\]: UNREACHABLE! =\> { “changed”: false, “msg”: “Failed to connect to the host via ssh: Permission d…

---

## [ansible playbook executing the tasks on localhost(Master Node) instead of remote node](https://forum.ansible.com/t/ansible-playbook-executing-the-tasks-on-localhost-master-node-instead-of-remote-node/32133)

<div class="topic-metadata">

**Author:** [@anilkumar\_panditi](https://forum.ansible.com/u/anilkumar_panditi)\
**Replies:** 1\
**Last updated:** [February 4, 2020, 11:43am UTC](https://forum.ansible.com/t/ansible-playbook-executing-the-tasks-on-localhost-master-node-instead-of-remote-node/32133 "2020-02-04T11:43:35Z")

</div>

this is my dynamic inventory inventory of servers #ungrouped servers hdi\_master1 ansible\_host=13.234.186.61 ansible\_user=centos --private-key=/home/centos/openshift.pem #hdinsights groups \[hdinsights\_all\] hdi\_master…

---

## [get context extra vars before 2.8](https://forum.ansible.com/t/get-context-extra-vars-before-2-8/32117)

<div class="topic-metadata">

**Author:** [@FERREIRA\_CHRISTOPHE](https://forum.ansible.com/u/FERREIRA_CHRISTOPHE)\
**Replies:** 2\
**Last updated:** [February 4, 2020, 11:32am UTC](https://forum.ansible.com/t/get-context-extra-vars-before-2-8/32117 "2020-02-04T11:32:23Z")

</div>

Hello it’s possible to get extra\_vars on the context of host before 2.8 in python ? In 2.8 load\_extra\_vars is work

---

## [start servers using ansible playbook](https://forum.ansible.com/t/start-servers-using-ansible-playbook/32128)

<div class="topic-metadata">

**Author:** [@Cloud09](https://forum.ansible.com/u/Cloud09)\
**Replies:** 3\
**Last updated:** [February 4, 2020, 10:41am UTC](https://forum.ansible.com/t/start-servers-using-ansible-playbook/32128 "2020-02-04T10:41:12Z")

</div>

Hello Team, I am writing a playbook to start weblogic servers, could anyone help me any syntax errors, I could not make item/item display as it should be, or please feel free to correct me here if any incorrect syntax a…

---

## [error while deploying docker-ce using ansible](https://forum.ansible.com/t/error-while-deploying-docker-ce-using-ansible/32122)

<div class="topic-metadata">

**Author:** [@Vishal\_Bobade](https://forum.ansible.com/u/Vishal_Bobade)\
**Replies:** 2\
**Last updated:** [February 4, 2020, 7:58am UTC](https://forum.ansible.com/t/error-while-deploying-docker-ce-using-ansible/32122 "2020-02-04T07:58:34Z")

</div>

Hi, I am facing below error while running ansible role in my environment. could some one quide me how can I fix this.

---

## [multi process](https://forum.ansible.com/t/multi-process/32131)

<div class="topic-metadata">

**Author:** [@Mark\_Anthony\_Garcia](https://forum.ansible.com/u/Mark_Anthony_Garcia)\
**Replies:** 0\
**Last updated:** [February 4, 2020, 6:59am UTC](https://forum.ansible.com/t/multi-process/32131 "2020-02-04T06:59:06Z")

</div>

has anyone tried multi process / multi threading in ansible? not sure if my term is correct, but this is available in Python and was wondering if anyone was able to apply the same in Ansible. thank you. Mark

---

## [Selenium Script to be trigger from ansible Playbook](https://forum.ansible.com/t/selenium-script-to-be-trigger-from-ansible-playbook/32130)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 0\
**Last updated:** [February 4, 2020, 5:30am UTC](https://forum.ansible.com/t/selenium-script-to-be-trigger-from-ansible-playbook/32130 "2020-02-04T05:30:57Z")

</div>

Dear All, I am trying to automate selenium script for web browser testing which will be trigger by ansible playbook once configuration is done. Please share if you have any sample playbook which can be modified and use…

---

## [ansible support](https://forum.ansible.com/t/ansible-support/32129)

<div class="topic-metadata">

**Author:** [@vishwas\_govekar1](https://forum.ansible.com/u/vishwas_govekar1)\
**Replies:** 3\
**Last updated:** [February 4, 2020, 3:44am UTC](https://forum.ansible.com/t/ansible-support/32129 "2020-02-04T03:44:59Z")

</div>

Hi I need some project support on ansible scrippting

---

## [Issues with specifying group vars with a dynamic EC2 inventory](https://forum.ansible.com/t/issues-with-specifying-group-vars-with-a-dynamic-ec2-inventory/32123)

<div class="topic-metadata">

**Author:** [@Justin\_Madill](https://forum.ansible.com/u/Justin_Madill)\
**Replies:** 3\
**Last updated:** [February 3, 2020, 10:25pm UTC](https://forum.ansible.com/t/issues-with-specifying-group-vars-with-a-dynamic-ec2-inventory/32123 "2020-02-03T22:25:31Z")

</div>

I’m currently building out a PoC with Ansible Tower to manage our primarily windows environment. I’ve had everything working from the command line before starting with Tower, that that was using a static inventory. The…

---

## [please advise - Not generating logs after with ansible log\_group](https://forum.ansible.com/t/please-advise-not-generating-logs-after-with-ansible-log-group/32105)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 2\
**Last updated:** [February 3, 2020, 6:31pm UTC](https://forum.ansible.com/t/please-advise-not-generating-logs-after-with-ansible-log-group/32105 "2020-02-03T18:31:07Z")

</div>

I am unable to generate logs with the playbook. Please advise? ansible.cfg \[defaults\] inventory = ./hosts \[callback\_log\_plays\] log\_folder = /var/log/ansible/hosts env:ANSIBLE\_LOG\_FOLDER host file \[windows\] windo…

---

## [install postgresql](https://forum.ansible.com/t/install-postgresql/32118)

<div class="topic-metadata">

**Author:** [@gaddam\_mahendra](https://forum.ansible.com/u/gaddam_mahendra)\
**Replies:** 4\
**Last updated:** [February 3, 2020, 3:12pm UTC](https://forum.ansible.com/t/install-postgresql/32118 "2020-02-03T15:12:42Z")

</div>

HI Team, could you please post a playbook to install postgresql database thanks mahi

---

## [Convert PowerShell script to Ansible task](https://forum.ansible.com/t/convert-powershell-script-to-ansible-task/32121)

<div class="topic-metadata">

**Author:** [@Rahul\_Rawat](https://forum.ansible.com/u/Rahul_Rawat)\
**Replies:** 1\
**Last updated:** [February 3, 2020, 12:58pm UTC](https://forum.ansible.com/t/convert-powershell-script-to-ansible-task/32121 "2020-02-03T12:58:07Z")

</div>

Hi, I have to convert PowerShell Script (using if else condition) into anisble task. How we can work with condition in ansible tasks. Here is my powershell script. $officeInstalled = Get-WmiObject win32\_product | whe…

---

## [Concatenate variable and string in looping with\_items](https://forum.ansible.com/t/concatenate-variable-and-string-in-looping-with-items/32112)

<div class="topic-metadata">

**Author:** [@Vishal\_Bobade](https://forum.ansible.com/u/Vishal_Bobade)\
**Replies:** 10\
**Last updated:** [February 3, 2020, 5:24am UTC](https://forum.ansible.com/t/concatenate-variable-and-string-in-looping-with-items/32112 "2020-02-03T05:24:52Z")

</div>

Is it possible to concatenate like below? name: Retaining latest backup directory shell: find $(pwd)/backup -type d -prune -exec ls -d {} ; |tail -1 register: import\_back\_up\_dir name: Import dashboard grafana\_da…

---

## [Ansible Tower and Facts](https://forum.ansible.com/t/ansible-tower-and-facts/32115)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 1\
**Last updated:** [February 1, 2020, 8:14am UTC](https://forum.ansible.com/t/ansible-tower-and-facts/32115 "2020-02-01T08:14:54Z")

</div>

\- name: Set facts set\_fact: dummy\_fact: "Hello world" cacheable: yes delegate\_to: fake\_host delegate\_facts: true This sets the fact in the hostname fake\_host just fine. \[...\] I have tried to …

---

## [Ansible Replace a value in a File](https://forum.ansible.com/t/ansible-replace-a-value-in-a-file/32109)

<div class="topic-metadata">

**Author:** [@Sai\_Prasha](https://forum.ansible.com/u/Sai_Prasha)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 2:07pm UTC](https://forum.ansible.com/t/ansible-replace-a-value-in-a-file/32109 "2020-01-31T14:07:14Z")

</div>

I am trying to Replace a String in an xml file . but using win\_lineinfile module only the last occurence of it is replaced how can i replace a String in all occurences . One Solution i found is tro run from powershell …

---

## [Kerberos error](https://forum.ansible.com/t/kerberos-error/32104)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 1:29pm UTC](https://forum.ansible.com/t/kerberos-error/32104 "2020-01-31T13:29:16Z")

</div>

I don;t know why i keep getting Kerberos error on every new machine, Any idea? HTTPSConnectionPool(host=‘workstation’, port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError(‘\<urllib3.connection…

---

## [Filter out text from a json object created by an ansible register](https://forum.ansible.com/t/filter-out-text-from-a-json-object-created-by-an-ansible-register/32099)

<div class="topic-metadata">

**Author:** [@Anand\_Solomon](https://forum.ansible.com/u/Anand_Solomon)\
**Replies:** 4\
**Last updated:** [January 31, 2020, 4:27am UTC](https://forum.ansible.com/t/filter-out-text-from-a-json-object-created-by-an-ansible-register/32099 "2020-01-31T04:27:23Z")

</div>

Hi, How do I take only the text from the below from json created by an ansible register I have this name: Display the query results debug: msg: “{{ query\_result }}” and I get \[\[“TESTDBA”\]\], I want the value to be …

---

## [Able to extract list of installed rpm using "shell" module but not with yum module](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086)

<div class="topic-metadata">

**Author:** [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Replies:** 3\
**Last updated:** [January 31, 2020, 4:25am UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086 "2020-01-31T04:25:08Z")

</div>

Hi Team, I am able to extract the selected list of installed rpms using ansible “shell” module ,But when I tried using “yum” module ,it’s no success . Your help would be appreciated . The playbook which is running wit…

---

## [ansible optimization](https://forum.ansible.com/t/ansible-optimization/32106)

<div class="topic-metadata">

**Author:** [@alex\_mers](https://forum.ansible.com/u/alex_mers)\
**Replies:** 0\
**Last updated:** [January 31, 2020, 2:43am UTC](https://forum.ansible.com/t/ansible-optimization/32106 "2020-01-31T02:43:42Z")

</div>

I wanna optimization time and low used resource ansible when running tasks or run code, for example when use fork on ansible.cfg file, CPU usage is up up and up but I wanna resource usage is low or medium use, anyone can…

---

## [ansible optimization](https://forum.ansible.com/t/ansible-optimization/32102)

<div class="topic-metadata">

**Author:** [@alex\_mers](https://forum.ansible.com/u/alex_mers)\
**Replies:** 0\
**Last updated:** [January 30, 2020, 7:22pm UTC](https://forum.ansible.com/t/ansible-optimization/32102 "2020-01-30T19:22:09Z")

</div>

I wanna optimization time and low used resource ansible when running tasks or run code, for example when use fork on ansible.cfg file, CPU usage is up up and up but I wanna resource usage is low or medium use, anyone can…

---

## [Run a command only on hosts that have low CPU usage](https://forum.ansible.com/t/run-a-command-only-on-hosts-that-have-low-cpu-usage/32094)

<div class="topic-metadata">

**Author:** [@Eric\_S](https://forum.ansible.com/u/Eric_S)\
**Replies:** 4\
**Last updated:** [January 30, 2020, 6:07pm UTC](https://forum.ansible.com/t/run-a-command-only-on-hosts-that-have-low-cpu-usage/32094 "2020-01-30T18:07:59Z")

</div>

Hi Folks, I am looking for a simple way to have Ansible perform the following automation for me: From a set of N hosts, find out which host has the lowest CPU usage at the moment Run a command on only that host. This…

---

## [Adding new host and group gives error](https://forum.ansible.com/t/adding-new-host-and-group-gives-error/32096)

<div class="topic-metadata">

**Author:** [@Punit\_Jain](https://forum.ansible.com/u/Punit_Jain)\
**Replies:** 3\
**Last updated:** [January 30, 2020, 5:24pm UTC](https://forum.ansible.com/t/adding-new-host-and-group-gives-error/32096 "2020-01-30T17:24:29Z")

</div>

Hi, I have a playbook requirement where new hosts come and leave. Based on it i plan to create groups dynamically. However below playbook gives an error:

---

## [oracle\_user module error expecting cx\_oracle in DB server](https://forum.ansible.com/t/oracle-user-module-error-expecting-cx-oracle-in-db-server/32059)

<div class="topic-metadata">

**Author:** [@Anand\_Solomon](https://forum.ansible.com/u/Anand_Solomon)\
**Replies:** 8\
**Last updated:** [January 30, 2020, 2:43pm UTC](https://forum.ansible.com/t/oracle-user-module-error-expecting-cx-oracle-in-db-server/32059 "2020-01-30T14:43:45Z")

</div>

I am trying to create oracle user using oracle\_user module in a RDS server. Here is my playbook hosts: all vars: oracle\_home: /home/ansible/instantclient\_12\_2 user: SYSDBA password: \*\*\*\*\*\* prt: “1521” hostname: “…

---

## [Using netconf to configure cisco network device](https://forum.ansible.com/t/using-netconf-to-configure-cisco-network-device/32098)

<div class="topic-metadata">

**Author:** [@Eshna\_Jain](https://forum.ansible.com/u/Eshna_Jain)\
**Replies:** 0\
**Last updated:** [January 30, 2020, 12:53pm UTC](https://forum.ansible.com/t/using-netconf-to-configure-cisco-network-device/32098 "2020-01-30T12:53:39Z")

</div>

I am trying to use cisco iosxr module to configure my device. When i use filter in get-config rpc, it is being created fine. I am having trouble to identify from where is the full rpc is being generated as it using nc na…

---

## [Ansible WinRM dont run concurrent process](https://forum.ansible.com/t/ansible-winrm-dont-run-concurrent-process/32082)

<div class="topic-metadata">

**Author:** [@wagfeliz](https://forum.ansible.com/u/wagfeliz)\
**Replies:** 2\
**Last updated:** [January 30, 2020, 10:38am UTC](https://forum.ansible.com/t/ansible-winrm-dont-run-concurrent-process/32082 "2020-01-30T10:38:27Z")

</div>

Hi, We have 3 playbooks that runs concurrently winrm process on a windows server, I did notice even when I start all of then in the same time, only 1 runs, the others get stuck and wait for the first to finish, then sta…

---

## [Create module mssql\_query Error port](https://forum.ansible.com/t/create-module-mssql-query-error-port/32085)

<div class="topic-metadata">

**Author:** [@Karther](https://forum.ansible.com/u/Karther)\
**Replies:** 2\
**Last updated:** [January 30, 2020, 8:54am UTC](https://forum.ansible.com/t/create-module-mssql-query-error-port/32085 "2020-01-30T08:54:42Z")

</div>

Hello, I have create this module mssql\_query.py in ansible in /library/mssql\_query.py : https://github.com/melmorabity/ansible-mssql-query/blob/master/mssql\_query.py I have this error : The error was: TypeError: conn…

---

## [Help with "vmware\_guest\_snapshot"](https://forum.ansible.com/t/help-with-vmware-guest-snapshot/32091)

<div class="topic-metadata">

**Author:** [@KJoubert1966](https://forum.ansible.com/u/KJoubert1966)\
**Replies:** 2\
**Last updated:** [January 30, 2020, 7:21am UTC](https://forum.ansible.com/t/help-with-vmware-guest-snapshot/32091 "2020-01-30T07:21:43Z")

</div>

I am not a programmer and very new to Ansible, but I have written a playbook that allows me to create snapshots of all the VMs on a Vcenter… --- - name: prepare for snapshots hosts: PROD\_local\_vmware\_vcenter gather\_…

---

## [ansible-playbook 2.7.10 + Packer + winrm + windows 2012r2 ssl: HTTPSConnectionPool(host='localhost', port=5986): Max retries exceeded with url: /wsman](https://forum.ansible.com/t/ansible-playbook-2-7-10-packer-winrm-windows-2012r2-ssl-httpsconnectionpool-host-localhost-port-5986-max-retries-exceeded-with-url-wsman/32093)

<div class="topic-metadata">

**Author:** [@John\_Roh](https://forum.ansible.com/u/John_Roh)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 4:57am UTC](https://forum.ansible.com/t/ansible-playbook-2-7-10-packer-winrm-windows-2012r2-ssl-httpsconnectionpool-host-localhost-port-5986-max-retries-exceeded-with-url-wsman/32093 "2020-01-30T04:57:07Z")

</div>

Hi I’m trying to build Windows 2012r2 ec2 windows AMI that I can provisioned Powershell over winrm but I’m getting SSL exception error as below. Running Ansible playbook ping verified and win command getting the hostname…

---

## [Rename of Folder on Windows using Playbook](https://forum.ansible.com/t/rename-of-folder-on-windows-using-playbook/32095)

<div class="topic-metadata">

**Author:** [@Sai\_Prasha](https://forum.ansible.com/u/Sai_Prasha)\
**Replies:** 0\
**Last updated:** [January 30, 2020, 4:22am UTC](https://forum.ansible.com/t/rename-of-folder-on-windows-using-playbook/32095 "2020-01-30T04:22:23Z")

</div>

I want to rename the folder using ansible playbook , But i could not find any module . I found a solution in stackover flow but it did’t work. Any solutions are workaround please name: rename the file win\_command: “cm…

---

## [Error using state: absent in oracle\_grant module](https://forum.ansible.com/t/error-using-state-absent-in-oracle-grant-module/32075)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 3:44am UTC](https://forum.ansible.com/t/error-using-state-absent-in-oracle-grant-module/32075 "2020-01-30T03:44:57Z")

</div>

Hi Anand As I told you (twice) before, those oracle modules are NOT part of the ansible distribution. Please get support with the authors of those modules. I see that you’ve done that: https://github.com/oravirt/ansib…

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

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