# Ansible Project

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

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

**Page:** 188

---

## [ansible - widows patching](https://forum.ansible.com/t/ansible-widows-patching/30393)

<div class="topic-metadata">

**Author:** [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Replies:** 3\
**Last updated:** [May 27, 2019, 5:17am UTC](https://forum.ansible.com/t/ansible-widows-patching/30393 "2019-05-27T05:17:39Z")

</div>

Hello, I am trying to perform windows update. is it possible to do windows patch (download only) to wsus client. and windows patch (install only) to wsus client. Thanks

---

## [use facts from another task](https://forum.ansible.com/t/use-facts-from-another-task/30401)

<div class="topic-metadata">

**Author:** [@Marc\_Haber](https://forum.ansible.com/u/Marc_Haber)\
**Replies:** 1\
**Last updated:** [May 25, 2019, 6:27pm UTC](https://forum.ansible.com/t/use-facts-from-another-task/30401 "2019-05-25T18:27:50Z")

</div>

Hi, here is my site.yml:

---

## [copying bin file from ansible control server to switch](https://forum.ansible.com/t/copying-bin-file-from-ansible-control-server-to-switch/30413)

<div class="topic-metadata">

**Author:** [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Replies:** 3\
**Last updated:** [May 25, 2019, 4:05pm UTC](https://forum.ansible.com/t/copying-bin-file-from-ansible-control-server-to-switch/30413 "2019-05-25T16:05:13Z")

</div>

Hi team, Can you please provide me the module to copy the IOS image file to cisco switch? I used below but it prompts for password name: COPY OVER IOS IMAGE command: “scp system-image-filename.bin {{inventory\_hostna…

---

## [Vormetric driver install](https://forum.ansible.com/t/vormetric-driver-install/30400)

<div class="topic-metadata">

**Author:** [@James2](https://forum.ansible.com/u/James2)\
**Replies:** 1\
**Last updated:** [May 25, 2019, 3:35pm UTC](https://forum.ansible.com/t/vormetric-driver-install/30400 "2019-05-25T15:35:51Z")

</div>

I have been unsuccessful at installing a Vormetric driver onto CentOS. I am using the ‘expect’ module and have tried various question:answer pairs, but nothing completes successfully. Due to the isolated environment I wo…

---

## [Iteration over msg](https://forum.ansible.com/t/iteration-over-msg/30422)

<div class="topic-metadata">

**Author:** [@Rama](https://forum.ansible.com/u/Rama)\
**Replies:** 0\
**Last updated:** [May 25, 2019, 1:21pm UTC](https://forum.ansible.com/t/iteration-over-msg/30422 "2019-05-25T13:21:25Z")

</div>

Hi All, I have a playbook ran and got desired below output. Could anyone please help me how to iterate and get the Fan block which status is degraded. TASK \[debug\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /home/dev/test.yml:13 …

---

## [Ansible, and openssh on Windows 10](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 2\
**Last updated:** [May 25, 2019, 11:14am UTC](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409 "2019-05-25T11:14:11Z")

</div>

Just messing around, but I setup openssh on Windows 10. My administrative user, john, is configured with the public key for my root user from the ansible server. I can ssh from ansible to windows 10 without a password, a…

---

## [Ansible 2.8.0: Module option conversion to string](https://forum.ansible.com/t/ansible-2-8-0-module-option-conversion-to-string/30421)

<div class="topic-metadata">

**Author:** [@Arbab\_Nazar1](https://forum.ansible.com/u/Arbab_Nazar1)\
**Replies:** 1\
**Last updated:** [May 25, 2019, 10:55am UTC](https://forum.ansible.com/t/ansible-2-8-0-module-option-conversion-to-string/30421 "2019-05-25T10:55:11Z")

</div>

Ansible 2.8.0 has introduction Module option conversion to string but didn’t give any example. I have simple task to set the file descriptor limits for user name: Set file descriptor limits for the node user pam\_limit…

---

## [loop variable on task file does not work](https://forum.ansible.com/t/loop-variable-on-task-file-does-not-work/30337)

<div class="topic-metadata">

**Author:** [@mcoussi](https://forum.ansible.com/u/mcoussi)\
**Replies:** 3\
**Last updated:** [May 25, 2019, 7:06am UTC](https://forum.ansible.com/t/loop-variable-on-task-file-does-not-work/30337 "2019-05-25T07:06:58Z")

</div>

Hi everyone, I have a variable where i want to loop on this in a .yml task file : My variable : \` lst\_apps: {name: APP01, version: 1234, bdd\_sid: BDDSID, bdd\_host: SERVEURBDD, bdd\_port: 1525} \` Content of my main…

---

## [Ansible invetory plugin for Check\_MK exist ?](https://forum.ansible.com/t/ansible-invetory-plugin-for-check-mk-exist/30420)

<div class="topic-metadata">

**Author:** [@Stefano\_Leandro](https://forum.ansible.com/u/Stefano_Leandro)\
**Replies:** 0\
**Last updated:** [May 24, 2019, 10:30pm UTC](https://forum.ansible.com/t/ansible-invetory-plugin-for-check-mk-exist/30420 "2019-05-24T22:30:21Z")

</div>

Hi , I’m looking an inventory plugin for Ansible that works for Check\_Mk or can i use the invetory plugin for Nagios as well ? Thank you , Stefano

---

## [Behavior change with union(query('vars', item)) when used with loop|list or loop|list vs loop|flatten?](https://forum.ansible.com/t/behavior-change-with-union-query-vars-item-when-used-with-loop-list-or-loop-list-vs-loop-flatten/30418)

<div class="topic-metadata">

**Author:** [@bob](https://forum.ansible.com/u/bob)\
**Replies:** 0\
**Last updated:** [May 24, 2019, 6:49pm UTC](https://forum.ansible.com/t/behavior-change-with-union-query-vars-item-when-used-with-loop-list-or-loop-list-vs-loop-flatten/30418 "2019-05-24T18:49:52Z")

</div>

Back in May of 2018 I asked “How to use group\_vars when managed host is in multiple groups?” (see https://groups.google.com/d/msg/ansible-project/Tzb\_cNpytD0/fB-xDIRFBAAJ) and Brian Coca present an excellent solution. I…

---

## [Sudo privilege escalation is not working](https://forum.ansible.com/t/sudo-privilege-escalation-is-not-working/30414)

<div class="topic-metadata">

**Author:** [@Barun\_kumar](https://forum.ansible.com/u/Barun_kumar)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 6:17pm UTC](https://forum.ansible.com/t/sudo-privilege-escalation-is-not-working/30414 "2019-05-24T18:17:57Z")

</div>

Hi Team, I am trying to run a playbook book on client machine with sudo privilege, Getting below error. where clients /etc/sudoers file are updated with "All All=!SUDOSUDO ". Let me know how to proceed on this. (att…

---

## [Set variable to some value if undefined](https://forum.ansible.com/t/set-variable-to-some-value-if-undefined/30316)

<div class="topic-metadata">

**Author:** [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Replies:** 3\
**Last updated:** [May 24, 2019, 5:21pm UTC](https://forum.ansible.com/t/set-variable-to-some-value-if-undefined/30316 "2019-05-24T17:21:44Z")

</div>

Hi I have a playbook whereby I pass variables in such as install\_office == ‘y’, and I have tasks where it would only include\_tasks for a task file to install Office (for example) when install\_office == ‘y’ eg. tasks: …

---

## [New Ansible releases 2.7.11 and 2.6.17](https://forum.ansible.com/t/new-ansible-releases-2-7-11-and-2-6-17/30410)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 7:48pm UTC](https://forum.ansible.com/t/new-ansible-releases-2-7-11-and-2-6-17/30410 "2019-05-23T19:48:38Z")

</div>

Hi all- we're happy to announce that the general release of Ansible 2.7.11 and 2.6.17 are now available! How do you get it?

---

## [gcp\_compute\_instance\_template metadata](https://forum.ansible.com/t/gcp-compute-instance-template-metadata/30390)

<div class="topic-metadata">

**Author:** [@Joel\_Sherriff](https://forum.ansible.com/u/Joel_Sherriff)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 5:11pm UTC](https://forum.ansible.com/t/gcp-compute-instance-template-metadata/30390 "2019-05-23T17:11:42Z")

</div>

Can’t figure out how to supply the properties.metadata key/value data for the gcp\_compute\_instance\_template playbook module using 2.8. Everything seems to be ignored. Anyone have any ideas? Thanks.

---

## [Is it possible to run Ansible against a jailed environment without python?](https://forum.ansible.com/t/is-it-possible-to-run-ansible-against-a-jailed-environment-without-python/30349)

<div class="topic-metadata">

**Author:** [@Ryan\_Bak](https://forum.ansible.com/u/Ryan_Bak)\
**Replies:** 3\
**Last updated:** [May 23, 2019, 5:01pm UTC](https://forum.ansible.com/t/is-it-possible-to-run-ansible-against-a-jailed-environment-without-python/30349 "2019-05-23T17:01:31Z")

</div>

I have a mounted image that I’m running Ansible against. Currently I’m using an sshd jail, restricting ssh to the root of the image so that Ansible can run as if the the image is a host, but I would like to remove the re…

---

## [AWX - Inventories - Can't save](https://forum.ansible.com/t/awx-inventories-cant-save/30405)

<div class="topic-metadata">

**Author:** [@Simon\_Pole](https://forum.ansible.com/u/Simon_Pole)\
**Replies:** 5\
**Last updated:** [May 23, 2019, 2:06pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405 "2019-05-23T14:06:33Z")

</div>

Hi, I’m running AWX 4 and everything seems fine but when I go to inventories and add anything in the variables box I present me with a “Failed to add new inventory. Post returned status: 400”

---

## [need to perform action on localhost in multiple host action of playbooks](https://forum.ansible.com/t/need-to-perform-action-on-localhost-in-multiple-host-action-of-playbooks/30396)

<div class="topic-metadata">

**Author:** [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 10:12am UTC](https://forum.ansible.com/t/need-to-perform-action-on-localhost-in-multiple-host-action-of-playbooks/30396 "2019-05-23T10:12:44Z")

</div>

Hello Ansible Team, I need to run playbook on host when puppet run done on node and then it will immediately restore the snapshot. and again it will run puppet. can we pass the control to task when second task is comple…

---

## [Is there a way to get the OS from AWS?](https://forum.ansible.com/t/is-there-a-way-to-get-the-os-from-aws/30398)

<div class="topic-metadata">

**Author:** [@Adam](https://forum.ansible.com/u/Adam)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 2:26pm UTC](https://forum.ansible.com/t/is-there-a-way-to-get-the-os-from-aws/30398 "2019-05-22T14:26:32Z")

</div>

Hi all - I’m trying to gather facts from an ec2 instance. Specially, the operating system release (i.e. /etc/redhat-release). I can gather the info from local VMs, but Ansible doesn’t seem to return the OS when I gather…

---

## [Official Dockerfile for Ansible](https://forum.ansible.com/t/official-dockerfile-for-ansible/30392)

<div class="topic-metadata">

**Author:** [@Dongxian\_Yao](https://forum.ansible.com/u/Dongxian_Yao)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 2:23pm UTC](https://forum.ansible.com/t/official-dockerfile-for-ansible/30392 "2019-05-22T14:23:39Z")

</div>

I can’t believe Ansible don’t maintain any official Dockerfile, most of the Dockerfile on Docker Hub are very old. May I ask what Dockerfile(s) you use for your project if you are testing playbooks in Ansible with CI/CD …

---

## [Call ansible playbook/tasks from python script.](https://forum.ansible.com/t/call-ansible-playbook-tasks-from-python-script/30391)

<div class="topic-metadata">

**Author:** [@Yz\_Xyz](https://forum.ansible.com/u/Yz_Xyz)\
**Replies:** 3\
**Last updated:** [May 22, 2019, 1:36pm UTC](https://forum.ansible.com/t/call-ansible-playbook-tasks-from-python-script/30391 "2019-05-22T13:36:30Z")

</div>

I have python script and have to call ansible playbook and tasks in various phases of script execution. What is preferred way to call ansible playbook or task? I see python API was suggested to use for internal purpose …

---

## [Play book for changing few words in /etc/ssh/sshd.config](https://forum.ansible.com/t/play-book-for-changing-few-words-in-etc-ssh-sshd-config/30394)

<div class="topic-metadata">

**Author:** [@Vinu\_Vajravel](https://forum.ansible.com/u/Vinu_Vajravel)\
**Replies:** 5\
**Last updated:** [May 22, 2019, 11:08am UTC](https://forum.ansible.com/t/play-book-for-changing-few-words-in-etc-ssh-sshd-config/30394 "2019-05-22T11:08:17Z")

</div>

i want to change few words and restart ssh service , is there any playbook available ? appreciate your help. Thanks Vinu .

---

## [ImportError: cannot import name context](https://forum.ansible.com/t/importerror-cannot-import-name-context/30384)

<div class="topic-metadata">

**Author:** [@Nabil\_Boutayeb](https://forum.ansible.com/u/Nabil_Boutayeb)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 8:46am UTC](https://forum.ansible.com/t/importerror-cannot-import-name-context/30384 "2019-05-22T08:46:58Z")

</div>

hello everyone:weeks ago ansible were working fine, but today, trying to execute ansible i got this message: Traceback (most recent call last): File “/usr/bin/ansible”, line 137, in from ansible import context Impor…

---

## [Looking for playbook to get uptime, disk , cpu , RAM , system load, from multiple Linux servers  in html format or csv format](https://forum.ansible.com/t/looking-for-playbook-to-get-uptime-disk-cpu-ram-system-load-from-multiple-linux-servers-in-html-format-or-csv-format/30385)

<div class="topic-metadata">

**Author:** [@Deepan\_M](https://forum.ansible.com/u/Deepan_M)\
**Replies:** 2\
**Last updated:** [May 22, 2019, 7:00am UTC](https://forum.ansible.com/t/looking-for-playbook-to-get-uptime-disk-cpu-ram-system-load-from-multiple-linux-servers-in-html-format-or-csv-format/30385 "2019-05-22T07:00:57Z")

</div>

Hello, Can someone please suggest me a playbook to get uptime, disk , cpu , RAM , system load, from multiple Linux servers – in HTML format or in CSV format. Thanks, Deepan M

---

## [How can i retrieve playbook name, play name and task name in a playbook?](https://forum.ansible.com/t/how-can-i-retrieve-playbook-name-play-name-and-task-name-in-a-playbook/30373)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 6:12pm UTC](https://forum.ansible.com/t/how-can-i-retrieve-playbook-name-play-name-and-task-name-in-a-playbook/30373 "2019-05-21T18:12:41Z")

</div>

Is there a way i can retrieve the currently used playbook name, currently running play and task name using playbook rules? I need these 3 info to send them as a parameter for an external python script which would print a…

---

## [Looping over a dictionary within a dictionary](https://forum.ansible.com/t/looping-over-a-dictionary-within-a-dictionary/30386)

<div class="topic-metadata">

**Author:** [@ShadyTrainDriver](https://forum.ansible.com/u/ShadyTrainDriver)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 4:16pm UTC](https://forum.ansible.com/t/looping-over-a-dictionary-within-a-dictionary/30386 "2019-05-21T16:16:43Z")

</div>

Hello, I have writte the following to check that each partition on a device of a certain type has a uuid (N.B. extended partitions used in logical partitioning scheme do not): set\_fact: partitions: “{{ partitions|de…

---

## [Question: ERROR! 'become\_user' is not a valid attribute for a TaskInclude](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383)

<div class="topic-metadata">

**Author:** [@Gaurav\_Arora](https://forum.ansible.com/u/Gaurav_Arora)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 3:05pm UTC](https://forum.ansible.com/t/question-error-become-user-is-not-a-valid-attribute-for-a-taskinclude/30383 "2019-05-21T15:05:04Z")

</div>

Hi We are upgrading from Ansible 2.7 to Ansible 2.8. We have following lines which are working perfectly fine with Ansible 2.7 # tasks file for \*\*\*\* - name: Call \*\*\*\* installation tasks for {{ ansible\_distribution|upp…

---

## [Store ssh passphrase for another session.](https://forum.ansible.com/t/store-ssh-passphrase-for-another-session/30382)

<div class="topic-metadata">

**Author:** [@Veera](https://forum.ansible.com/u/Veera)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 2:39pm UTC](https://forum.ansible.com/t/store-ssh-passphrase-for-another-session/30382 "2019-05-21T14:39:36Z")

</div>

I have a set of ansible client servers accessible from ansible engine using ssh-key and passphrase. When I run a ansible ad-hoc command , I have to enter passphase on each servers connections and this is repeating for a…

---

## [Is there a standard GoLang library for calling Ansible commands/playbook from GoLang code?](https://forum.ansible.com/t/is-there-a-standard-golang-library-for-calling-ansible-commands-playbook-from-golang-code/30381)

<div class="topic-metadata">

**Author:** [@apapap](https://forum.ansible.com/u/apapap)\
**Replies:** 0\
**Last updated:** [May 21, 2019, 12:51pm UTC](https://forum.ansible.com/t/is-there-a-standard-golang-library-for-calling-ansible-commands-playbook-from-golang-code/30381 "2019-05-21T12:51:38Z")

</div>

Hi, I want to know if there is any standard library for calling Ansible commands or Ansible playbook from within the GoLang code ? Please help

---

## [Change password of remote hosts](https://forum.ansible.com/t/change-password-of-remote-hosts/30372)

<div class="topic-metadata">

**Author:** [@Kevin\_Kwon](https://forum.ansible.com/u/Kevin_Kwon)\
**Replies:** 3\
**Last updated:** [May 21, 2019, 9:36am UTC](https://forum.ansible.com/t/change-password-of-remote-hosts/30372 "2019-05-21T09:36:19Z")

</div>

Hi… Would you please let me know how can i change the account password? How can i change the password of “root” account ? How can i change the password of “user” account ? Thank you! Kevin

---

## [junos\_scp not working](https://forum.ansible.com/t/junos-scp-not-working/30363)

<div class="topic-metadata">

**Author:** [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 1:59am UTC](https://forum.ansible.com/t/junos-scp-not-working/30363 "2019-05-21T01:59:42Z")

</div>

Based on the logs it seems you have not set the value of provider argument in the task. junos\_scp module requires the provider key to be set. More details refer the module documentation https://docs.ansible.com/ansible…

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

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