# Ansible Project

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

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

**Page:** 118

---

## [win\_mapped\_drive fails with become(runas) and ansible\_become\_pass var defined](https://forum.ansible.com/t/win-mapped-drive-fails-with-become-runas-and-ansible-become-pass-var-defined/33203)

<div class="topic-metadata">

**Author:** [@viten](https://forum.ansible.com/u/viten)\
**Replies:** 3\
**Last updated:** [June 26, 2020, 6:49am UTC](https://forum.ansible.com/t/win-mapped-drive-fails-with-become-runas-and-ansible-become-pass-var-defined/33203 "2020-06-26T06:49:44Z")

</div>

Hi everyone, I’m trying to mount smb share on windows host (win10 pro) that requires authentication using win\_mapped\_drive/win\_credential Here is the playbook sample (based on docs example) \` name: Create mapped dr…

---

## [janusgraph script](https://forum.ansible.com/t/janusgraph-script/33252)

<div class="topic-metadata">

**Author:** [@Rajeeb\_sahoo](https://forum.ansible.com/u/Rajeeb_sahoo)\
**Replies:** 4\
**Last updated:** [June 25, 2020, 9:16pm UTC](https://forum.ansible.com/t/janusgraph-script/33252 "2020-06-25T21:16:24Z")

</div>

I am new in ansible project. I need to start janusgraph.sh script through ansible. when I am executing it not giving any error but janusgraph is not starting. my janusgraph is combining with Cassandra, elasticsearch, an…

---

## [Cant use dash with numbers as hostname](https://forum.ansible.com/t/cant-use-dash-with-numbers-as-hostname/33264)

<div class="topic-metadata">

**Author:** [@CWollinger1](https://forum.ansible.com/u/CWollinger1)\
**Replies:** 0\
**Last updated:** [June 25, 2020, 2:56pm UTC](https://forum.ansible.com/t/cant-use-dash-with-numbers-as-hostname/33264 "2020-06-25T14:56:53Z")

</div>

Hi all, is there a way to escape the dash/minus in the hostname (when using numbers) hostfile: test1 ansible\_host=10-1 test2 ansible\_host=“10-1” Result: bash-4.4# ansible-inventory -i hosts --list { “\_meta”: { “…

---

## [Custom monitoring task in ansible](https://forum.ansible.com/t/custom-monitoring-task-in-ansible/33260)

<div class="topic-metadata">

**Author:** [@Jagadeeshkumar\_Ditta](https://forum.ansible.com/u/Jagadeeshkumar_Ditta)\
**Replies:** 2\
**Last updated:** [June 25, 2020, 2:12pm UTC](https://forum.ansible.com/t/custom-monitoring-task-in-ansible/33260 "2020-06-25T14:12:22Z")

</div>

I have a requirement where in I need to create a monitoring task to monitor other task completions (all are part of the same playbook). Mainly the monitoring task has to take certain actions based on the progress made by…

---

## [Handling prompts and drop-downs via ansible 2.9](https://forum.ansible.com/t/handling-prompts-and-drop-downs-via-ansible-2-9/33259)

<div class="topic-metadata">

**Author:** [@Nishant\_Passari](https://forum.ansible.com/u/Nishant_Passari)\
**Replies:** 2\
**Last updated:** [June 25, 2020, 10:05am UTC](https://forum.ansible.com/t/handling-prompts-and-drop-downs-via-ansible-2-9/33259 "2020-06-25T10:05:20Z")

</div>

Hi everyone, Am trying to install jenkins-x version 2.0.785 via ansible 2.9.9. How do I handle the prompts like “Please enter the name you wish to use with git:” that I get while installing jenkins-x? I get the prompt …

---

## [unsupported parameter](https://forum.ansible.com/t/unsupported-parameter/33261)

<div class="topic-metadata">

**Author:** [@Jenisha\_T](https://forum.ansible.com/u/Jenisha_T)\
**Replies:** 3\
**Last updated:** [June 25, 2020, 9:35am UTC](https://forum.ansible.com/t/unsupported-parameter/33261 "2020-06-25T09:35:50Z")

</div>

My Playbook:

---

## [Steps required for aws/azure migration](https://forum.ansible.com/t/steps-required-for-aws-azure-migration/33255)

<div class="topic-metadata">

**Author:** [@Naresh\_Kasula](https://forum.ansible.com/u/Naresh_Kasula)\
**Replies:** 2\
**Last updated:** [June 25, 2020, 8:32am UTC](https://forum.ansible.com/t/steps-required-for-aws-azure-migration/33255 "2020-06-25T08:32:44Z")

</div>

Hi Team, Can anyone help me how to migrate to aws/azure cloud using cloudendure through Ansible scripts. Regards, Naresh K

---

## [Ansible playbook error when daemon\_reload:yes](https://forum.ansible.com/t/ansible-playbook-error-when-daemon-reload-yes/33254)

<div class="topic-metadata">

**Author:** [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Replies:** 2\
**Last updated:** [June 25, 2020, 7:11am UTC](https://forum.ansible.com/t/ansible-playbook-error-when-daemon-reload-yes/33254 "2020-06-25T07:11:03Z")

</div>

Hi Guys, I am getting the below error as described in StackOverflow post, I would appreciate guidance as to why it is giving Connection time out error https://stackoverflow.com/questions/62566871/ansible-errros-out-whe…

---

## [CentOS repository patching](https://forum.ansible.com/t/centos-repository-patching/33234)

<div class="topic-metadata">

**Author:** [@Snehal\_Mehar](https://forum.ansible.com/u/Snehal_Mehar)\
**Replies:** 2\
**Last updated:** [June 25, 2020, 7:05am UTC](https://forum.ansible.com/t/centos-repository-patching/33234 "2020-06-25T07:05:35Z")

</div>

Hello, I need help with setting up Centos client-server with centos repository URL. It should add a repository URL to the client-server and patch to the next available version identifying the existing os version. I hav…

---

## [Handling prompts using ansible 2.9 with ansible\_connection=ssh](https://forum.ansible.com/t/handling-prompts-using-ansible-2-9-with-ansible-connection-ssh/33256)

<div class="topic-metadata">

**Author:** [@Nishant\_Passari](https://forum.ansible.com/u/Nishant_Passari)\
**Replies:** 1\
**Last updated:** [June 25, 2020, 6:27am UTC](https://forum.ansible.com/t/handling-prompts-using-ansible-2-9-with-ansible-connection-ssh/33256 "2020-06-25T06:27:23Z")

</div>

Hi everyone, I am trying to handle yes/no and other prompts using ansible 2.9 and tried using the shell and expect module via ansible. Can you guys help me out regarding the same. https://stackoverflow.com/questions/6…

---

## [win\_command and when condition](https://forum.ansible.com/t/win-command-and-when-condition/33257)

<div class="topic-metadata">

**Author:** [@shyam.awk](https://forum.ansible.com/u/shyam.awk)\
**Replies:** 0\
**Last updated:** [June 25, 2020, 6:25am UTC](https://forum.ansible.com/t/win-command-and-when-condition/33257 "2020-06-25T06:25:28Z")

</div>

Hi, Im trying to rename the file using win\_command if the file exists using when condition, other wise it won’t execute the command, but it is failing, Can any one suggest. name: Rename the file based on condition wi…

---

## [Need help for ternary operator in ansible](https://forum.ansible.com/t/need-help-for-ternary-operator-in-ansible/33243)

<div class="topic-metadata">

**Author:** [@Rahul\_Kumar1](https://forum.ansible.com/u/Rahul_Kumar1)\
**Replies:** 1\
**Last updated:** [June 25, 2020, 5:37am UTC](https://forum.ansible.com/t/need-help-for-ternary-operator-in-ansible/33243 "2020-06-25T05:37:15Z")

</div>

Hi Ansible Gurus , i have below task : name: RPM EPOCH Finder #command: rpm -qa --qf ‘%|EPOCH?{%{EPOCH}}:{0}|\\n’ {{ item.split(‘.’)\[0\] | regex\_replace(‘-\\d+’, ‘’)}} command: rpm -qa --qf ‘%|EPOCH?{%{EPOCH}}:{0}|\\n’ …

---

## [fatal: \[localhost\]: FAILED! =\> {"changed": false, "msg": "Instance creation failed](https://forum.ansible.com/t/fatal-localhost-failed-changed-false-msg-instance-creation-failed/33233)

<div class="topic-metadata">

**Author:** [@Mujeeb\_k.s](https://forum.ansible.com/u/Mujeeb_k.s)\
**Replies:** 4\
**Last updated:** [June 25, 2020, 2:57am UTC](https://forum.ansible.com/t/fatal-localhost-failed-changed-false-msg-instance-creation-failed/33233 "2020-06-25T02:57:27Z")

</div>

Hi I am trying to create EC2 in using play book, but i am unable to create instance I am getting below error Please help me, how can i fix this issue \[root@jenkinansible ansible\]# ansible-playbook ec2.yml PLAY \[crea…

---

## [Unreachable : Failed to connect to the host via ssh](https://forum.ansible.com/t/unreachable-failed-to-connect-to-the-host-via-ssh/33248)

<div class="topic-metadata">

**Author:** [@Mahesh\_b](https://forum.ansible.com/u/Mahesh_b)\
**Replies:** 4\
**Last updated:** [June 25, 2020, 1:26am UTC](https://forum.ansible.com/t/unreachable-failed-to-connect-to-the-host-via-ssh/33248 "2020-06-25T01:26:34Z")

</div>

Dear All, I have created my RHEL 8, AWS EC2 instances and Windows 2019 AWS EC2 instance And, have installed Ansible and followed the prerequisites on control node. Equally I have created user and ran the script https:…

---

## [Loop over list of dicts in ansible](https://forum.ansible.com/t/loop-over-list-of-dicts-in-ansible/33247)

<div class="topic-metadata">

**Author:** [@BIJAY\_PARIDA](https://forum.ansible.com/u/BIJAY_PARIDA)\
**Replies:** 2\
**Last updated:** [June 24, 2020, 8:47pm UTC](https://forum.ansible.com/t/loop-over-list-of-dicts-in-ansible/33247 "2020-06-24T20:47:22Z")

</div>

I have a list of dicst like this - “lv”: \[ { “CreatedDate”: “2020-06-23T16:49:55.504+0000”, “Description”: “Layer 0”, “LayerVersionArn”: “arn:aws:lambda:us-east-1”, “Version”: 10 }, { “CreatedDate”: “2020-06-23T…

---

## [vmware\_vm\_inventory filter](https://forum.ansible.com/t/vmware-vm-inventory-filter/33250)

<div class="topic-metadata">

**Author:** [@Todd\_Schaal](https://forum.ansible.com/u/Todd_Schaal)\
**Replies:** 2\
**Last updated:** [June 24, 2020, 5:40pm UTC](https://forum.ansible.com/t/vmware-vm-inventory-filter/33250 "2020-06-24T17:40:05Z")

</div>

I have the vmware\_vm\_inventory plugin working. My issue is that it returns everything, including powered-off vms. I can filter them out when I run my playbooks, but I’d prefer they not be in my inventory in the first pla…

---

## [win\_copy updating timestamps](https://forum.ansible.com/t/win-copy-updating-timestamps/33249)

<div class="topic-metadata">

**Author:** [@Callum\_Elliott](https://forum.ansible.com/u/Callum_Elliott)\
**Replies:** 0\
**Last updated:** [June 24, 2020, 4:20pm UTC](https://forum.ansible.com/t/win-copy-updating-timestamps/33249 "2020-06-24T16:20:01Z")

</div>

Hi, I’ve got a role that performs a win\_copy from 1 directory to another. I took the files from the target, put them in GIT (source) and ran the playbook to copy the files over, the 1st time. All the timestamps in the t…

---

## [Run a task on only one server in a group in inventory.](https://forum.ansible.com/t/run-a-task-on-only-one-server-in-a-group-in-inventory/33245)

<div class="topic-metadata">

**Author:** [@soumya\_dutta](https://forum.ansible.com/u/soumya_dutta)\
**Replies:** 1\
**Last updated:** [June 24, 2020, 2:32pm UTC](https://forum.ansible.com/t/run-a-task-on-only-one-server-in-a-group-in-inventory/33245 "2020-06-24T14:32:48Z")

</div>

Hi guys, I have a situation where I need to run one task in only one server of a particular group. For example i have inventory as below \[aws\] server1 server2 \[gcp\] server3 server4 now I need to run a task on wh…

---

## [Question on using the Ansible API](https://forum.ansible.com/t/question-on-using-the-ansible-api/33235)

<div class="topic-metadata">

**Author:** [@Nick\_Kakouros](https://forum.ansible.com/u/Nick_Kakouros)\
**Replies:** 2\
**Last updated:** [June 24, 2020, 10:26am UTC](https://forum.ansible.com/t/question-on-using-the-ansible-api/33235 "2020-06-24T10:26:56Z")

</div>

I have a big ansible project where I have separated my files into playbooks, vars files, an inventory folder and roles. These files make extensive use of jinja templates. For my use case, I need to be able to access the…

---

## [Using fact as loop control in Jinja2 template](https://forum.ansible.com/t/using-fact-as-loop-control-in-jinja2-template/33239)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 4\
**Last updated:** [June 23, 2020, 8:13pm UTC](https://forum.ansible.com/t/using-fact-as-loop-control-in-jinja2-template/33239 "2020-06-23T20:13:49Z")

</div>

I have a playbook that will use the user\_find API call against our FreeIPA server to retrieve a list of all users. What I’m trying to do is get the total count, then use that count in my j2 file. I’m getting the count as…

---

## [Ansible to connect to certain switchports on Cisco 2960](https://forum.ansible.com/t/ansible-to-connect-to-certain-switchports-on-cisco-2960/33221)

<div class="topic-metadata">

**Author:** [@Jason2](https://forum.ansible.com/u/Jason2)\
**Replies:** 11\
**Last updated:** [June 23, 2020, 6:04pm UTC](https://forum.ansible.com/t/ansible-to-connect-to-certain-switchports-on-cisco-2960/33221 "2020-06-23T18:04:59Z")

</div>

I am working on a project that would require me to bump (shutdown and re-enable) switchports that are connected to an Access Point. I have created a playbook to run a command “show cdp neighbours” on the switch, and tha…

---

## [Keep-alive connections for httpapi plugins](https://forum.ansible.com/t/keep-alive-connections-for-httpapi-plugins/33238)

<div class="topic-metadata">

**Author:** [@Alexandru\_Obretin](https://forum.ansible.com/u/Alexandru_Obretin)\
**Replies:** 0\
**Last updated:** [June 23, 2020, 4:52pm UTC](https://forum.ansible.com/t/keep-alive-connections-for-httpapi-plugins/33238 "2020-06-23T16:52:26Z")

</div>

Hello, I am working on a custom HTTP connection plugin and some related modules in order to access a proprietary REST API. For this purpose, I have to provide capabilities for basic create/update/delete operations on di…

---

## [keycloak modules support or samples](https://forum.ansible.com/t/keycloak-modules-support-or-samples/32267)

<div class="topic-metadata">

**Author:** [@Torsten\_Reinhard1](https://forum.ansible.com/u/Torsten_Reinhard1)\
**Replies:** 1\
**Last updated:** [June 23, 2020, 3:11pm UTC](https://forum.ansible.com/t/keycloak-modules-support-or-samples/32267 "2020-06-23T15:11:31Z")

</div>

Hi community, I started to provision a KeyCloak instance (based on the Docker image) with the available modules keycloak\_client keycloak\_group I could´nt find any thread regarding these modules - so my question is if…

---

## [Update EC2 instances hostnames to their EC2 instance tags](https://forum.ansible.com/t/update-ec2-instances-hostnames-to-their-ec2-instance-tags/33232)

<div class="topic-metadata">

**Author:** [@Leo2](https://forum.ansible.com/u/Leo2)\
**Replies:** 0\
**Last updated:** [June 22, 2020, 9:43pm UTC](https://forum.ansible.com/t/update-ec2-instances-hostnames-to-their-ec2-instance-tags/33232 "2020-06-22T21:43:14Z")

</div>

Hi everyone, I have got a question about the EC2 and it related modules. I would like to update the hostnames of all of the EC2 instances created by another role within the same playbook (all EC2 instances are dynamic i…

---

## [Ansible become\_user failing while logging-in as vagrant user](https://forum.ansible.com/t/ansible-become-user-failing-while-logging-in-as-vagrant-user/33222)

<div class="topic-metadata">

**Author:** [@Mukuntha\_rajaa](https://forum.ansible.com/u/Mukuntha_rajaa)\
**Replies:** 5\
**Last updated:** [June 22, 2020, 6:46pm UTC](https://forum.ansible.com/t/ansible-become-user-failing-while-logging-in-as-vagrant-user/33222 "2020-06-22T18:46:55Z")

</div>

Hello, Problem: Via inventory, I am logging as “vagrant” user. I am trying to switch to another-user and then create .ssh directory with owner and group as this another-user. It is failing saying permission denied. TA…

---

## [\[action\_plugin\] Why does set\_fact overwrite a fact and my 1:1 copy set\_fact2 does not?](https://forum.ansible.com/t/action-plugin-why-does-set-fact-overwrite-a-fact-and-my-1-1-copy-set-fact2-does-not/33223)

<div class="topic-metadata">

**Author:** [@Christian\_Holl](https://forum.ansible.com/u/Christian_Holl)\
**Replies:** 1\
**Last updated:** [June 22, 2020, 6:44pm UTC](https://forum.ansible.com/t/action-plugin-why-does-set-fact-overwrite-a-fact-and-my-1-1-copy-set-fact2-does-not/33223 "2020-06-22T18:44:49Z")

</div>

Hi all, I created my own action plugin, I based it of set\_fact. It works when the fact is not set already, otherwise it does not. To be sure I did not do any mistake (cause I could not find one in my code) I copied t…

---

## [Git clone failing only via Ansible. Working via cmdline.](https://forum.ansible.com/t/git-clone-failing-only-via-ansible-working-via-cmdline/33227)

<div class="topic-metadata">

**Author:** [@Mukuntha\_rajaa](https://forum.ansible.com/u/Mukuntha_rajaa)\
**Replies:** 3\
**Last updated:** [June 21, 2020, 10:10am UTC](https://forum.ansible.com/t/git-clone-failing-only-via-ansible-working-via-cmdline/33227 "2020-06-21T10:10:13Z")

</div>

Hello, When I git clone from cmdline, I am able to clone successfully. But when I do the same thing via, Ansible, something is going wrong. git clone git@gitlab.com:xxxx/yyyy.git Cloning into 'yyyy'... remote: Enumerat…

---

## [Download Github file from Ansible](https://forum.ansible.com/t/download-github-file-from-ansible/33217)

<div class="topic-metadata">

**Author:** [@shyam.rpms](https://forum.ansible.com/u/shyam.rpms)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 5:28pm UTC](https://forum.ansible.com/t/download-github-file-from-ansible/33217 "2020-06-19T17:28:09Z")

</div>

Hi, Is it possible to download a Github file without Git module to a remote machine (windows) using win\_get\_url or win\_uri module ? Thankyou, Shyam

---

## [how to restrict scope for set\_fact variable](https://forum.ansible.com/t/how-to-restrict-scope-for-set-fact-variable/33162)

<div class="topic-metadata">

**Author:** [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Replies:** 5\
**Last updated:** [June 19, 2020, 9:46am UTC](https://forum.ansible.com/t/how-to-restrict-scope-for-set-fact-variable/33162 "2020-06-19T09:46:40Z")

</div>

Hi All, below is my playbook mserver: \[1.1.1.1,2.2.2.2\] doamin: \[3.3.3.3,4.4.4.4\] tasks: include\_role: name: validateip when: object\_type == “ip” with\_together: “{{ mserver\_hostname }}” “{{ domain }}” under tha…

---

## [Ansible connecting to Windows host using pywinrm module over HTTP](https://forum.ansible.com/t/ansible-connecting-to-windows-host-using-pywinrm-module-over-http/33212)

<div class="topic-metadata">

**Author:** [@sameer\_khan](https://forum.ansible.com/u/sameer_khan)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 6:11am UTC](https://forum.ansible.com/t/ansible-connecting-to-windows-host-using-pywinrm-module-over-http/33212 "2020-06-19T06:11:46Z")

</div>

Hello, I have an issue with connecting to windows host using Kerberos authentication mechanism with winrm over HTTP scheme, As our windows host have this set to true, Set-Item -Path WSMan:\\localhost\\Service\\AllowUnencr…

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

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