# Ansible Project

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

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

**Page:** 89

---

## [Need help of Ansible lineinfile module with a variable based on hostname](https://forum.ansible.com/t/need-help-of-ansible-lineinfile-module-with-a-variable-based-on-hostname/34580)

<div class="topic-metadata">

**Author:** [@FRANK\_L](https://forum.ansible.com/u/FRANK_L)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 3:04am UTC](https://forum.ansible.com/t/need-help-of-ansible-lineinfile-module-with-a-variable-based-on-hostname/34580 "2021-02-07T03:04:17Z")

</div>

Hi, I need help of Ansible lineinfile module with a variable based on hostname. Here is what I have for the task: On server vccs7ap01: name: ulimits - find sidadm on the server shell: hostname | sed ‘s/vc//’ | sed …

---

## [BUG: "unable to convert str to int" but 'str' is int ?](https://forum.ansible.com/t/bug-unable-to-convert-str-to-int-but-str-is-int/34576)

<div class="topic-metadata">

**Author:** [@Axel\_Rau](https://forum.ansible.com/u/Axel_Rau)\
**Replies:** 4\
**Last updated:** [February 6, 2021, 5:10pm UTC](https://forum.ansible.com/t/bug-unable-to-convert-str-to-int-but-str-is-int/34576 "2021-02-06T17:10:54Z")

</div>

Hi all, this role: - - - - name: Show calling args debug: var: ca - name: Update DNS master server community.general.nsupdate: key\_name: "{{ key\_name }}" key\_algorithm: "{{ algorithm }}" key…

---

## [proxmox\_kvm module](https://forum.ansible.com/t/proxmox-kvm-module/34577)

<div class="topic-metadata">

**Author:** [@Todor\_Petkov](https://forum.ansible.com/u/Todor_Petkov)\
**Replies:** 0\
**Last updated:** [February 5, 2021, 4:32pm UTC](https://forum.ansible.com/t/proxmox-kvm-module/34577 "2021-02-05T16:32:55Z")

</div>

Hello, Few months ago, I combined various sources (I can't remember exact URLs, but if someone recognizes their job, I will update README file to include them) to create https://gitlab.com/todorpetkov/ansible-proxmox. S…

---

## [How do I install .NET Framework 4 SDK?](https://forum.ansible.com/t/how-do-i-install-net-framework-4-sdk/34549)

<div class="topic-metadata">

**Author:** [@Amedee\_Van\_Gasse](https://forum.ansible.com/u/Amedee_Van_Gasse)\
**Replies:** 3\
**Last updated:** [February 5, 2021, 1:38pm UTC](https://forum.ansible.com/t/how-do-i-install-net-framework-4-sdk/34549 "2021-02-05T13:38:20Z")

</div>

Windows Server 2019, configured with Ansible. I have tried with name: Install multiple packages win\_chocolatey: name: nuget.commandline nunit-console-runner visualstudio2017buildtools dotnet dotnetfx …

---

## [exec\_wrapper hangs](https://forum.ansible.com/t/exec-wrapper-hangs/34566)

<div class="topic-metadata">

**Author:** [@Daniel\_Blixt](https://forum.ansible.com/u/Daniel_Blixt)\
**Replies:** 3\
**Last updated:** [February 4, 2021, 10:40pm UTC](https://forum.ansible.com/t/exec-wrapper-hangs/34566 "2021-02-04T22:40:58Z")

</div>

When running win\_shell module in our playbooks with async or become, we are sometimes left with ansible exec\_wrapper and a child conhost process that won’t return and keeps eating resources on the node. Since we are usin…

---

## [Escaping special characters in regex\_replace with '\\' fails with: unknown escape character](https://forum.ansible.com/t/escaping-special-characters-in-regex-replace-with-fails-with-unknown-escape-character/34563)

<div class="topic-metadata">

**Author:** [@actionmystique](https://forum.ansible.com/u/actionmystique)\
**Replies:** 5\
**Last updated:** [February 4, 2021, 3:03pm UTC](https://forum.ansible.com/t/escaping-special-characters-in-regex-replace-with-fails-with-unknown-escape-character/34563 "2021-02-04T15:03:09Z")

</div>

ansible: 2.10.5 (with pip3 install) python version = 3.9.1+ (default, Jan 20 2021, 14:49:22) \[GCC 10.2.1 20210110\] Escaping special characters in the searched string such as the following should be simply done with '': …

---

## [ssh error from ad-hoc command](https://forum.ansible.com/t/ssh-error-from-ad-hoc-command/34562)

<div class="topic-metadata">

**Author:** [@Ken\_Cheng](https://forum.ansible.com/u/Ken_Cheng)\
**Replies:** 9\
**Last updated:** [February 4, 2021, 1:09pm UTC](https://forum.ansible.com/t/ssh-error-from-ad-hoc-command/34562 "2021-02-04T13:09:33Z")

</div>

hi, i’m sorry if this was already covered but why does ansible’s ping module giving me an ssh error? i installed ansible version 2.9.17 on a centos vm. that vm can ping & ssh to my test destination router from the comm…

---

## [Problem with json\_query to search number](https://forum.ansible.com/t/problem-with-json-query-to-search-number/34565)

<div class="topic-metadata">

**Author:** [@Danny\_van\_der\_Aa](https://forum.ansible.com/u/Danny_van_der_Aa)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 8:54am UTC](https://forum.ansible.com/t/problem-with-json-query-to-search-number/34565 "2021-02-04T08:54:46Z")

</div>

Hi all, I am trying to search for a number with a json\_query but result is always “”. Part of JSON is: “json”: { “code”: 200, “success”: true, “data”: \[ { “vlanId”: “430”, “domainId”: “3”, “name”: “Default”, “…

---

## [Ansible authentication with windows by using GoDaddy or third party certificates](https://forum.ansible.com/t/ansible-authentication-with-windows-by-using-godaddy-or-third-party-certificates/34530)

<div class="topic-metadata">

**Author:** [@karthik\_kumar1](https://forum.ansible.com/u/karthik_kumar1)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 4:20pm UTC](https://forum.ansible.com/t/ansible-authentication-with-windows-by-using-godaddy-or-third-party-certificates/34530 "2021-02-03T16:20:33Z")

</div>

Hi, Need help on setting up authentication between ansible and windows by using GoDaddy certificates or any third party instead of Openssl or SelfSigned certificate. I have tried many ways but its not working. i was ab…

---

## [How to set or declare a volume group as fact](https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559)

<div class="topic-metadata">

**Author:** [@Aris\_Aguirre](https://forum.ansible.com/u/Aris_Aguirre)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 6:47am UTC](https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559 "2021-02-03T06:47:56Z")

</div>

I cant see my volume group vgtemp if I will run a ansible -m setup. How to declare or how to make it available/define if i will run ansible -m setup? Thanks

---

## [Block is working as expected but](https://forum.ansible.com/t/block-is-working-as-expected-but/34557)

<div class="topic-metadata">

**Author:** [@Aris\_Aguirre](https://forum.ansible.com/u/Aris_Aguirre)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 6:29am UTC](https://forum.ansible.com/t/block-is-working-as-expected-but/34557 "2021-02-03T06:29:11Z")

</div>

Instead of throwing FATAL errors out there, can we do something like? It will say “Volume group vgaris does not exist” if the VG doesnt exist, and if it is like creating the 3g instead of 7G, it will say, “insufficient …

---

## [Ansible-3.0.0 beta1 released](https://forum.ansible.com/t/ansible-3-0-0-beta1-released/34558)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [February 2, 2021, 11:23pm UTC](https://forum.ansible.com/t/ansible-3-0-0-beta1-released/34558 "2021-02-02T23:23:05Z")

</div>

Hi all, We're happy to announce that the ansible-3.0.0 beta1 package is now available! This update is based on the ansible-base-2.10.x package just like ansible-2.10 was so the changes shouldn't be too major. However…

---

## [Powershell Function via Ansible | Get-AnsibleParam: Missing required argument: \_raw\_params](https://forum.ansible.com/t/powershell-function-via-ansible-get-ansibleparam-missing-required-argument-raw-params/34523)

<div class="topic-metadata">

**Author:** [@kzersatz](https://forum.ansible.com/u/kzersatz)\
**Replies:** 8\
**Last updated:** [February 2, 2021, 8:53pm UTC](https://forum.ansible.com/t/powershell-function-via-ansible-get-ansibleparam-missing-required-argument-raw-params/34523 "2021-02-02T20:53:50Z")

</div>

Executing a rather large playbook revolving around multiple plays to create shares and DFS links, etc. I’ve got a play to do the following.

---

## [Equivalent of this inventory\_hostname in groups\['dev'\] or inventory\_hostname in groups\['lb'\]](https://forum.ansible.com/t/equivalent-of-this-inventory-hostname-in-groups-dev-or-inventory-hostname-in-groups-lb/34556)

<div class="topic-metadata">

**Author:** [@ursa\_Brown](https://forum.ansible.com/u/ursa_Brown)\
**Replies:** 1\
**Last updated:** [February 2, 2021, 8:51pm UTC](https://forum.ansible.com/t/equivalent-of-this-inventory-hostname-in-groups-dev-or-inventory-hostname-in-groups-lb/34556 "2021-02-02T20:51:19Z")

</div>

Is there a shortcut way for this? inventory\_hostname in groups\[‘dev’\] or inventory\_hostname in groups\[‘lb’\] I have a long playbook, im trying to cut some text.

---

## [\[WARNING\]: - linux-system-roles.network was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': \<urlopen error \[Errno 101\] Network is unreachable\>](https://forum.ansible.com/t/warning-linux-system-roles-network-was-not-installed-successfully-unknown-error-when-attempting-to-call-galaxy-at-https-galaxy-ansible-com-api-urlopen-error-errno-101-network-is-unreachable/34552)

<div class="topic-metadata">

**Author:** [@ursa\_Brown](https://forum.ansible.com/u/ursa_Brown)\
**Replies:** 13\
**Last updated:** [February 2, 2021, 5:21pm UTC](https://forum.ansible.com/t/warning-linux-system-roles-network-was-not-installed-successfully-unknown-error-when-attempting-to-call-galaxy-at-https-galaxy-ansible-com-api-urlopen-error-errno-101-network-is-unreachable/34552 "2021-02-02T17:21:32Z")

</div>

How can I make ansible-galaxy work if it is not connected to internet? Thank you ansible-galaxy role install linux-system-roles.network \[WARNING\]: - linux-system-roles. network was NOT installed successfully: Unknown …

---

## [List folder/files on windows](https://forum.ansible.com/t/list-folder-files-on-windows/34554)

<div class="topic-metadata">

**Author:** [@Deepak\_Gowda](https://forum.ansible.com/u/Deepak_Gowda)\
**Replies:** 1\
**Last updated:** [February 2, 2021, 11:42am UTC](https://forum.ansible.com/t/list-folder-files-on-windows/34554 "2021-02-02T11:42:36Z")

</div>

HI All, I have a list of files in C:\\Users\\xxxuser\\Downloads\\ ,I am trying to find out if i can pull the list of files/folders present in windows on the ansible node. i have the below playbook which doesnt give any err…

---

## [SQL Server 2019 Installation Failing](https://forum.ansible.com/t/sql-server-2019-installation-failing/34547)

<div class="topic-metadata">

**Author:** [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Replies:** 4\
**Last updated:** [February 1, 2021, 10:32pm UTC](https://forum.ansible.com/t/sql-server-2019-installation-failing/34547 "2021-02-01T22:32:59Z")

</div>

Dear All, I am getting below error while installing SQL server 2019. Also below is the playbook that I am using. So can someone please help.

---

## [Creating symbolic links in Windows with mklink always returns changed](https://forum.ansible.com/t/creating-symbolic-links-in-windows-with-mklink-always-returns-changed/34548)

<div class="topic-metadata">

**Author:** [@Amedee\_Van\_Gasse](https://forum.ansible.com/u/Amedee_Van_Gasse)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 10:26pm UTC](https://forum.ansible.com/t/creating-symbolic-links-in-windows-with-mklink-always-returns-changed/34548 "2021-02-01T22:26:35Z")

</div>

I’m using this to create a symbolic link to a directory, on Windows: name: Find OpenJDK directory ansible.windows.win\_find: paths: C:\\Program Files\\OpenJDK patterns: openjdk\* file\_type: directory recurse: no reg…

---

## [Pass dynamic inventory as json not as file](https://forum.ansible.com/t/pass-dynamic-inventory-as-json-not-as-file/34510)

<div class="topic-metadata">

**Author:** [@Filip\_Rucinski](https://forum.ansible.com/u/Filip_Rucinski)\
**Replies:** 4\
**Last updated:** [February 1, 2021, 6:08pm UTC](https://forum.ansible.com/t/pass-dynamic-inventory-as-json-not-as-file/34510 "2021-02-01T18:08:34Z")

</div>

Hello First question: Is there any possibility to pass dynamic inventory as a pure json structure? I have got a small app that is written in python and flask, that listen for some data (finally it is in json format) f…

---

## [Save debug results to a local file ( not copying all )](https://forum.ansible.com/t/save-debug-results-to-a-local-file-not-copying-all/34539)

<div class="topic-metadata">

**Author:** [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 2:37pm UTC](https://forum.ansible.com/t/save-debug-results-to-a-local-file-not-copying-all/34539 "2021-02-01T14:37:37Z")

</div>

I have a task that will save outputs to a local file, when I check the text file the contents are missing . ex: I have 13 inventory host and should run each task and save the output to local file. so ideally should have…

---

## [AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible\_all\_ipv4\_addresses'"](https://forum.ansible.com/t/ansibleundefinedvariable-ansible-vars-hostvars-hostvarsvars-object-has-no-attribute-ansible-all-ipv4-addresses/34541)

<div class="topic-metadata">

**Author:** [@Aris\_Aguirre](https://forum.ansible.com/u/Aris_Aguirre)\
**Replies:** 7\
**Last updated:** [February 1, 2021, 1:42pm UTC](https://forum.ansible.com/t/ansibleundefinedvariable-ansible-vars-hostvars-hostvarsvars-object-has-no-attribute-ansible-all-ipv4-addresses/34541 "2021-02-01T13:42:10Z")

</div>

Below is working when I was still using ansible 2.3 or maybe 2.7 But no longer ansible 2.8 or 2.9. Please be advise no matter what it is not working. Thanks {% for host in groups.all %} {{ hostvars\[host\]\[‘ansible\_all\_…

---

## [Validate case insensitive values](https://forum.ansible.com/t/validate-case-insensitive-values/34493)

<div class="topic-metadata">

**Author:** [@Amjad\_Saleem1](https://forum.ansible.com/u/Amjad_Saleem1)\
**Replies:** 9\
**Last updated:** [January 31, 2021, 10:34pm UTC](https://forum.ansible.com/t/validate-case-insensitive-values/34493 "2021-01-31T22:34:18Z")

</div>

Trying to validate that a specific variable must have one of pre-determined values, mimicking dropdown in survey in ansible tower/awx. I have the following code but it only matches for upper case: vars: environments: …

---

## [No package matching 'python-pip' is available ubuntu 20.04 LTS](https://forum.ansible.com/t/no-package-matching-python-pip-is-available-ubuntu-20-04-lts/34546)

<div class="topic-metadata">

**Author:** [@Syed\_Ejaz\_Ahmed\_Hash](https://forum.ansible.com/u/Syed_Ejaz_Ahmed_Hash)\
**Replies:** 4\
**Last updated:** [January 31, 2021, 4:48pm UTC](https://forum.ansible.com/t/no-package-matching-python-pip-is-available-ubuntu-20-04-lts/34546 "2021-01-31T16:48:18Z")

</div>

We have full functional ansible on Ubuntu 18.04 LTS and all our playbooks are running successfully without any issue on ubuntu 18.04 LTS. We are trying to run the playbook on ubuntu 20.04 LTS and run the playbook which …

---

## [Mac Big Sur Ansible Installation Issue](https://forum.ansible.com/t/mac-big-sur-ansible-installation-issue/34532)

<div class="topic-metadata">

**Author:** [@Jorge\_Alonso\_Ayala\_B](https://forum.ansible.com/u/Jorge_Alonso_Ayala_B)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 4:20pm UTC](https://forum.ansible.com/t/mac-big-sur-ansible-installation-issue/34532 "2021-01-31T16:20:53Z")

</div>

Hi Do you know how can I solve this (last command): Jorayala@JORAYALA-M-JFTV ~ % python3 get-pip.py --user Collecting pip Downloading pip-21.0-py3-none-any.whl (1.5 MB) ████████████████████████████████| 1.5 MB 499 …

---

## [win\_audit\_policy\_system module not changing the value](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535)

<div class="topic-metadata">

**Author:** [@srini\_mas](https://forum.ansible.com/u/srini_mas)\
**Replies:** 4\
**Last updated:** [January 31, 2021, 9:22am UTC](https://forum.ansible.com/t/win-audit-policy-system-module-not-changing-the-value/34535 "2021-01-31T09:22:23Z")

</div>

Hi, Trying to use ansible on windows server 2016. winRM connection works and other modules run perfectly fine. simple playbook and run win\_audit\_policy\_system to change the values. - name: “Ensure ‘Audit Application G…

---

## [Use a specific variable within a playbook base on the tag defined](https://forum.ansible.com/t/use-a-specific-variable-within-a-playbook-base-on-the-tag-defined/34545)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [January 30, 2021, 3:06am UTC](https://forum.ansible.com/t/use-a-specific-variable-within-a-playbook-base-on-the-tag-defined/34545 "2021-01-30T03:06:53Z")

</div>

Hi All, Hope anyone could help me! Basically i have a playbook that configures sudoers commands for a particular user. In this playbook is a command that has to use a {{ variable }}. This variable differs dependent on…

---

## [Ansible configuration to run an Ansible Galaxy playbook](https://forum.ansible.com/t/ansible-configuration-to-run-an-ansible-galaxy-playbook/34543)

<div class="topic-metadata">

**Author:** [@Jeremy\_Tourville](https://forum.ansible.com/u/Jeremy_Tourville)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 10:08pm UTC](https://forum.ansible.com/t/ansible-configuration-to-run-an-ansible-galaxy-playbook/34543 "2021-01-29T22:08:28Z")

</div>

Hello, I have been learning to use Ansible through Red Hat training for approximately the last 6 months or so. I have learned how to build some of my own basic play books and roles. For the first time i have decided to…

---

## [Unable to provision a Windows Server 2019 vagrant box with Ansible over ssh](https://forum.ansible.com/t/unable-to-provision-a-windows-server-2019-vagrant-box-with-ansible-over-ssh/34537)

<div class="topic-metadata">

**Author:** [@Amedee\_Van\_Gasse](https://forum.ansible.com/u/Amedee_Van_Gasse)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 6:52pm UTC](https://forum.ansible.com/t/unable-to-provision-a-windows-server-2019-vagrant-box-with-ansible-over-ssh/34537 "2021-01-29T18:52:45Z")

</div>

I have created a Windows server 2019 Vagrant box using https://github.com/rgl/windows-vagrant. I did not make any changes. Steps to reproduce: git clone git@github.com:rgl/windows-vagrant.git cd windows-vagrant make …

---

## [sftp blocked fro my labtop when executing playbook](https://forum.ansible.com/t/sftp-blocked-fro-my-labtop-when-executing-playbook/34542)

<div class="topic-metadata">

**Author:** [@yvesdeb](https://forum.ansible.com/u/yvesdeb)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 5:57pm UTC](https://forum.ansible.com/t/sftp-blocked-fro-my-labtop-when-executing-playbook/34542 "2021-01-29T17:57:58Z")

</div>

Hi, my playbook randomly hangs on the sftp command. I work from my remote workstation through a VPN. my playbook blocks randomly on the sftp command whatever the client at the end and this randomly. It creates the file…

---

## [please help me with this](https://forum.ansible.com/t/please-help-me-with-this/34540)

<div class="topic-metadata">

**Author:** [@Jayaprakash\_Valluri](https://forum.ansible.com/u/Jayaprakash_Valluri)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 5:03pm UTC](https://forum.ansible.com/t/please-help-me-with-this/34540 "2021-01-29T17:03:53Z")

</div>

1.Create a file in /tmp/playbook/target\_info.html and the file should have the below mentioned info 2.Should have the hostname of the target server 3.Should have the IP address 4.Should have the MAC address 5.Should …

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

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