# Ansible Project

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

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

**Page:** 170

---

## [Search for string in stdout for failed\_when](https://forum.ansible.com/t/search-for-string-in-stdout-for-failed-when/31142)

<div class="topic-metadata">

**Author:** [@JP-OKC](https://forum.ansible.com/u/JP-OKC)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 7:54pm UTC](https://forum.ansible.com/t/search-for-string-in-stdout-for-failed-when/31142 "2019-08-27T19:54:33Z")

</div>

how can I pull a string from the stdout and use it for failed\_when? I run a command on a switch and then I want to match a string w/in that output to determine if it failed or not. Here’s what the playbook looks like:

---

## [Rolling out latest Virtualbox via ansible?](https://forum.ansible.com/t/rolling-out-latest-virtualbox-via-ansible/31138)

<div class="topic-metadata">

**Author:** [@scorp123](https://forum.ansible.com/u/scorp123)\
**Replies:** 1\
**Last updated:** [August 27, 2019, 5:44pm UTC](https://forum.ansible.com/t/rolling-out-latest-virtualbox-via-ansible/31138 "2019-08-27T17:44:39Z")

</div>

I want to roll out the latest Virtualbox onto my Ubuntu 18.04 servers via ansible. What I’ve managed so far is an installer-script that gets copied over to any host in the “virtualbox” hosts group (as per ansible hosts c…

---

## [when: ansible conditional's based on distribution major version](https://forum.ansible.com/t/when-ansible-conditionals-based-on-distribution-major-version/31140)

<div class="topic-metadata">

**Author:** [@Jeffrey\_Agnitsch](https://forum.ansible.com/u/Jeffrey_Agnitsch)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 3:43pm UTC](https://forum.ansible.com/t/when-ansible-conditionals-based-on-distribution-major-version/31140 "2019-08-27T15:43:56Z")

</div>

I am trying to copy over .rpm files based on the major version of the operating system I believe I am referencing the ansible\_facts part incorrectly does anyone have an example of the right way? tasks: name: Copy ker…

---

## [Adding a Fact to a dict for Cisco Interf.](https://forum.ansible.com/t/adding-a-fact-to-a-dict-for-cisco-interf/31139)

<div class="topic-metadata">

**Author:** [@Spiro\_Mitsialis](https://forum.ansible.com/u/Spiro_Mitsialis)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 3:38pm UTC](https://forum.ansible.com/t/adding-a-fact-to-a-dict-for-cisco-interf/31139 "2019-08-27T15:38:55Z")

</div>

I have the following that is not working. \` vars: cmdb: xkjsdflkjsjdl4d cisco\_ios: interfaces: gigabit1/0/1: name: Gigabit1/0/1 status: up gigabit1/0/2: name: Gigabit1/0/2 status: down tasks: name: Test in…

---

## [inventory file for playbooks with only uri calls](https://forum.ansible.com/t/inventory-file-for-playbooks-with-only-uri-calls/31137)

<div class="topic-metadata">

**Author:** [@Nicholas\_Britton](https://forum.ansible.com/u/Nicholas_Britton)\
**Replies:** 0\
**Last updated:** [August 27, 2019, 1:23pm UTC](https://forum.ansible.com/t/inventory-file-for-playbooks-with-only-uri-calls/31137 "2019-08-27T13:23:12Z")

</div>

I am working on a set of playbooks for a hitachi storage automation. They utilize a cmrest server, that manages the connection to each storage array. So all of the tasks are ran on the localhost to the same url base, but…

---

## [Ansible and Windows Project](https://forum.ansible.com/t/ansible-and-windows-project/31098)

<div class="topic-metadata">

**Author:** [@Simon-Pierre\_Diamond](https://forum.ansible.com/u/Simon-Pierre_Diamond)\
**Replies:** 4\
**Last updated:** [August 27, 2019, 1:16pm UTC](https://forum.ansible.com/t/ansible-and-windows-project/31098 "2019-08-27T13:16:49Z")

</div>

Hi Ansible Community, It is my first post here. I am coming to get more information about Windows management with Ansible. I have been using Ansible for about a year now, and I am able to manage Windows with the WinRM …

---

## [Attaching/detaching storage domains](https://forum.ansible.com/t/attaching-detaching-storage-domains/31136)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 0\
**Last updated:** [August 27, 2019, 1:06pm UTC](https://forum.ansible.com/t/attaching-detaching-storage-domains/31136 "2019-08-27T13:06:16Z")

</div>

We have a Red Hat RHV setup that uses NFS for its storage. We are moving to a Red Hat Hyperconverged solution that uses GlusterFS for its storage. We have a Data domain called Migrate that we use to move the VM disks fro…

---

## [Loop with hostvars groups](https://forum.ansible.com/t/loop-with-hostvars-groups/31134)

<div class="topic-metadata">

**Author:** [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 12:47pm UTC](https://forum.ansible.com/t/loop-with-hostvars-groups/31134 "2019-08-27T12:47:14Z")

</div>

Hi, I have an inventory with groups this configuration the DB Servers: \[db\] 192.168.0.1 192.168.0.2 192.168.0.3 I want to do loop the groups and get variable ipaddress in template.j2. My loop is: {% for host in gr…

---

## [win\_command](https://forum.ansible.com/t/win-command/31125)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 4\
**Last updated:** [August 27, 2019, 5:31am UTC](https://forum.ansible.com/t/win-command/31125 "2019-08-27T05:31:32Z")

</div>

Dear All, I am able to install notepad in the window server but unable to do it in specific directory like D:\\npp. name: install notepad plus plus playbook hosts: win gather\_facts: no tasks: name: fetch notepad-plu…

---

## [Why is this telling me the variable is undefined?](https://forum.ansible.com/t/why-is-this-telling-me-the-variable-is-undefined/31123)

<div class="topic-metadata">

**Author:** [@Chrono\_7](https://forum.ansible.com/u/Chrono_7)\
**Replies:** 9\
**Last updated:** [August 26, 2019, 10:46pm UTC](https://forum.ansible.com/t/why-is-this-telling-me-the-variable-is-undefined/31123 "2019-08-26T22:46:33Z")

</div>

I tried to follow along with a similar approach to the docs on read\_csv here. I’m not sure why I’m getting this error returned when the value of systems is defined just above the set\_fact: fatal: \[127.0.0.1\]: FAILED! =\> …

---

## [Ansible Module Failure](https://forum.ansible.com/t/ansible-module-failure/31119)

<div class="topic-metadata">

**Author:** [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Replies:** 7\
**Last updated:** [August 26, 2019, 7:21pm UTC](https://forum.ansible.com/t/ansible-module-failure/31119 "2019-08-26T19:21:12Z")

</div>

Hello All, I am running ansible from a MAC 2018, ansible version 2.8.3 and trying to update servers in AWS (Amazon Linux) . I can successfully ping all the servers, and can run my playbook on ALL server BUT on dev\_FE an…

---

## [Need to Replace single quote with double quotes in Ansible](https://forum.ansible.com/t/need-to-replace-single-quote-with-double-quotes-in-ansible/31124)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 2\
**Last updated:** [August 26, 2019, 4:37pm UTC](https://forum.ansible.com/t/need-to-replace-single-quote-with-double-quotes-in-ansible/31124 "2019-08-26T16:37:09Z")

</div>

I have a multiline variable “filedet” that contains string text having multiple single quotes. I wish to replace the single quote to double quotes so that It can be acceptable for SQL query and below is what I tried. f…

---

## [ansible-playbook inline help](https://forum.ansible.com/t/ansible-playbook-inline-help/31127)

<div class="topic-metadata">

**Author:** [@Emmanuel\_Lacour1](https://forum.ansible.com/u/Emmanuel_Lacour1)\
**Replies:** 2\
**Last updated:** [August 26, 2019, 2:43pm UTC](https://forum.ansible.com/t/ansible-playbook-inline-help/31127 "2019-08-26T14:43:11Z")

</div>

Dear ansible users, is it possible to have some kind of way to write a custom help inside a playbook that would be printed once (not for each host) when you issue a command like: ansible-playbook playbooks/myplay.yml --…

---

## [How Do I Conditionally Import a Playbook?](https://forum.ansible.com/t/how-do-i-conditionally-import-a-playbook/31121)

<div class="topic-metadata">

**Author:** [@Chrono\_7](https://forum.ansible.com/u/Chrono_7)\
**Replies:** 2\
**Last updated:** [August 26, 2019, 1:46am UTC](https://forum.ansible.com/t/how-do-i-conditionally-import-a-playbook/31121 "2019-08-26T01:46:28Z")

</div>

I’d like to know how to conditionally import a playbook. I have a master playbook which calls several others The master looks like this: \`

---

## [Kerberos authentication for Windows hosts only works with -vv or enabling logging in /etc/ansible/ansible.conf](https://forum.ansible.com/t/kerberos-authentication-for-windows-hosts-only-works-with-vv-or-enabling-logging-in-etc-ansible-ansible-conf/31122)

<div class="topic-metadata">

**Author:** [@Ronald\_van\_Vugt](https://forum.ansible.com/u/Ronald_van_Vugt)\
**Replies:** 0\
**Last updated:** [August 25, 2019, 7:58pm UTC](https://forum.ansible.com/t/kerberos-authentication-for-windows-hosts-only-works-with-vv-or-enabling-logging-in-etc-ansible-ansible-conf/31122 "2019-08-25T19:58:30Z")

</div>

Hello, I have a very strange problem: The situation: One Microsoft domain controller (Windows 2012R2) and several Windows member servers joining this domain (also Windows 2012R2). The ansible server is installed/confi…

---

## [Error downloading a 5 GB file with get\_url on http](https://forum.ansible.com/t/error-downloading-a-5-gb-file-with-get-url-on-http/31103)

<div class="topic-metadata">

**Author:** [@Daniel\_Cure](https://forum.ansible.com/u/Daniel_Cure)\
**Replies:** 6\
**Last updated:** [August 25, 2019, 5:41am UTC](https://forum.ansible.com/t/error-downloading-a-5-gb-file-with-get-url-on-http/31103 "2019-08-25T05:41:43Z")

</div>

Good afternoon dear contributors of ansible. Thank you very much for your kindly answer. I have a situation with a playbook, which takes the following error when the task of downloading a 5GB file runs: after some minu…

---

## [win\_file\_version](https://forum.ansible.com/t/win-file-version/31117)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 2\
**Last updated:** [August 25, 2019, 4:46am UTC](https://forum.ansible.com/t/win-file-version/31117 "2019-08-25T04:46:54Z")

</div>

Hi All, Is there any solution to know why ansible is throwing below error even after correct syntax ? It has become very difficult to find as there is no clue even after referring ansible document , everything seems to …

---

## [\[question\] run logstash shell script in ansible playbooks](https://forum.ansible.com/t/question-run-logstash-shell-script-in-ansible-playbooks/31037)

<div class="topic-metadata">

**Author:** [@seungdols](https://forum.ansible.com/u/seungdols)\
**Replies:** 5\
**Last updated:** [August 24, 2019, 2:11pm UTC](https://forum.ansible.com/t/question-run-logstash-shell-script-in-ansible-playbooks/31037 "2019-08-24T14:11:04Z")

</div>

Hi, I like ansible. I have one question. I have the role of setup-logstash. I want to execute the logstash process. (it doesn’t registration in service of centos) setup-logstash role is download logstash.tar.gz and th…

---

## [hcloud plugin - working with dynamic inventory](https://forum.ansible.com/t/hcloud-plugin-working-with-dynamic-inventory/31118)

<div class="topic-metadata">

**Author:** [@Alexey\_Lesovsky](https://forum.ansible.com/u/Alexey_Lesovsky)\
**Replies:** 0\
**Last updated:** [August 24, 2019, 10:36am UTC](https://forum.ansible.com/t/hcloud-plugin-working-with-dynamic-inventory/31118 "2019-08-24T10:36:06Z")

</div>

Hi, Trying to create a dynamic inventory using hcloud plugin and have some issues. Hetzner servers might have user-defined labels and I’m trying to define servers into groups using labels. As I can see my test server …

---

## [setup.exe and enter value then click next](https://forum.ansible.com/t/setup-exe-and-enter-value-then-click-next/31111)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 0\
**Last updated:** [August 23, 2019, 12:20pm UTC](https://forum.ansible.com/t/setup-exe-and-enter-value-then-click-next/31111 "2019-08-23T12:20:46Z")

</div>

Dear All, Looking for a ansible module name which invoke setup.exe and capture the value i.e build number and then click next so on … how to achieve it using playbook for window server configuration management . Thank…

---

## [win\_mapped\_drive, drive not found](https://forum.ansible.com/t/win-mapped-drive-drive-not-found/31110)

<div class="topic-metadata">

**Author:** [@uday1kiran](https://forum.ansible.com/u/uday1kiran)\
**Replies:** 0\
**Last updated:** [August 23, 2019, 12:09pm UTC](https://forum.ansible.com/t/win-mapped-drive-drive-not-found/31110 "2019-08-23T12:09:38Z")

</div>

I mapped a network drive using win\_mapped\_drive. But it is not available for next tasks in the play. My Playbook:

---

## [How to add string along with variable in Ansible lineinfile](https://forum.ansible.com/t/how-to-add-string-along-with-variable-in-ansible-lineinfile/31108)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 3\
**Last updated:** [August 23, 2019, 10:27am UTC](https://forum.ansible.com/t/how-to-add-string-along-with-variable-in-ansible-lineinfile/31108 "2019-08-23T10:27:27Z")

</div>

I want my filedet.yaml to look like 10.9.75.78: /app/tmp/tmp.log, /vars/tmp/test.out 10.9.55.74: /app/tmp/tmp1.log, /vars/tmp/admin.out The below works fine and logs the data correctly but when i add ': ’ the syntax…

---

## ['Unknown host key error' only happens when running a playbook](https://forum.ansible.com/t/unknown-host-key-error-only-happens-when-running-a-playbook/31101)

<div class="topic-metadata">

**Author:** [@Mauricio\_Tavares](https://forum.ansible.com/u/Mauricio_Tavares)\
**Replies:** 3\
**Last updated:** [August 23, 2019, 7:35am UTC](https://forum.ansible.com/t/unknown-host-key-error-only-happens-when-running-a-playbook/31101 "2019-08-23T07:35:43Z")

</div>

So I want to reach out to my router. I first try raub@desktop:~/dev/ansible$ ssh janitor@uranus.example.com janitor@uranus. example.com's password: which is expected since I have ssh'd into the router quite many time…

---

## [Anyway to get output without all the "!"?](https://forum.ansible.com/t/anyway-to-get-output-without-all-the/31102)

<div class="topic-metadata">

**Author:** [@Steven\_Williams](https://forum.ansible.com/u/Steven_Williams)\
**Replies:** 6\
**Last updated:** [August 23, 2019, 6:58am UTC](https://forum.ansible.com/t/anyway-to-get-output-without-all-the/31102 "2019-08-23T06:58:53Z")

</div>

---

## [Ansible variables jinja and facts](https://forum.ansible.com/t/ansible-variables-jinja-and-facts/31107)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 0\
**Last updated:** [August 23, 2019, 5:18am UTC](https://forum.ansible.com/t/ansible-variables-jinja-and-facts/31107 "2019-08-23T05:18:37Z")

</div>

So it’s confusing between all the rules on these three is there a good resource to go over this? Or maybe someone willing to help me this weekend figure out when you use quotes when you don’t and when you’re able to use…

---

## [Unable to get value of variable from another Play in Ansible](https://forum.ansible.com/t/unable-to-get-value-of-variable-from-another-play-in-ansible/31104)

<div class="topic-metadata">

**Author:** [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Replies:** 4\
**Last updated:** [August 22, 2019, 9:35pm UTC](https://forum.ansible.com/t/unable-to-get-value-of-variable-from-another-play-in-ansible/31104 "2019-08-22T21:35:19Z")

</div>

I wish to obtain the value of “f\_APP” variable of Play 2 into Play 3. Below is my playbook which case be used as a testcase: \` name: “Play 1” hosts: localhost tasks: add\_host: name={{ item }} groups=dest\_nodes …

---

## [win\_nssm](https://forum.ansible.com/t/win-nssm/31097)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 4\
**Last updated:** [August 22, 2019, 4:24pm UTC](https://forum.ansible.com/t/win-nssm/31097 "2019-08-22T16:24:27Z")

</div>

Hi All, getting below error so you have any idea about it ? ERROR! Syntax Error while loading YAML. mapping values are not allowed in this context The error appears to be in ‘/home/manish/mk/ansible/install\_exe.yml’:…

---

## [More dynamic variables](https://forum.ansible.com/t/more-dynamic-variables/31094)

<div class="topic-metadata">

**Author:** [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Replies:** 4\
**Last updated:** [August 22, 2019, 3:25pm UTC](https://forum.ansible.com/t/more-dynamic-variables/31094 "2019-08-22T15:25:55Z")

</div>

I hate having to constantly go here to solve issues like this, especially when the issues I keep presenting are all so similar, but eventually I have to just give up trying to solve this on my own and ask. I want to def…

---

## [Ansible for Cisco CallManager](https://forum.ansible.com/t/ansible-for-cisco-callmanager/31030)

<div class="topic-metadata">

**Author:** [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Replies:** 1\
**Last updated:** [August 22, 2019, 12:56pm UTC](https://forum.ansible.com/t/ansible-for-cisco-callmanager/31030 "2019-08-22T12:56:48Z")

</div>

Hi Team, Anybody using Ansible for cisco call manager? thanks

---

## [winrm-install](https://forum.ansible.com/t/winrm-install/31100)

<div class="topic-metadata">

**Author:** [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Replies:** 1\
**Last updated:** [August 22, 2019, 12:54pm UTC](https://forum.ansible.com/t/winrm-install/31100 "2019-08-22T12:54:15Z")

</div>

Hi , What could be the reason for below error ? any idea ?

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

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