# Archives

**URL:** https://forum.ansible.com/c/archives/31.md?page=199

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

**Page:** 200

---

## [Comparing two files registering the difference](https://forum.ansible.com/t/comparing-two-files-registering-the-difference/32994)

<div class="topic-metadata">

**Author:** [@Sivakumar\_Saravanamu](https://forum.ansible.com/u/Sivakumar_Saravanamu)\
**Replies:** 3\
**Last updated:** [May 22, 2020, 3:10am UTC](https://forum.ansible.com/t/comparing-two-files-registering-the-difference/32994 "2020-05-22T03:10:57Z")

</div>

hi I have requirement to compare local file with remote file. Example I have a copy of standard /etc/hosts file and I need to compare that file with remote host /etc/hosts file to check the difference. If there is diffe…

---

## [WINRM CONNECTION ERROR: function takes at most 2 arguments (3 given)](https://forum.ansible.com/t/winrm-connection-error-function-takes-at-most-2-arguments-3-given/33002)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 5\
**Last updated:** [May 22, 2020, 2:16am UTC](https://forum.ansible.com/t/winrm-connection-error-function-takes-at-most-2-arguments-3-given/33002 "2020-05-22T02:16:38Z")

</div>

Hi, Goal : Use Linux centos 7.8 server with ansible version 2.9.7 to manage windows 2019 server Error : WINRM CONNECTION ERROR: function takes at most 2 arguments (3 given)

---

## [How to check process running time](https://forum.ansible.com/t/how-to-check-process-running-time/32980)

<div class="topic-metadata">

**Author:** [@Jenisha\_T](https://forum.ansible.com/u/Jenisha_T)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 11:41pm UTC](https://forum.ansible.com/t/how-to-check-process-running-time/32980 "2020-05-21T23:41:11Z")

</div>

I need to kill a process if its older than 1 hour. I have process id how to check if its older than 1 hour

---

## [expected \<block end\>, but found '-'](https://forum.ansible.com/t/expected-block-end-but-found/25568)

<div class="topic-metadata">

**Author:** [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 10:36pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568 "2020-05-21T22:36:02Z")

</div>

I’m following this post, https://www.ibm.com/developerworks/cloud/library/cl-provision-docker-containers-ansible/index.html, and Listing 11 \`

---

## [is there security related scan/analysis/evaluation of AWX](https://forum.ansible.com/t/is-there-security-related-scan-analysis-evaluation-of-awx/33001)

<div class="topic-metadata">

**Author:** [@Test1](https://forum.ansible.com/u/Test1)\
**Replies:** 0\
**Last updated:** [May 21, 2020, 10:26pm UTC](https://forum.ansible.com/t/is-there-security-related-scan-analysis-evaluation-of-awx/33001 "2020-05-21T22:26:47Z")

</div>

is there security related scan/analysis/evaluation of AWX, thanks Xiancui

---

## [If there are no nodes active to execute in the current play then "meta : clear\_host\_errors" won't actually work](https://forum.ansible.com/t/if-there-are-no-nodes-active-to-execute-in-the-current-play-then-meta-clear-host-errors-wont-actually-work/32998)

<div class="topic-metadata">

**Author:** [@Ashwin\_Regi](https://forum.ansible.com/u/Ashwin_Regi)\
**Replies:** 0\
**Last updated:** [May 21, 2020, 7:18pm UTC](https://forum.ansible.com/t/if-there-are-no-nodes-active-to-execute-in-the-current-play-then-meta-clear-host-errors-wont-actually-work/32998 "2020-05-21T19:18:44Z")

</div>

If there are no nodes active to execute in the current play then “meta : clear\_host\_errors” won’t actually work. To elaborate on the issue, if during the current play if ‘all’ the hosts fail and are moved to the failed l…

---

## [Handling password prompt -- IOS\_command module](https://forum.ansible.com/t/handling-password-prompt-ios-command-module/32995)

<div class="topic-metadata">

**Author:** [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Replies:** 1\
**Last updated:** [May 21, 2020, 6:23pm UTC](https://forum.ansible.com/t/handling-password-prompt-ios-command-module/32995 "2020-05-21T18:23:09Z")

</div>

Hi Team, How to handle password prompt when doing scp file transfer. Actually server is generating banner message along with password prompt. Please help how to resolve the issue. name: transfer the image ios\_command…

---

## [problem passing var between tasks.](https://forum.ansible.com/t/problem-passing-var-between-tasks/32997)

<div class="topic-metadata">

**Author:** [@Jeremy\_Hobbs](https://forum.ansible.com/u/Jeremy_Hobbs)\
**Replies:** 6\
**Last updated:** [May 21, 2020, 6:14pm UTC](https://forum.ansible.com/t/problem-passing-var-between-tasks/32997 "2020-05-21T18:14:47Z")

</div>

I have a problem passing a variable between playbooks that are chained together. Any thoughts? Playbook - audit\_hardware\_inventory.yml

---

## [ERROR! 'retries' is not a valid attribute for a TaskInclude](https://forum.ansible.com/t/error-retries-is-not-a-valid-attribute-for-a-taskinclude/32993)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 4:43pm UTC](https://forum.ansible.com/t/error-retries-is-not-a-valid-attribute-for-a-taskinclude/32993 "2020-05-21T16:43:31Z")

</div>

My requirement is to run the script stop-all as many times (5 retries) until the output of ps -fu user1 |wc -l becomes less than 2. I wrote the below ansible playbook for the same: cat stop.yml \` hosts: dest\_nodes …

---

## [Passing data from ansible to service now table](https://forum.ansible.com/t/passing-data-from-ansible-to-service-now-table/32981)

<div class="topic-metadata">

**Author:** [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Replies:** 11\
**Last updated:** [May 21, 2020, 2:52pm UTC](https://forum.ansible.com/t/passing-data-from-ansible-to-service-now-table/32981 "2020-05-21T14:52:09Z")

</div>

Hi Team, I am sending data from ansible to service now using uri, data is passing to snow table but job status is not showing successful. I am getting “The read operation timed out” error ,Please suggest me how this ca…

---

## [bad PATH when running "apt" module](https://forum.ansible.com/t/bad-path-when-running-apt-module/18152)

<div class="topic-metadata">

**Author:** [@Alex\_Peters](https://forum.ansible.com/u/Alex_Peters)\
**Replies:** 21\
**Last updated:** [May 21, 2020, 10:32am UTC](https://forum.ansible.com/t/bad-path-when-running-apt-module/18152 "2020-05-21T10:32:19Z")

</div>

I’m trying to install a package on a system running a Debian Jessie-based distribution called OSMC. This task (run with ansible\_sudo == true): name: ensure Vim is installed apt: name=vim state=present causes this …

---

## [Response' object has no attribute '\_\_getitem\_\_ while running the lookup plugin 'hashi\_vault'](https://forum.ansible.com/t/response-object-has-no-attribute-getitem-while-running-the-lookup-plugin-hashi-vault/32983)

<div class="topic-metadata">

**Author:** [@Asmitha\_j.s](https://forum.ansible.com/u/Asmitha_j.s)\
**Replies:** 2\
**Last updated:** [May 21, 2020, 7:27am UTC](https://forum.ansible.com/t/response-object-has-no-attribute-getitem-while-running-the-lookup-plugin-hashi-vault/32983 "2020-05-21T07:27:46Z")

</div>

I’m using hashi\_vault to retrieve secrets from HashiCorp’s vault in ansible playbook. \` name: Return all secrets from a path set\_fact: vault\_result: “{{ lookup(‘hashi\_vault’, ‘secret=secret/key:value token=token url…

---

## [Exit with\_items loop after first success?](https://forum.ansible.com/t/exit-with-items-loop-after-first-success/17026)

<div class="topic-metadata">

**Author:** [@Hugh\_Saunders](https://forum.ansible.com/u/Hugh_Saunders)\
**Replies:** 17\
**Last updated:** [May 21, 2020, 3:31am UTC](https://forum.ansible.com/t/exit-with-items-loop-after-first-success/17026 "2020-05-21T03:31:12Z")

</div>

Hi All, I’ve been asking on IRC, twitter, and github about this and was asked to post to the ML as well so here goes :slight\_smile: I would like to be able to exit a with\_items loop based on the result of the previous …

---

## [how to use extends\_documentation\_fragment. getting error while using it](https://forum.ansible.com/t/how-to-use-extends-documentation-fragment-getting-error-while-using-it/32978)

<div class="topic-metadata">

**Author:** [@alok\_ranjan](https://forum.ansible.com/u/alok_ranjan)\
**Replies:** 1\
**Last updated:** [May 21, 2020, 3:27am UTC](https://forum.ansible.com/t/how-to-use-extends-documentation-fragment-getting-error-while-using-it/32978 "2020-05-21T03:27:36Z")

</div>

Hi , I am new to ansible and this is my first ansible project. I am writing my own ansible modules which shares the same document acroos multiple modules which i need to develop. As per the ansible website https://docs…

---

## [How to access group variables of the same host in different groups?](https://forum.ansible.com/t/how-to-access-group-variables-of-the-same-host-in-different-groups/32979)

<div class="topic-metadata">

**Author:** [@Durai\_Arasan](https://forum.ansible.com/u/Durai_Arasan)\
**Replies:** 1\
**Last updated:** [May 21, 2020, 3:25am UTC](https://forum.ansible.com/t/how-to-access-group-variables-of-the-same-host-in-different-groups/32979 "2020-05-21T03:25:02Z")

</div>

This is my ansible inventory file: \[slurm\_master\] slurm-gpu-0 ansible\_host=192.168.0.24 ansible\_connection=local \[slurm\_compute\] slurm-gpu-1 ansible\_host=192.168.0.200 cpus=16 gpus=2 slurm-gpu-2 ansible\_host=192.168.0.…

---

## [vmotion condition](https://forum.ansible.com/t/vmotion-condition/32816)

<div class="topic-metadata">

**Author:** [@Mani](https://forum.ansible.com/u/Mani)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 12:45am UTC](https://forum.ansible.com/t/vmotion-condition/32816 "2020-05-21T00:45:57Z")

</div>

I am trying to perform vmotion of multiple VMs between 2 ESXi hosts using the vmare\_vmotion module. We need to set a cap for memory utilization of the destination host to \<= 70% and the storage utilization to \<= 90%. Re…

---

## [CSV to JSON](https://forum.ansible.com/t/csv-to-json/32986)

<div class="topic-metadata">

**Author:** [@shyam.rpms](https://forum.ansible.com/u/shyam.rpms)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 12:43am UTC](https://forum.ansible.com/t/csv-to-json/32986 "2020-05-21T00:43:30Z")

</div>

Hi, Is it possible to convert CSV file to JSON format using Ansible modules, I have searched for the modules have’t found. Or else do we need to use any scripting language to achieve this powershell or python ? Thank y…

---

## [loop after loop conditional](https://forum.ansible.com/t/loop-after-loop-conditional/32989)

<div class="topic-metadata">

**Author:** [@jer8jer](https://forum.ansible.com/u/jer8jer)\
**Replies:** 5\
**Last updated:** [May 20, 2020, 11:43pm UTC](https://forum.ansible.com/t/loop-after-loop-conditional/32989 "2020-05-20T23:43:31Z")

</div>

Trying to check if a user exists locally and if true, check to see if it has sudo rights. I can’t seem to process the second loop. I tried using out.results.item but error: fatal: \[hostname\]: FAILED! =\> {“msg”: “‘list o…

---

## [Provide select access to future objects](https://forum.ansible.com/t/provide-select-access-to-future-objects/32991)

<div class="topic-metadata">

**Author:** [@Banti\_Kr](https://forum.ansible.com/u/Banti_Kr)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 10:12pm UTC](https://forum.ansible.com/t/provide-select-access-to-future-objects/32991 "2020-05-20T22:12:07Z")

</div>

Hi, I am using ansible-playbook to create a dev user which should have only read access in PostgreSQL but after creating dev user, the user is able to perform DML commands within his user scope and also not able to read…

---

## [copy restricted files from server A to B](https://forum.ansible.com/t/copy-restricted-files-from-server-a-to-b/32975)

<div class="topic-metadata">

**Author:** [@Laci](https://forum.ansible.com/u/Laci)\
**Replies:** 4\
**Last updated:** [May 20, 2020, 9:25pm UTC](https://forum.ansible.com/t/copy-restricted-files-from-server-a-to-b/32975 "2020-05-20T21:25:27Z")

</div>

I have some files with 0400/-r-------- permissions on server A that I need to copy to server B and preserve permissions. For example: serverA:/etc/ssl\_cert.key → serverB:/etc/ssl\_cert.key How would you do it?

---

## [User authentication with LDAP](https://forum.ansible.com/t/user-authentication-with-ldap/32990)

<div class="topic-metadata">

**Author:** [@Johnny\_Medlock](https://forum.ansible.com/u/Johnny_Medlock)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 9:11pm UTC](https://forum.ansible.com/t/user-authentication-with-ldap/32990 "2020-05-20T21:11:37Z")

</div>

Hello, I am writing to inquire some information in regards to User Permission management with LDAP authentication. I have searched around and have found conflicting answers. I currently have an Ansible AWX 2.9.5 enviro…

---

## [SharePointDSC parameter PsDscRunAsCredential with Kerberos](https://forum.ansible.com/t/sharepointdsc-parameter-psdscrunascredential-with-kerberos/32982)

<div class="topic-metadata">

**Author:** [@jn.bedag](https://forum.ansible.com/u/jn.bedag)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 7:35pm UTC](https://forum.ansible.com/t/sharepointdsc-parameter-psdscrunascredential-with-kerberos/32982 "2020-05-20T19:35:45Z")

</div>

Hi According to the documentation, for SharePointDCS modules to work, we have to specify PsDscRunAsCredentials in win\_dcs module: name: set shell admin for farmaccount win\_dsc: resource\_name: SPShellAdmins IsSingle…

---

## [Is it possible to use jinja withing Ansible playbook yml file](https://forum.ansible.com/t/is-it-possible-to-use-jinja-withing-ansible-playbook-yml-file/32988)

<div class="topic-metadata">

**Author:** [@Aidan\_Wong](https://forum.ansible.com/u/Aidan_Wong)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 6:46pm UTC](https://forum.ansible.com/t/is-it-possible-to-use-jinja-withing-ansible-playbook-yml-file/32988 "2020-05-20T18:46:47Z")

</div>

Hi Is it possible to write jinja “if” conditionals within a playbook like so? If not can someone suggest an alternative? \` name: Deploy the VMs without an anti-affinity group. cs\_instance: zone: “{{ cs\_zone }}” ap…

---

## [LDAP authentication configuration via API](https://forum.ansible.com/t/ldap-authentication-configuration-via-api/32987)

<div class="topic-metadata">

**Author:** [@lukas\_menne](https://forum.ansible.com/u/lukas_menne)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 6:34pm UTC](https://forum.ansible.com/t/ldap-authentication-configuration-via-api/32987 "2020-05-20T18:34:35Z")

</div>

Hello, I’m trying to find documentation or figure out if its possible to update the authentication configuration within AWX via the API. I would like to setup my LDAP configuration in an automated fashion, so if this i…

---

## [Create list in playbook (Fortigate automation)](https://forum.ansible.com/t/create-list-in-playbook-fortigate-automation/32985)

<div class="topic-metadata">

**Author:** [@Luis\_Arizaga](https://forum.ansible.com/u/Luis_Arizaga)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 3:26pm UTC](https://forum.ansible.com/t/create-list-in-playbook-fortigate-automation/32985 "2020-05-20T15:26:01Z")

</div>

Hi everybody, I’m using Ansible to automate Fortigate Firewalls provisioning and I’m having the following problems. I have a playbook that first creates a couple of object addresses using one module (task Configure on…

---

## [OpenBSD network\_cli](https://forum.ansible.com/t/openbsd-network-cli/32984)

<div class="topic-metadata">

**Author:** [@John\_D1](https://forum.ansible.com/u/John_D1)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 11:36am UTC](https://forum.ansible.com/t/openbsd-network-cli/32984 "2020-05-20T11:36:36Z")

</div>

I’ve installed the ansible pkg via pkg\_add. I cannot get the ansible network\_cli module to work in OpenBSD. Tried in version 6.6 and also 6.7 and both hang at “using connection plugin network\_cli”. It never times out, ha…

---

## [how to run an if/else test in a task](https://forum.ansible.com/t/how-to-run-an-if-else-test-in-a-task/32973)

<div class="topic-metadata">

**Author:** [@hieronymus](https://forum.ansible.com/u/hieronymus)\
**Replies:** 4\
**Last updated:** [May 20, 2020, 10:38am UTC](https://forum.ansible.com/t/how-to-run-an-if-else-test-in-a-task/32973 "2020-05-20T10:38:34Z")

</div>

Hi Teams, I’m looking for to do a test before to execute a task. I need to checkup if my computer has already joined the domain before to join it. otherwise, the adcli will failed. When computer isn’t in domain, the k…

---

## [Dynamic inventory with Azure](https://forum.ansible.com/t/dynamic-inventory-with-azure/32939)

<div class="topic-metadata">

**Author:** [@Sandip\_Khot](https://forum.ansible.com/u/Sandip_Khot)\
**Replies:** 5\
**Last updated:** [May 20, 2020, 9:09am UTC](https://forum.ansible.com/t/dynamic-inventory-with-azure/32939 "2020-05-20T09:09:18Z")

</div>

Hello Team, I have created the dynamic inventory and used “Microsoft Azure Resource manager” as a SOURCE. My credential section has the below details: subscription id: client id: client secret: tenant id: When i s…

---

## [Ansible to execute sql script on azure sql(paas)-- sql-cmd](https://forum.ansible.com/t/ansible-to-execute-sql-script-on-azure-sql-paas-sql-cmd/32977)

<div class="topic-metadata">

**Author:** [@vinod\_devops](https://forum.ansible.com/u/vinod_devops)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 5:49am UTC](https://forum.ansible.com/t/ansible-to-execute-sql-script-on-azure-sql-paas-sql-cmd/32977 "2020-05-20T05:49:29Z")

</div>

Hi guys, I am working on ansible task to execute sql script on azure sql . for Iaas I am using sql-cmd to execute sql script remoely. My question how do I execute sql script on azure sql from ansible. Thanks, vinod

---

## [how to execute a handler  if a file is found](https://forum.ansible.com/t/how-to-execute-a-handler-if-a-file-is-found/32976)

<div class="topic-metadata">

**Author:** [@Dan\_Idar](https://forum.ansible.com/u/Dan_Idar)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 8:46pm UTC](https://forum.ansible.com/t/how-to-execute-a-handler-if-a-file-is-found/32976 "2020-05-19T20:46:36Z")

</div>

Hello I would like to be able to find the files that are bigger than a certain dize and then restart a service if this happens because it mean the rotation is not working after the configurtion update the find module d…

[Previous page](https://forum.ansible.com/c/archives/31.md?page=198)

[Next page](https://forum.ansible.com/c/archives/31.md?page=200)
