# Ansible Project

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

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

**Page:** 136

---

## [Error Handling  of Failed Task](https://forum.ansible.com/t/error-handling-of-failed-task/32553)

<div class="topic-metadata">

**Author:** [@Mahmut](https://forum.ansible.com/u/Mahmut)\
**Replies:** 0\
**Last updated:** [March 28, 2020, 8:46pm UTC](https://forum.ansible.com/t/error-handling-of-failed-task/32553 "2020-03-28T20:46:18Z")

</div>

Hello Dear All, I am using a playbook that gives below output intentionally. Is there any possible way that I can write this FAILED statement to a file in order to be used by another script? thanks, PLAY \[CHECK USERS …

---

## [how to comment multiple lines in ansible playbook](https://forum.ansible.com/t/how-to-comment-multiple-lines-in-ansible-playbook/23510)

<div class="topic-metadata">

**Author:** [@jithendra\_myla](https://forum.ansible.com/u/jithendra_myla)\
**Replies:** 6\
**Last updated:** [March 28, 2020, 2:15pm UTC](https://forum.ansible.com/t/how-to-comment-multiple-lines-in-ansible-playbook/23510 "2020-03-28T14:15:07Z")

</div>

how to comment multiple lines in ansible playbook for line i just use # but to comment multiple line ? Thank you -Jay

---

## [Downloading files with a specific regular expression from remote https host to target server local path.](https://forum.ansible.com/t/downloading-files-with-a-specific-regular-expression-from-remote-https-host-to-target-server-local-path/32543)

<div class="topic-metadata">

**Author:** [@user106](https://forum.ansible.com/u/user106)\
**Replies:** 6\
**Last updated:** [March 27, 2020, 8:15pm UTC](https://forum.ansible.com/t/downloading-files-with-a-specific-regular-expression-from-remote-https-host-to-target-server-local-path/32543 "2020-03-27T20:15:44Z")

</div>

Having some difficulty finding what is the Ansible code to do this: Downloading files with a specific regular expression from remote http / https host to a target server local path. So would like to wget http://remote.…

---

## [save stdout to file on localhost.](https://forum.ansible.com/t/save-stdout-to-file-on-localhost/32550)

<div class="topic-metadata">

**Author:** [@Mario\_Garcia](https://forum.ansible.com/u/Mario_Garcia)\
**Replies:** 1\
**Last updated:** [March 27, 2020, 6:00pm UTC](https://forum.ansible.com/t/save-stdout-to-file-on-localhost/32550 "2020-03-27T18:00:20Z")

</div>

i want to query all the users on the hosts of my inventory and create afile for each hosts with all the privileges for each user I know that htere tools like freeipa but we do not have those in place so i am using the …

---

## [expect and "Press \<Enter\> to continue."](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517)

<div class="topic-metadata">

**Author:** [@Jost](https://forum.ansible.com/u/Jost)\
**Replies:** 2\
**Last updated:** [March 27, 2020, 10:28am UTC](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517 "2020-03-27T10:28:13Z")

</div>

Hi how can I use expect module to responds to “Press to continue.” during installation of software on linux? The questins during installations are: Press to continue. → then show licence you have to go to the last l…

---

## [Create AWS EFS](https://forum.ansible.com/t/create-aws-efs/32527)

<div class="topic-metadata">

**Author:** [@sandy.hung](https://forum.ansible.com/u/sandy.hung)\
**Replies:** 7\
**Last updated:** [March 27, 2020, 3:59am UTC](https://forum.ansible.com/t/create-aws-efs/32527 "2020-03-27T03:59:31Z")

</div>

Dear All: I have create efs ansible , I have install boto3 this is show error msg this is my ansible

---

## [How to extract a value of a field within a list of dictionaries  when a key matches another value](https://forum.ansible.com/t/how-to-extract-a-value-of-a-field-within-a-list-of-dictionaries-when-a-key-matches-another-value/32545)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 2\
**Last updated:** [March 26, 2020, 11:18pm UTC](https://forum.ansible.com/t/how-to-extract-a-value-of-a-field-within-a-list-of-dictionaries-when-a-key-matches-another-value/32545 "2020-03-26T23:18:49Z")

</div>

The playbook below - name: test with json\_query 1/2 hosts: localhost vars: domain\_definition: - name: server11 cluster: cluster1 port: '8080' - name: server12 cluster:…

---

## [Integer comparison if condition jinja2 template Ansible does not work](https://forum.ansible.com/t/integer-comparison-if-condition-jinja2-template-ansible-does-not-work/32542)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 6:21pm UTC](https://forum.ansible.com/t/integer-comparison-if-condition-jinja2-template-ansible-does-not-work/32542 "2020-03-26T18:21:17Z")

</div>

My jinja2 template yields correct value for the variable {{ vars\[\[allip.name\](http://allip.name/) | join("")\] | default('ERR') }} The variable has value 82.3 which gets printed by Ansible’s template module. I wish to …

---

## [Unable to get remote target hostname when using delegate\_to](https://forum.ansible.com/t/unable-to-get-remote-target-hostname-when-using-delegate-to/32534)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 1\
**Last updated:** [March 26, 2020, 9:05am UTC](https://forum.ansible.com/t/unable-to-get-remote-target-hostname-when-using-delegate-to/32534 "2020-03-26T09:05:45Z")

</div>

Below playbook gets the disk usage percentage of ‘/tmp’ from a list of remote\_hosts \[20 remote servers\] and stores it locally (delegate\_to) in a file {{ playbook\_dir }}/tmpfiles/stats.yml \`

---

## [ternary clarification needed](https://forum.ansible.com/t/ternary-clarification-needed/32535)

<div class="topic-metadata">

**Author:** [@Davide\_Scrimieri](https://forum.ansible.com/u/Davide_Scrimieri)\
**Replies:** 5\
**Last updated:** [March 26, 2020, 8:32am UTC](https://forum.ansible.com/t/ternary-clarification-needed/32535 "2020-03-26T08:32:15Z")

</div>

Hello, Whenever a ternary is used are both conditions evaluated regardless ? For example, I want to convert “my\_other\_var” to an object only if it is passed as as string, otherwise I don’t want to touch the object, and…

---

## [Unable to get correct disk space utilized percentage using Ansible API](https://forum.ansible.com/t/unable-to-get-correct-disk-space-utilized-percentage-using-ansible-api/32531)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 8\
**Last updated:** [March 26, 2020, 6:09am UTC](https://forum.ansible.com/t/unable-to-get-correct-disk-space-utilized-percentage-using-ansible-api/32531 "2020-03-26T06:09:07Z")

</div>

Here is the output of df -k from the target server: # df -k Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 1905280 0 1905280 0% /dev tmpfs 1922024 0 1922024 0% /dev/shm /dev/sda1 1942528 295616 164691…

---

## [Using Ansible to query Splunk logs](https://forum.ansible.com/t/using-ansible-to-query-splunk-logs/32532)

<div class="topic-metadata">

**Author:** [@John1](https://forum.ansible.com/u/John1)\
**Replies:** 0\
**Last updated:** [March 25, 2020, 10:41pm UTC](https://forum.ansible.com/t/using-ansible-to-query-splunk-logs/32532 "2020-03-25T22:41:22Z")

</div>

I am coming up short on this, but wondering if anyone has tried, or has recommendations for querying error logs stored in Splunk with Ansible? The reason is to push the query load to the Splunk servers and not the produc…

---

## [Awall activate hangs](https://forum.ansible.com/t/awall-activate-hangs/32526)

<div class="topic-metadata">

**Author:** [@Andrew\_Duty](https://forum.ansible.com/u/Andrew_Duty)\
**Replies:** 2\
**Last updated:** [March 25, 2020, 4:20pm UTC](https://forum.ansible.com/t/awall-activate-hangs/32526 "2020-03-25T16:20:49Z")

</div>

I suspect I am missing something simple, but when I try to use the awall module to establish firewall rules on Alpine Linux, ansible hangs on the awall activate task, even though allowing ssh is one of the rules I active…

---

## [Updated example ansible.cfg?](https://forum.ansible.com/t/updated-example-ansible-cfg/32524)

<div class="topic-metadata">

**Author:** [@bob](https://forum.ansible.com/u/bob)\
**Replies:** 2\
**Last updated:** [March 24, 2020, 10:11pm UTC](https://forum.ansible.com/t/updated-example-ansible-cfg/32524 "2020-03-24T22:11:13Z")

</div>

Did a git pull that rebased everything to shift to the collection stuff. https://docs.ansible.com/ansible/latest/user\_guide/collections\_using.html talks about Galaxy server (as listed in the ansible.cfg file under GALA…

---

## [OS support contribution guidelines](https://forum.ansible.com/t/os-support-contribution-guidelines/32490)

<div class="topic-metadata">

**Author:** [@Nick\_Venenga](https://forum.ansible.com/u/Nick_Venenga)\
**Replies:** 7\
**Last updated:** [March 24, 2020, 12:00pm UTC](https://forum.ansible.com/t/os-support-contribution-guidelines/32490 "2020-03-24T12:00:48Z")

</div>

What host operating systems does Ansible accept PRs for? I got hit with a hard no here https://github.com/ansible/ansible/pull/65381#issuecomment-600250171 that sounds like anything Windows related it out of the question…

---

## [Unable to print include\_vars dictionary & list variables](https://forum.ansible.com/t/unable-to-print-include-vars-dictionary-list-variables/32520)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 11:22am UTC](https://forum.ansible.com/t/unable-to-print-include-vars-dictionary-list-variables/32520 "2020-03-24T11:22:47Z")

</div>

Below is my playbook that loads and prints the variables \`

---

## [Is Ansibull Triage Bot available as a module for inner source developers](https://forum.ansible.com/t/is-ansibull-triage-bot-available-as-a-module-for-inner-source-developers/32518)

<div class="topic-metadata">

**Author:** [@Joseph\_O\_Mara](https://forum.ansible.com/u/Joseph_O_Mara)\
**Replies:** 1\
**Last updated:** [March 24, 2020, 6:24am UTC](https://forum.ansible.com/t/is-ansibull-triage-bot-available-as-a-module-for-inner-source-developers/32518 "2020-03-24T06:24:53Z")

</div>

Modules Ansibot and Ansibull Triage Bot seem very useful modules for developers who are trying to control their own releases Just curious if these modules are publicly available for development teams outside of Ansible …

---

## [Collections namespace collisions](https://forum.ansible.com/t/collections-namespace-collisions/32519)

<div class="topic-metadata">

**Author:** [@Orion\_Poplawski](https://forum.ansible.com/u/Orion_Poplawski)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 1:58am UTC](https://forum.ansible.com/t/collections-namespace-collisions/32519 "2020-03-24T01:58:32Z")

</div>

I just discovered that you can use: collections: my\_namespace.my\_collection in a playbook to avoid having to type the FQCN of a module. However, how are namespace collisions handled? It seems impractical that every c…

---

## [Debugging ACI query task](https://forum.ansible.com/t/debugging-aci-query-task/32508)

<div class="topic-metadata">

**Author:** [@Albert\_Short](https://forum.ansible.com/u/Albert_Short)\
**Replies:** 5\
**Last updated:** [March 23, 2020, 8:22pm UTC](https://forum.ansible.com/t/debugging-aci-query-task/32508 "2020-03-23T20:22:00Z")

</div>

Hello all, I hope we are all well in this trying period across the world. I am to debug an ACI query to display a simple output, but having trouble getting the correct syntax to provide the output I desire. My Ansible…

---

## [Ansible 2.9 install on Redhat 6.10](https://forum.ansible.com/t/ansible-2-9-install-on-redhat-6-10/32515)

<div class="topic-metadata">

**Author:** [@Josephsimon\_Arokiara](https://forum.ansible.com/u/Josephsimon_Arokiara)\
**Replies:** 1\
**Last updated:** [March 23, 2020, 6:59pm UTC](https://forum.ansible.com/t/ansible-2-9-install-on-redhat-6-10/32515 "2020-03-23T18:59:17Z")

</div>

Hi All, How you doing? Is there any way to install ansible 2.9 on Redhat 6.10 version? Cheers, Simon J

---

## [Omit item in list](https://forum.ansible.com/t/omit-item-in-list/32513)

<div class="topic-metadata">

**Author:** [@Quentin\_Aveno](https://forum.ansible.com/u/Quentin_Aveno)\
**Replies:** 4\
**Last updated:** [March 23, 2020, 6:20pm UTC](https://forum.ansible.com/t/omit-item-in-list/32513 "2020-03-23T18:20:31Z")

</div>

Hi ! Is there any way to omit a item in a list at the declaration ? name: “Test” hosts: localhost vars: test1: false test2: name: test21 includes: { file: “file221.j2”, path: “/somewhere/” } { file: “file222.j2”,…

---

## [Generate Ketab & create service principal user](https://forum.ansible.com/t/generate-ketab-create-service-principal-user/32510)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 0\
**Last updated:** [March 23, 2020, 10:39am UTC](https://forum.ansible.com/t/generate-ketab-create-service-principal-user/32510 "2020-03-23T10:39:03Z")

</div>

Hi all, I need to work with a domain environment and for that, I need to perform 2 task Create a service principal user on windows active directory domain Generate keytab from windows active directory domain Is it po…

---

## [pre-tasks doesn't execute before roles...](https://forum.ansible.com/t/pre-tasks-doesnt-execute-before-roles/32504)

<div class="topic-metadata">

**Author:** [@Johanna\_Galarza](https://forum.ansible.com/u/Johanna_Galarza)\
**Replies:** 11\
**Last updated:** [March 22, 2020, 4:46pm UTC](https://forum.ansible.com/t/pre-tasks-doesnt-execute-before-roles/32504 "2020-03-22T16:46:36Z")

</div>

This is my current setup

---

## [No output from Cisco router](https://forum.ansible.com/t/no-output-from-cisco-router/25864)

<div class="topic-metadata">

**Author:** [@psprygad](https://forum.ansible.com/u/psprygad)\
**Replies:** 11\
**Last updated:** [March 21, 2020, 8:38am UTC](https://forum.ansible.com/t/no-output-from-cisco-router/25864 "2020-03-21T08:38:28Z")

</div>

run with -v (or -vvv) to see the output of the task on the command line use register to further process the output (http://docs.ansible.com/ansible/latest/playbooks\_variables.html#registered-variables)

---

## [renaming hosts](https://forum.ansible.com/t/renaming-hosts/32507)

<div class="topic-metadata">

**Author:** [@Joe3](https://forum.ansible.com/u/Joe3)\
**Replies:** 0\
**Last updated:** [March 21, 2020, 4:07am UTC](https://forum.ansible.com/t/renaming-hosts/32507 "2020-03-21T04:07:13Z")

</div>

I’m fairly new to ansible, so I’m still learning it. Please bare with me. I have a variable file that defines maps current hostnames of devices to new hostnames. I’m trying to write a playbook that will re the variable f…

---

## [Print Element of List in   msg: of Ansible](https://forum.ansible.com/t/print-element-of-list-in-msg-of-ansible/32503)

<div class="topic-metadata">

**Author:** [@Mahmut](https://forum.ansible.com/u/Mahmut)\
**Replies:** 1\
**Last updated:** [March 20, 2020, 9:17pm UTC](https://forum.ansible.com/t/print-element-of-list-in-msg-of-ansible/32503 "2020-03-20T21:17:11Z")

</div>

Hello Dear All, I have below playbook. There is also output of this playbook bottom. I want to print elements of below bold list variable. Could you please help me for this how to do?

---

## [Ansible sequence for creating soft link](https://forum.ansible.com/t/ansible-sequence-for-creating-soft-link/32498)

<div class="topic-metadata">

**Author:** [@Rakesh\_Parida](https://forum.ansible.com/u/Rakesh_Parida)\
**Replies:** 2\
**Last updated:** [March 20, 2020, 5:55pm UTC](https://forum.ansible.com/t/ansible-sequence-for-creating-soft-link/32498 "2020-03-20T17:55:58Z")

</div>

Hi , I have 3 directories in /tmp as follows: Test\_10.0.0 Test\_11.0.0 Test\_13.0.0 other directories in /tmp Test Prod Dev Now i want to create soft link of Test\_10.0.0 - Test Test\_11.0.0 - Prod Test\_13.0.0 - …

---

## [counting the array of elements in ansible.](https://forum.ansible.com/t/counting-the-array-of-elements-in-ansible/32501)

<div class="topic-metadata">

**Author:** [@mahesh\_g\_o](https://forum.ansible.com/u/mahesh_g_o)\
**Replies:** 2\
**Last updated:** [March 19, 2020, 3:56pm UTC](https://forum.ansible.com/t/counting-the-array-of-elements-in-ansible/32501 "2020-03-19T15:56:39Z")

</div>

hosts: localhost gather\_facts: false vars: foo: \[‘vs1’,‘vs2’,‘vs3’,‘vs4’\] tasks: name: counting the array elements yes: “{{foo|length}}” seeing the below error: not sure what am i missing here: ERROR! Syntax Erro…

---

## [passing separate password to end machine from AWX](https://forum.ansible.com/t/passing-separate-password-to-end-machine-from-awx/32500)

<div class="topic-metadata">

**Author:** [@Nasir\_Nasir](https://forum.ansible.com/u/Nasir_Nasir)\
**Replies:** 1\
**Last updated:** [March 19, 2020, 11:13am UTC](https://forum.ansible.com/t/passing-separate-password-to-end-machine-from-awx/32500 "2020-03-19T11:13:06Z")

</div>

Hi Team, i have a requirement of IDRAC where i connect using ssh, how should i ass that password from AWX on run time

---

## [Search upto first occurence of the pattern](https://forum.ansible.com/t/search-upto-first-occurence-of-the-pattern/32496)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 2\
**Last updated:** [March 19, 2020, 10:38am UTC](https://forum.ansible.com/t/search-upto-first-occurence-of-the-pattern/32496 "2020-03-19T10:38:28Z")

</div>

I have the output of command as below /ps/was-ps/woa/woa\_runtime/profiles /ps/was-ps/woa12/woa\_runtime/profiles /pas/ec1/ukpl/woa\_runtime/profiles From this paths, I need to find the lines upto first occurence of wo…

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

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