# Ansible Project

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

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

**Page:** 122

---

## [Syntax errors with Jinja2 control structures in tasks file](https://forum.ansible.com/t/syntax-errors-with-jinja2-control-structures-in-tasks-file/33096)

<div class="topic-metadata">

**Author:** [@Alexander\_Z](https://forum.ansible.com/u/Alexander_Z)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 2:53pm UTC](https://forum.ansible.com/t/syntax-errors-with-jinja2-control-structures-in-tasks-file/33096 "2020-06-05T14:53:15Z")

</div>

Hi Ansible community, I am observing syntax error on attempt to use Jinja2 control structures in the tasks file: Code /opt/ansible/roles/network/tasks/network.yml: {% if publicavailable|default(False) == False and p…

---

## [Can we use Ansible to deploy tasks on hardware level e.g., firmware upgrade on dell server](https://forum.ansible.com/t/can-we-use-ansible-to-deploy-tasks-on-hardware-level-e-g-firmware-upgrade-on-dell-server/33099)

<div class="topic-metadata">

**Author:** [@Surya\_Gunisetti](https://forum.ansible.com/u/Surya_Gunisetti)\
**Replies:** 4\
**Last updated:** [June 5, 2020, 12:31pm UTC](https://forum.ansible.com/t/can-we-use-ansible-to-deploy-tasks-on-hardware-level-e-g-firmware-upgrade-on-dell-server/33099 "2020-06-05T12:31:11Z")

</div>

Hi All, Can we use Ansible Ad-hoc commands / playbooks to make changes at Dell/HP/IBM servers hardware level e.g., firmware,bios upgrade Regards, Surya

---

## [ALv2 reports odd data in ansible\_distribution and ansible\_os\_family](https://forum.ansible.com/t/alv2-reports-odd-data-in-ansible-distribution-and-ansible-os-family/33093)

<div class="topic-metadata">

**Author:** [@Thomas\_Kern](https://forum.ansible.com/u/Thomas_Kern)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 6:01am UTC](https://forum.ansible.com/t/alv2-reports-odd-data-in-ansible-distribution-and-ansible-os-family/33093 "2020-06-05T06:01:44Z")

</div>

We have just begun to use Ansible to manage some ALv2 instances in AWS. We manage RHEL 6/7, CentOS 6/7, OEL 6/7 in our home networks without problems. We have a playbook that gathers facts from servers and updates a loca…

---

## [Need info on creating V2P through Ansible.](https://forum.ansible.com/t/need-info-on-creating-v2p-through-ansible/33091)

<div class="topic-metadata">

**Author:** [@venkat\_ramu](https://forum.ansible.com/u/venkat_ramu)\
**Replies:** 2\
**Last updated:** [June 4, 2020, 7:34pm UTC](https://forum.ansible.com/t/need-info-on-creating-v2p-through-ansible/33091 "2020-06-04T19:34:56Z")

</div>

Please let me know is it possible to convert virtual machine (hyper-v) to physical using ansible? Thanks, Venkat

---

## [Sync module delete option not working](https://forum.ansible.com/t/sync-module-delete-option-not-working/33094)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 0\
**Last updated:** [June 4, 2020, 4:03pm UTC](https://forum.ansible.com/t/sync-module-delete-option-not-working/33094 "2020-06-04T16:03:18Z")

</div>

Hello All, I am trying to sync all files and directories between two directories however for some reason, delete option is not working. Following is my task, this works properly except when some directory is deleted fro…

---

## [Running Ruby 2.6 from /etc/profile.d via Ansible Playbook in RHEL 7](https://forum.ansible.com/t/running-ruby-2-6-from-etc-profile-d-via-ansible-playbook-in-rhel-7/33092)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 0\
**Last updated:** [June 4, 2020, 2:20pm UTC](https://forum.ansible.com/t/running-ruby-2-6-from-etc-profile-d-via-ansible-playbook-in-rhel-7/33092 "2020-06-04T14:20:47Z")

</div>

I have a role I’m testing that will install Redmine (www.redmine.org) on to a RHEL 7.8 machine. Redmine requires Ruby \>= 2.3. So I’m installing Ruby 2.6.2 via the rhel-server-rhscl-7-rpms repository. If I log into the ma…

---

## [Add new line “\\n” character to Ansible set\_fact variable](https://forum.ansible.com/t/add-new-line-n-character-to-ansible-set-fact-variable/33084)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 13\
**Last updated:** [June 4, 2020, 12:25pm UTC](https://forum.ansible.com/t/add-new-line-n-character-to-ansible-set-fact-variable/33084 "2020-06-04T12:25:54Z")

</div>

How can I add new line characters to Ansible variable mailbody. This mailbody variable is used for mail module's body attribute. I tried the below from suggestions but none of them works. 1. - set\_fact: mail…

---

## [Issue while parsing Complex Regular expression  in YAML file](https://forum.ansible.com/t/issue-while-parsing-complex-regular-expression-in-yaml-file/33088)

<div class="topic-metadata">

**Author:** [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Replies:** 2\
**Last updated:** [June 4, 2020, 7:46am UTC](https://forum.ansible.com/t/issue-while-parsing-complex-regular-expression-in-yaml-file/33088 "2020-06-04T07:46:02Z")

</div>

“\[1\]{9,430}$” Tried other options like a-zA-Z0-9-+.#$%&~\*/=?^\_ '"\\! ↩︎

---

## [Convert Ansible playbook to bash script](https://forum.ansible.com/t/convert-ansible-playbook-to-bash-script/33085)

<div class="topic-metadata">

**Author:** [@Sushant\_Sawant](https://forum.ansible.com/u/Sushant_Sawant)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 6:53pm UTC](https://forum.ansible.com/t/convert-ansible-playbook-to-bash-script/33085 "2020-06-03T18:53:13Z")

</div>

Hi guys, Little bit of background, I have a project which has ansible playbook vagrant installation. This runs on my local machine Ubuntu 18.04 There is no developer working on this, I have no experience on ansible. T…

---

## [Getting the version of an Ansible Galaxy role](https://forum.ansible.com/t/getting-the-version-of-an-ansible-galaxy-role/32971)

<div class="topic-metadata">

**Author:** [@Pablo\_Baeyens](https://forum.ansible.com/u/Pablo_Baeyens)\
**Replies:** 3\
**Last updated:** [June 3, 2020, 2:15pm UTC](https://forum.ansible.com/t/getting-the-version-of-an-ansible-galaxy-role/32971 "2020-06-03T14:15:17Z")

</div>

Hi, I want to know the version of a role (from Galaxy) from inside that role (versions correspond to git tags in the source repo). Is there any special variable I can get with the version of a role being executed? Any…

---

## [Choosing Cipher In openssl\_privatekey Module With Cryptography Back End](https://forum.ansible.com/t/choosing-cipher-in-openssl-privatekey-module-with-cryptography-back-end/33076)

<div class="topic-metadata">

**Author:** [@B.H](https://forum.ansible.com/u/B.H)\
**Replies:** 4\
**Last updated:** [June 2, 2020, 10:06pm UTC](https://forum.ansible.com/t/choosing-cipher-in-openssl-privatekey-module-with-cryptography-back-end/33076 "2020-06-02T22:06:45Z")

</div>

With the pyOpenSSL back end of the openssl\_privatekey module deprecated in Ansible 2.9, a colleague started looking at the cryptography back end. According to the documentation: openssl\_privatekey – Generate OpenSSL pri…

---

## [how to use ansible tags with conditional includes?](https://forum.ansible.com/t/how-to-use-ansible-tags-with-conditional-includes/33052)

<div class="topic-metadata">

**Author:** [@Tony\_Walsh](https://forum.ansible.com/u/Tony_Walsh)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 7:01pm UTC](https://forum.ansible.com/t/how-to-use-ansible-tags-with-conditional-includes/33052 "2020-06-02T19:01:39Z")

</div>

Hey folks, I have run into a problem that I have not been able to solve – I hope somebody out there has had better luck than I have. Here’s the setup: At the top level directory there is an executive shell script that …

---

## [Localhost unreachable on Windows Subsystem for Linux (WSL2, Ubuntu) (Git Issue #: 69765)](https://forum.ansible.com/t/localhost-unreachable-on-windows-subsystem-for-linux-wsl2-ubuntu-git-issue-69765/33069)

<div class="topic-metadata">

**Author:** [@Leo2](https://forum.ansible.com/u/Leo2)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 3:02pm UTC](https://forum.ansible.com/t/localhost-unreachable-on-windows-subsystem-for-linux-wsl2-ubuntu-git-issue-69765/33069 "2020-06-02T15:02:16Z")

</div>

Hi everyone, I opened an issue at Github project but unfortunately got closed unexpectedly. I still believe the there are some compatibility problems between Ansible and WSL, because the scenario I described in the issu…

---

## [An exception occurred during task execution.](https://forum.ansible.com/t/an-exception-occurred-during-task-execution/33066)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 10\
**Last updated:** [June 2, 2020, 2:54pm UTC](https://forum.ansible.com/t/an-exception-occurred-during-task-execution/33066 "2020-06-02T14:54:26Z")

</div>

I am trying to deploy new vmware vcsa appliance from iso usibg ansible below is playbook

---

## [How can i get ip addresses of group hostnames](https://forum.ansible.com/t/how-can-i-get-ip-addresses-of-group-hostnames/33073)

<div class="topic-metadata">

**Author:** [@Arko\_Kost](https://forum.ansible.com/u/Arko_Kost)\
**Replies:** 6\
**Last updated:** [June 2, 2020, 11:29am UTC](https://forum.ansible.com/t/how-can-i-get-ip-addresses-of-group-hostnames/33073 "2020-06-02T11:29:31Z")

</div>

I can’t find anywhere, how can i get ip addresses of hosts in specific group - hosts: opmon tasks: - lineinfile: create: true line: "host\\t'op-monitor'\\topmonitor\\t{{ item}}/24\\t\\tmd5" dest: /…

---

## ["kerberos: HTTPSConnectionPool(host='win-xx.ca.local', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, u'\[SSL: CERTIFICATE\_VERIFY\_FAILED\] certificate verify failed (\_ssl.c:618)'),))"](https://forum.ansible.com/t/kerberos-httpsconnectionpool-host-win-xx-ca-local-port-5986-max-retries-exceeded-with-url-wsman-caused-by-sslerror-sslerror-1-u-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c-618/33072)

<div class="topic-metadata">

**Author:** [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 8:18am UTC](https://forum.ansible.com/t/kerberos-httpsconnectionpool-host-win-xx-ca-local-port-5986-max-retries-exceeded-with-url-wsman-caused-by-sslerror-sslerror-1-u-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c-618/33072 "2020-06-02T08:18:33Z")

</div>

Hello I am getting error below “msg”: “kerberos: HTTPSConnectionPool(host=‘win-xx.ca.local’, port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, u’\[SSL: CERTIFICATE\_VERIFY\_FAILED\] certific…

---

## [PHPIPAM](https://forum.ansible.com/t/phpipam/33061)

<div class="topic-metadata">

**Author:** [@Naresh\_Kasula](https://forum.ansible.com/u/Naresh_Kasula)\
**Replies:** 3\
**Last updated:** [June 2, 2020, 7:50am UTC](https://forum.ansible.com/t/phpipam/33061 "2020-06-02T07:50:15Z")

</div>

Hi Team, I have installed PHPIPAM on linux centos server now want retrieve the subnet/ipaddress details using Ansible scripts. Can someone please guide to get the details. PHPIPAM is basically IPAddress management too…

---

## [mso\_schema\_site\_anp\_epg\_domain module issue?](https://forum.ansible.com/t/mso-schema-site-anp-epg-domain-module-issue/33063)

<div class="topic-metadata">

**Author:** [@Albert\_Short](https://forum.ansible.com/u/Albert_Short)\
**Replies:** 4\
**Last updated:** [June 2, 2020, 5:55am UTC](https://forum.ansible.com/t/mso-schema-site-anp-epg-domain-module-issue/33063 "2020-06-02T05:55:00Z")

</div>

Hello all, I have tried using the mso\_schema\_site\_anp\_epg\_domain module today with the code syntax below but keep getting the following error message. Any ideas on what the issues? Or has someone else seen this before? …

---

## [src module not working as mentioned/expected.](https://forum.ansible.com/t/src-module-not-working-as-mentioned-expected/33068)

<div class="topic-metadata">

**Author:** [@SUNU](https://forum.ansible.com/u/SUNU)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 5:02am UTC](https://forum.ansible.com/t/src-module-not-working-as-mentioned-expected/33068 "2020-06-02T05:02:47Z")

</div>

As per the definition src module will deploy the local file, but it doesn’t do the same and getting file not available/file reallt exist ? exception. Instead lookup and templates have to be used. Please remove src from t…

---

## [Molecule Testing for multiple roles](https://forum.ansible.com/t/molecule-testing-for-multiple-roles/33071)

<div class="topic-metadata">

**Author:** [@JDM](https://forum.ansible.com/u/JDM)\
**Replies:** 0\
**Last updated:** [June 2, 2020, 4:45am UTC](https://forum.ansible.com/t/molecule-testing-for-multiple-roles/33071 "2020-06-02T04:45:42Z")

</div>

Hi Guys, Has anyone tried testing multiple ansible roles together. Best Regards, Jagdish

---

## [ec2 instance launch failing with error subnet id does not exit](https://forum.ansible.com/t/ec2-instance-launch-failing-with-error-subnet-id-does-not-exit/33070)

<div class="topic-metadata">

**Author:** [@Sanjay\_Chakraborty](https://forum.ansible.com/u/Sanjay_Chakraborty)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 4:23am UTC](https://forum.ansible.com/t/ec2-instance-launch-failing-with-error-subnet-id-does-not-exit/33070 "2020-06-02T04:23:42Z")

</div>

Hi there, Can anyone please let me know what should be the correct syntax for defining vpc subnet id ? This is my playbook:

---

## [Setting Variable across multiple hosts blocks](https://forum.ansible.com/t/setting-variable-across-multiple-hosts-blocks/33058)

<div class="topic-metadata">

**Author:** [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Replies:** 6\
**Last updated:** [June 1, 2020, 10:51pm UTC](https://forum.ansible.com/t/setting-variable-across-multiple-hosts-blocks/33058 "2020-06-01T22:51:50Z")

</div>

Hello All, I am having an issue when I set a fact, I am not able to see that fact after I have another host block in my playbook. I get the error variable is undefined. The issue occurs in my - name: Launch instance

---

## [Which module can I use to run command on command prompt on all my hosts ?](https://forum.ansible.com/t/which-module-can-i-use-to-run-command-on-command-prompt-on-all-my-hosts/33067)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 3\
**Last updated:** [June 1, 2020, 7:07pm UTC](https://forum.ansible.com/t/which-module-can-i-use-to-run-command-on-command-prompt-on-all-my-hosts/33067 "2020-06-01T19:07:09Z")

</div>

Hi, Which module can I use as a task to run a command on the command prompt on all my hosts? example - cmd: gpupdate/force Thanks,

---

## [Where is the source of the alternatives module](https://forum.ansible.com/t/where-is-the-source-of-the-alternatives-module/33035)

<div class="topic-metadata">

**Author:** [@Gunther\_Grill](https://forum.ansible.com/u/Gunther_Grill)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 5:46pm UTC](https://forum.ansible.com/t/where-is-the-source-of-the-alternatives-module/33035 "2020-06-01T17:46:41Z")

</div>

Hi, a coupe of month ago, the source code of the alternatives module was in the ansibel-modules-extra (or something similar) repo. Then it as moved to the core ansible repo. But now, I can’t find it anymore. Was it mov…

---

## [partial dictionary merge available?](https://forum.ansible.com/t/partial-dictionary-merge-available/33065)

<div class="topic-metadata">

**Author:** [@Toni\_Mueller](https://forum.ansible.com/u/Toni_Mueller)\
**Replies:** 2\
**Last updated:** [June 1, 2020, 5:07pm UTC](https://forum.ansible.com/t/partial-dictionary-merge-available/33065 "2020-06-01T17:07:27Z")

</div>

Hi, I've just read that there is a way to merge dictionaries, to accumulate values across the variable hierarchy, but it is supposed to be a very bad idea. Would it be difficult to allow this merge feature on just a …

---

## [How to efficiently 'delegate\_to'?](https://forum.ansible.com/t/how-to-efficiently-delegate-to/33064)

<div class="topic-metadata">

**Author:** [@Toni\_Mueller](https://forum.ansible.com/u/Toni_Mueller)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 3:59pm UTC](https://forum.ansible.com/t/how-to-efficiently-delegate-to/33064 "2020-06-01T15:59:22Z")

</div>

Hi, in a project to provision stuff, I would like to set a lot of variables on a host, which I want to use in a playbook, but take the values for that variable from the host I am delegating to. Ie, in my inventory, I …

---

## [Making an unsafe variable safe](https://forum.ansible.com/t/making-an-unsafe-variable-safe/33059)

<div class="topic-metadata">

**Author:** [@Vadim\_Eisenberg](https://forum.ansible.com/u/Vadim_Eisenberg)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 3:51pm UTC](https://forum.ansible.com/t/making-an-unsafe-variable-safe/33059 "2020-06-01T15:51:10Z")

</div>

Hello, I have the following use case: I want to read a string from some source into a variable, marking it unsafe. Then I want to perform my own sanitation checks and then make the variable safe so I could use Jinja2 te…

---

## [How to copy directory recursively using pattern to remote machine?](https://forum.ansible.com/t/how-to-copy-directory-recursively-using-pattern-to-remote-machine/33062)

<div class="topic-metadata">

**Author:** [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Replies:** 3\
**Last updated:** [June 1, 2020, 3:38pm UTC](https://forum.ansible.com/t/how-to-copy-directory-recursively-using-pattern-to-remote-machine/33062 "2020-06-01T15:38:58Z")

</div>

Hello All, I have got the following playbooks where i am trying to copy directories and all its contents recursively which is present in project repo. For identifying the correct directory, i am using a variable which h…

---

## [How to manage different SSH keys in local Vs AWX deployment](https://forum.ansible.com/t/how-to-manage-different-ssh-keys-in-local-vs-awx-deployment/33060)

<div class="topic-metadata">

**Author:** [@Anurag\_Bhatia](https://forum.ansible.com/u/Anurag_Bhatia)\
**Replies:** 0\
**Last updated:** [May 31, 2020, 7:24pm UTC](https://forum.ansible.com/t/how-to-manage-different-ssh-keys-in-local-vs-awx-deployment/33060 "2020-05-31T19:24:06Z")

</div>

Hello, I was wondering how can one manage inventory seamlessly when SSH keys are referred in those? So say I have an inventory file and it says: \[location1\] vm1 vm2 vm3 \[location1:vars\] ansible\_ssh\_private\_key\_fi…

---

## [loop query](https://forum.ansible.com/t/loop-query/33057)

<div class="topic-metadata">

**Author:** [@kanna3k6](https://forum.ansible.com/u/kanna3k6)\
**Replies:** 3\
**Last updated:** [May 30, 2020, 8:01pm UTC](https://forum.ansible.com/t/loop-query/33057 "2020-05-30T20:01:55Z")

</div>

Hi Team, Recently i came to know that with.list is getting retired , so what it is the replacement of it. For eg using the filesystem module i need to format the list of disc please let me know which format is correct …

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

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