# Ansible Project

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

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

**Page:** 128

---

## [How to assign random name for vmware snapshot?](https://forum.ansible.com/t/how-to-assign-random-name-for-vmware-snapshot/32870)

<div class="topic-metadata">

**Author:** [@Mani](https://forum.ansible.com/u/Mani)\
**Replies:** 2\
**Last updated:** [May 7, 2020, 9:33am UTC](https://forum.ansible.com/t/how-to-assign-random-name-for-vmware-snapshot/32870 "2020-05-07T09:33:19Z")

</div>

I am a newbie to ansible and I am trying to take a snapshot of multiple VM’s with a random snapshot name including the VM name (vmname + random number or timestamp). I am able to take snapshot using the VM name with the…

---

## ["failed to open a SFTP connection (Garbage packet received)"](https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872)

<div class="topic-metadata">

**Author:** [@Dave\_Hodgkinson](https://forum.ansible.com/u/Dave_Hodgkinson)\
**Replies:** 1\
**Last updated:** [May 7, 2020, 9:09am UTC](https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872 "2020-05-07T09:09:02Z")

</div>

I’m tring to run our corporate ansible setup on my FC31 laptop. In the “staging” configuration, main.yml, I have hosts: localhost. My ssh key is in root’s authorized\_keys file. I run and get: ansible-playbook main.yml …

---

## [How to optimise many hosts which are all localhost?](https://forum.ansible.com/t/how-to-optimise-many-hosts-which-are-all-localhost/32751)

<div class="topic-metadata">

**Author:** [@Matthew\_Davis](https://forum.ansible.com/u/Matthew_Davis)\
**Replies:** 1\
**Last updated:** [May 7, 2020, 2:56am UTC](https://forum.ansible.com/t/how-to-optimise-many-hosts-which-are-all-localhost/32751 "2020-05-07T02:56:07Z")

</div>

I have a use case which is a bit different to most, but Ansible seems to do a pretty good job. I’m trying to figure out the best way to leverage Ansible’s inherent concurrency for multiple hosts, when deploying to serve…

---

## [Running Ansible playbook with Jenkins plugin ... now need to add git](https://forum.ansible.com/t/running-ansible-playbook-with-jenkins-plugin-now-need-to-add-git/32837)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 4\
**Last updated:** [May 6, 2020, 4:30pm UTC](https://forum.ansible.com/t/running-ansible-playbook-with-jenkins-plugin-now-need-to-add-git/32837 "2020-05-06T16:30:08Z")

</div>

Hi, I have a ansible server, which i use mainly to manage ntp client/dns client/time zone/create users/install software etc on various linux servers… so no development to say, just as “infrastructure as code” On same s…

---

## [no root 'plugin' key found](https://forum.ansible.com/t/no-root-plugin-key-found/32864)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 0\
**Last updated:** [May 6, 2020, 4:13pm UTC](https://forum.ansible.com/t/no-root-plugin-key-found/32864 "2020-05-06T16:13:21Z")

</div>

it is missing an entry plugin: \<plugin name goes here\>

---

## [Ansible stops if unreachable, can it be ignored to continue the playbook?](https://forum.ansible.com/t/ansible-stops-if-unreachable-can-it-be-ignored-to-continue-the-playbook/32858)

<div class="topic-metadata">

**Author:** [@Jimmy1](https://forum.ansible.com/u/Jimmy1)\
**Replies:** 3\
**Last updated:** [May 6, 2020, 4:12pm UTC](https://forum.ansible.com/t/ansible-stops-if-unreachable-can-it-be-ignored-to-continue-the-playbook/32858 "2020-05-06T16:12:34Z")

</div>

Ansible stops if unreachable, can it be ignored to continue the playbook? Thanks–

---

## [add\_host scope from inside roles](https://forum.ansible.com/t/add-host-scope-from-inside-roles/32853)

<div class="topic-metadata">

**Author:** [@Nicola\_L](https://forum.ansible.com/u/Nicola_L)\
**Replies:** 4\
**Last updated:** [May 6, 2020, 2:38pm UTC](https://forum.ansible.com/t/add-host-scope-from-inside-roles/32853 "2020-05-06T14:38:27Z")

</div>

Hi all, I’m a bit confused about the behavior of add\_host when used from inside a role or directly in the playbook. Am I doing something wrong or am I just hitting some role’s scope boundary? THIS WORKS (from the play…

---

## [ansible-api issue](https://forum.ansible.com/t/ansible-api-issue/32863)

<div class="topic-metadata">

**Author:** [@Rekuyem](https://forum.ansible.com/u/Rekuyem)\
**Replies:** 1\
**Last updated:** [May 6, 2020, 2:26pm UTC](https://forum.ansible.com/t/ansible-api-issue/32863 "2020-05-06T14:26:33Z")

</div>

Hello, When I start to lauch ansible-api, I have this issue : root@VM-Ubuntu:~# ansible-api Ansible API is running at Debug Mode 2020-05-06 16:18:06 | INFO - Ansible API Start… ( PID = 19629 ) 2020-05-06 16:18:06 | …

---

## [Using an environment variable in dynamic inventory](https://forum.ansible.com/t/using-an-environment-variable-in-dynamic-inventory/32859)

<div class="topic-metadata">

**Author:** [@Andrew\_Marshall](https://forum.ansible.com/u/Andrew_Marshall)\
**Replies:** 1\
**Last updated:** [May 6, 2020, 2:22pm UTC](https://forum.ansible.com/t/using-an-environment-variable-in-dynamic-inventory/32859 "2020-05-06T14:22:11Z")

</div>

Hi - I have a basic dynamic inventory using the azure plugin: plugin: azure\_rm include\_vm\_resource\_groups: - my\_resource\_group However, this script runs in CI and teh resource group is created by a previous step, so…

---

## [Need help on formating stdout\_lines output](https://forum.ansible.com/t/need-help-on-formating-stdout-lines-output/32819)

<div class="topic-metadata">

**Author:** [@Suresh\_Karpurapu](https://forum.ansible.com/u/Suresh_Karpurapu)\
**Replies:** 7\
**Last updated:** [May 6, 2020, 1:07pm UTC](https://forum.ansible.com/t/need-help-on-formating-stdout-lines-output/32819 "2020-05-06T13:07:20Z")

</div>

Hi All, Would anyone please help me formatting mountchk.result. I am able to get the required output with item.stdout\_lines\[0\],item.stdout\_lines\[1\],item.stdout\_lines\[2\] but host3 has 6 entries. So, please help me in fil…

---

## [ansible include\_role syntax problem](https://forum.ansible.com/t/ansible-include-role-syntax-problem/32861)

<div class="topic-metadata">

**Author:** [@Meir\_Yanovich](https://forum.ansible.com/u/Meir_Yanovich)\
**Replies:** 10\
**Last updated:** [May 6, 2020, 11:42am UTC](https://forum.ansible.com/t/ansible-include-role-syntax-problem/32861 "2020-05-06T11:42:34Z")

</div>

I try to include\_rule but i keep getting errors on the wrong syntax this is my file structure : \` ├── roles │ └── utilities │ ├── defaults │ ├── files │ ├── handlers │ ├── meta │ ├── tasks │ │ └── d\_pack.yml │…

---

## [Target machines are unreachable](https://forum.ansible.com/t/target-machines-are-unreachable/32856)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 2\
**Last updated:** [May 6, 2020, 5:33am UTC](https://forum.ansible.com/t/target-machines-are-unreachable/32856 "2020-05-06T05:33:08Z")

</div>

my target machines are up. I don’t understand why I am running this error Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/setup.ps1 Pipelining is enabled. ESTABLISH WINRM CONNECTION FOR USE…

---

## [Conditional Delegation to a host for synchronize module](https://forum.ansible.com/t/conditional-delegation-to-a-host-for-synchronize-module/32739)

<div class="topic-metadata">

**Author:** [@Raj\_V](https://forum.ansible.com/u/Raj_V)\
**Replies:** 2\
**Last updated:** [May 5, 2020, 7:52pm UTC](https://forum.ansible.com/t/conditional-delegation-to-a-host-for-synchronize-module/32739 "2020-05-05T19:52:27Z")

</div>

Hello, I am a newbie to Ansible and trying to figure out how to synchronize between 3 hosts based on condition. Below are details: There are 3 nodes and based on which node is primary (I was able to get a custom fact s…

---

## [Help with Conditions](https://forum.ansible.com/t/help-with-conditions/32851)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 1\
**Last updated:** [May 5, 2020, 1:39pm UTC](https://forum.ansible.com/t/help-with-conditions/32851 "2020-05-05T13:39:49Z")

</div>

Hi All, Just wondering is their a better way of doing the Following? \` \`

---

## [Getting a message on folders created in a loop](https://forum.ansible.com/t/getting-a-message-on-folders-created-in-a-loop/32849)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 1\
**Last updated:** [May 5, 2020, 1:29pm UTC](https://forum.ansible.com/t/getting-a-message-on-folders-created-in-a-loop/32849 "2020-05-05T13:29:57Z")

</div>

I’m running a playbook that should create 2 folders in a loop. If the folder is not existing, I wish to get a message that folders was created In my scenario, folder 1 already exists and only folder 2 was created. But t…

---

## [Getting : error while evaluating conditional (my\_result.stat.exists): 'bool object' has no attribute 'stat' while expcting to be dictionary](https://forum.ansible.com/t/getting-error-while-evaluating-conditional-my-result-stat-exists-bool-object-has-no-attribute-stat-while-expcting-to-be-dictionary/32850)

<div class="topic-metadata">

**Author:** [@Meir\_Yanovich](https://forum.ansible.com/u/Meir_Yanovich)\
**Replies:** 1\
**Last updated:** [May 5, 2020, 10:42am UTC](https://forum.ansible.com/t/getting-error-while-evaluating-conditional-my-result-stat-exists-bool-object-has-no-attribute-stat-while-expcting-to-be-dictionary/32850 "2020-05-05T10:42:07Z")

</div>

i have this ansible simple playbook : where “/home/ec2-user/test1.txt” exists on disk \`

---

## [How to check if a word is present in list](https://forum.ansible.com/t/how-to-check-if-a-word-is-present-in-list/32846)

<div class="topic-metadata">

**Author:** [@Jenisha\_T](https://forum.ansible.com/u/Jenisha_T)\
**Replies:** 2\
**Last updated:** [May 5, 2020, 5:54am UTC](https://forum.ansible.com/t/how-to-check-if-a-word-is-present-in-list/32846 "2020-05-05T05:54:40Z")

</div>

My output from script execution is agent: { “stdout\_lines”: \[ The network is reachable. …Connected using winrm, executin COMPLETED at 4/5, The file is saved at D:\\ \] } I want to extract ‘COMPLETED’ from this list. I…

---

## [Failed to send key...to virtual machine due to None](https://forum.ansible.com/t/failed-to-send-key-to-virtual-machine-due-to-none/32848)

<div class="topic-metadata">

**Author:** [@Landon\_Tom](https://forum.ansible.com/u/Landon_Tom)\
**Replies:** 0\
**Last updated:** [May 5, 2020, 12:45am UTC](https://forum.ansible.com/t/failed-to-send-key-to-virtual-machine-due-to-none/32848 "2020-05-05T00:45:59Z")

</div>

Hi, I just started using Ansible and I’m having trouble sending key strokes to a VM to select options for an OS install. However, I get a “Failed to send key … to virtual machine due to None” when trying to send keys. I…

---

## [what is set\_when\_task\_skipped=false replacment in ansible 2.9?](https://forum.ansible.com/t/what-is-set-when-task-skipped-false-replacment-in-ansible-2-9/32844)

<div class="topic-metadata">

**Author:** [@Meir\_Yanovich](https://forum.ansible.com/u/Meir_Yanovich)\
**Replies:** 7\
**Last updated:** [May 4, 2020, 9:18pm UTC](https://forum.ansible.com/t/what-is-set-when-task-skipped-false-replacment-in-ansible-2-9/32844 "2020-05-04T21:18:56Z")

</div>

i have old code which use set\_when\_task\_skipped=false in register now it is not supported any more I’m getting on : \` name: Find location register: login\_app set\_when\_task\_skipped=false when: result.stat.exists ==…

---

## [Need help in formatting register variable](https://forum.ansible.com/t/need-help-in-formatting-register-variable/32840)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 2\
**Last updated:** [May 4, 2020, 5:29pm UTC](https://forum.ansible.com/t/need-help-in-formatting-register-variable/32840 "2020-05-04T17:29:28Z")

</div>

I have used the below play to display the files and folders with some pattern - name: Display backup files shell: "du -h {{partition}} --time | sort -rh | grep -o -P '(.\*bk|.\*bkup|.\*bak|.\*backup|.\*logs' | sort -rh | …

---

## [ERROR! 'win\_package' is not a valid attribute for a Play (Ansible controller version is 2.9)](https://forum.ansible.com/t/error-win-package-is-not-a-valid-attribute-for-a-play-ansible-controller-version-is-2-9/32842)

<div class="topic-metadata">

**Author:** [@Amit\_Kumar](https://forum.ansible.com/u/Amit_Kumar)\
**Replies:** 2\
**Last updated:** [May 4, 2020, 3:51pm UTC](https://forum.ansible.com/t/error-win-package-is-not-a-valid-attribute-for-a-play-ansible-controller-version-is-2-9/32842 "2020-05-04T15:51:57Z")

</div>

Hi , As i have created two simple playbook to remove file from window system and create the file on window system. But getting error while i execute the both playbook. (Ansible controller version is 2.9) remove\_file.…

---

## [ansible fact list](https://forum.ansible.com/t/ansible-fact-list/32836)

<div class="topic-metadata">

**Author:** [@Orkhan\_Mammadov](https://forum.ansible.com/u/Orkhan_Mammadov)\
**Replies:** 2\
**Last updated:** [May 4, 2020, 1:48pm UTC](https://forum.ansible.com/t/ansible-fact-list/32836 "2020-05-04T13:48:30Z")

</div>

Hi guys, I would like to check the facts list in ansible, it should be located in /etc/ansible/facts.d directory. But ansible directory under /etc is not exist. Is there different location that facts are located? Thank…

---

## [\_ec2\_instance\_facts.py botocore.exceptions.NoCredentialsError: Unable to locate credentials](https://forum.ansible.com/t/ec2-instance-facts-py-botocore-exceptions-nocredentialserror-unable-to-locate-credentials/32834)

<div class="topic-metadata">

**Author:** [@Meir\_Yanovich](https://forum.ansible.com/u/Meir_Yanovich)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 10:29am UTC](https://forum.ansible.com/t/ec2-instance-facts-py-botocore-exceptions-nocredentialserror-unable-to-locate-credentials/32834 "2020-05-04T10:29:33Z")

</div>

hello all im upgrading python from 2.7 to python 3.7 and now I’m getting error when using aws API on module : module: ec2\_instance\_facts - name: Get facts local\_action: module: ec2\_instance\_facts instance\_id…

---

## [MODULE FAILURE - TypeError: Value of unknown type: \<class 'requests.models.Response'\>, \<Response \[204\]\>](https://forum.ansible.com/t/module-failure-typeerror-value-of-unknown-type-class-requests-models-response-response-204/32826)

<div class="topic-metadata">

**Author:** [@Parasuram\_A\_Havoji](https://forum.ansible.com/u/Parasuram_A_Havoji)\
**Replies:** 2\
**Last updated:** [May 4, 2020, 8:16am UTC](https://forum.ansible.com/t/module-failure-typeerror-value-of-unknown-type-class-requests-models-response-response-204/32826 "2020-05-04T08:16:55Z")

</div>

Hello, I am seeing module failure while using hashivault\_write module. Ansible - Python - OpenSSH version on Ansible Node ; root@35f3dfdc476f:playbooks # ansible --version ansible 2.9.2 config file = /root/galorndon-…

---

## [lxd connection: become/become\_user ignored](https://forum.ansible.com/t/lxd-connection-become-become-user-ignored/32839)

<div class="topic-metadata">

**Author:** [@Gaetan\_QUENTIN](https://forum.ansible.com/u/Gaetan_QUENTIN)\
**Replies:** 0\
**Last updated:** [May 4, 2020, 7:26am UTC](https://forum.ansible.com/t/lxd-connection-become-become-user-ignored/32839 "2020-05-04T07:26:57Z")

</div>

Problem using lxd connection to provision lxd containers: become directive is ignored ISSUE TYPE Bug Report COMPONENT NAME command with become directive ANSIBLE VERSION ansible 2.9.7 config file = /home/myhome/.ansi…

---

## [Problem running Varibles in loop](https://forum.ansible.com/t/problem-running-varibles-in-loop/32838)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 12:36pm UTC](https://forum.ansible.com/t/problem-running-varibles-in-loop/32838 "2020-05-03T12:36:06Z")

</div>

Hi , I’m trying to create folders in loop under HDFS file system - From some reason, I can not run it in loop The playbook needs to run 2 commands hadoop fs -mkdir folder1 hadoop fs -mkdir folder2 Try #1 - - hosts:…

---

## [file src and state=absent together](https://forum.ansible.com/t/file-src-and-state-absent-together/32835)

<div class="topic-metadata">

**Author:** [@Marc\_Haber](https://forum.ansible.com/u/Marc_Haber)\
**Replies:** 2\
**Last updated:** [May 3, 2020, 9:21am UTC](https://forum.ansible.com/t/file-src-and-state-absent-together/32835 "2020-05-03T09:21:37Z")

</div>

Hi, I like constructs like the following: - name: MPM prefork file: src: "../../apache2/mods-available/{{ configfile }}" dest: "/etc/apache2{{ instance\_dashsuffix }}/mods-enabled/{{ configfile }}" sta…

---

## [MODULE FAILURE\\nSee stdout/stderr for the exact error on ansible version 2.9. python is 3.6](https://forum.ansible.com/t/module-failure-nsee-stdout-stderr-for-the-exact-error-on-ansible-version-2-9-python-is-3-6/32833)

<div class="topic-metadata">

**Author:** [@alok\_ranjan](https://forum.ansible.com/u/alok_ranjan)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 2:43pm UTC](https://forum.ansible.com/t/module-failure-nsee-stdout-stderr-for-the-exact-error-on-ansible-version-2-9-python-is-3-6/32833 "2020-05-02T14:43:39Z")

</div>

Hi, I am trying to develop my own custom ansible module . my env machine is centos and python version is 3.6. ansible version is 2.9.6 here is the playbook

---

## [Running roles for every host mentioned in inventory file](https://forum.ansible.com/t/running-roles-for-every-host-mentioned-in-inventory-file/32824)

<div class="topic-metadata">

**Author:** [@Vishal\_Bobade](https://forum.ansible.com/u/Vishal_Bobade)\
**Replies:** 3\
**Last updated:** [May 2, 2020, 1:36pm UTC](https://forum.ansible.com/t/running-roles-for-every-host-mentioned-in-inventory-file/32824 "2020-05-02T13:36:27Z")

</div>

HI , I have my inventory file like below , where I am using the variables primaryNode, secondaryNode in the roles so that particular role will run on the host specified infront of ansible\_host values. Now, how can i pa…

---

## [charset parameter mssql\_db module](https://forum.ansible.com/t/charset-parameter-mssql-db-module/32813)

<div class="topic-metadata">

**Author:** [@Rafael\_Oliveira](https://forum.ansible.com/u/Rafael_Oliveira)\
**Replies:** 5\
**Last updated:** [May 2, 2020, 8:51am UTC](https://forum.ansible.com/t/charset-parameter-mssql-db-module/32813 "2020-05-02T08:51:53Z")

</div>

Hello everyone, If possible, how can I set the charset parameter to mssql\_db module? In python I can do something like that: conn = pymssql.connect(server, user, password, db\_name, charset=‘WINDOWS-1252’) KR, Rafael …

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

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