# Latest

**URL:** https://forum.ansible.com/latest.md?page=396

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

**Page:** 397

---

## [Is there Module to output the playbook in specific directory for windows and linux hosts ?](https://forum.ansible.com/t/is-there-module-to-output-the-playbook-in-specific-directory-for-windows-and-linux-hosts/32355)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 0\
**Last updated:** [February 28, 2020, 6:01pm UTC](https://forum.ansible.com/t/is-there-module-to-output-the-playbook-in-specific-directory-for-windows-and-linux-hosts/32355 "2020-02-28T18:01:21Z")

</div>

hello, Is there a Module to output the playbook in a specific directory for windows and Linux hosts? say - I want to output the result of the playbook in /etc/ansible/win-logs for windows and /etc/ansible/Linux-logs th…

---

## [ERROR! the field 'hosts' is required but was not set](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/32311)

<div class="topic-metadata">

**Author:** [@Daley\_Okuwa1](https://forum.ansible.com/u/Daley_Okuwa1)\
**Replies:** 4\
**Last updated:** [February 28, 2020, 1:01pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/32311 "2020-02-28T13:01:42Z")

</div>

I have written a simple script to patch my red hat server and it is comming out with this error message when i run : ansible-playbook linuxpatch.yml ERROR! the field ‘hosts’ is required but was not set in /etc/ansible/…

---

## [Variable leaking between hosts when concurrency \> 1](https://forum.ansible.com/t/variable-leaking-between-hosts-when-concurrency-1/32350)

<div class="topic-metadata">

**Author:** [@Ben\_Spencer](https://forum.ansible.com/u/Ben_Spencer)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 12:41pm UTC](https://forum.ansible.com/t/variable-leaking-between-hosts-when-concurrency-1/32350 "2020-02-28T12:41:57Z")

</div>

This is probably going to be long as I haven’t figured out a way to explain and show the issue in a summarized fashion. From the testing I’ve performed so far, it looks like there may be an issue/limit with nesting inclu…

---

## [Network credential - How is the Provider dict injection done?](https://forum.ansible.com/t/network-credential-how-is-the-provider-dict-injection-done/32351)

<div class="topic-metadata">

**Author:** [@Don\_Patzone](https://forum.ansible.com/u/Don_Patzone)\
**Replies:** 0\
**Last updated:** [February 28, 2020, 12:39pm UTC](https://forum.ansible.com/t/network-credential-how-is-the-provider-dict-injection-done/32351 "2020-02-28T12:39:52Z")

</div>

Hi all, I am currently building job templates for network automation. The module I am using is the aireos\_command module. This module requires the use of a provider dict since it does not support network\_cli via Ansibl…

---

## [Documenting variable suboption types in a module](https://forum.ansible.com/t/documenting-variable-suboption-types-in-a-module/32346)

<div class="topic-metadata">

**Author:** [@John\_Nelson1](https://forum.ansible.com/u/John_Nelson1)\
**Replies:** 1\
**Last updated:** [February 27, 2020, 11:37pm UTC](https://forum.ansible.com/t/documenting-variable-suboption-types-in-a-module/32346 "2020-02-27T23:37:08Z")

</div>

While working on a PR for the win\_dns\_record module, I ran into a documentation issue that I thought best to ask about, in case anyone can offer any suggestions or otherwise correct my thinking. As background, I’m trying…

---

## [API Authorization questions](https://forum.ansible.com/t/api-authorization-questions/32347)

<div class="topic-metadata">

**Author:** [@Sami\_M\_Barek](https://forum.ansible.com/u/Sami_M_Barek)\
**Replies:** 2\
**Last updated:** [February 27, 2020, 9:59pm UTC](https://forum.ansible.com/t/api-authorization-questions/32347 "2020-02-27T21:59:42Z")

</div>

Hi, I’m struggling to understand how the authorization works in the API from the documentation. It seems I have a couple of different options where as I feel like I have tried them all (client\_id and client\_secret have…

---

## [Links on stale documentation pages](https://forum.ansible.com/t/links-on-stale-documentation-pages/32345)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 6:10pm UTC](https://forum.ansible.com/t/links-on-stale-documentation-pages/32345 "2020-02-27T18:10:49Z")

</div>

Hi Often the googles cause me to land on outdated documentation pages, for instance: https://docs.ansible.com/ansible/2.4/playbooks\_loops.html That displays a nice banner to indicate it's stale, but the href at the …

---

## [adding escape characters in replace module](https://forum.ansible.com/t/adding-escape-characters-in-replace-module/32344)

<div class="topic-metadata">

**Author:** [@Anil](https://forum.ansible.com/u/Anil)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 3:52pm UTC](https://forum.ansible.com/t/adding-escape-characters-in-replace-module/32344 "2020-02-27T15:52:42Z")

</div>

Hi All, I have file below, would like to comment out the line with hmac-sha1 and uncomment like with #Commened for LINUXMSB 2013’ $ cat sshd\_config MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac…

---

## [Passwprd never expierd](https://forum.ansible.com/t/passwprd-never-expierd/32339)

<div class="topic-metadata">

**Author:** [@Rishiv\_Chauhan](https://forum.ansible.com/u/Rishiv_Chauhan)\
**Replies:** 1\
**Last updated:** [February 27, 2020, 11:34am UTC](https://forum.ansible.com/t/passwprd-never-expierd/32339 "2020-02-27T11:34:02Z")

</div>

Please help, I wanted to create a yml script for the password never expire for a particuler user. lets say, need a yml script that run through ansible server and set the password never expire for a particular user.

---

## [Running perl script on remote host as applcation user](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32341)

<div class="topic-metadata">

**Author:** [@DiViNe](https://forum.ansible.com/u/DiViNe)\
**Replies:** 2\
**Last updated:** [February 27, 2020, 9:44am UTC](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32341 "2020-02-27T09:44:49Z")

</div>

Thank you guys @Kai Stian Olstad \> It’s probably because your script /sgi/atx/src/atxBoxHWM.pl need some \> environment variables set. Yes, I guess you’re right on this one. But I thought using “shell:” within the ans…

---

## [set object property using set\_fact](https://forum.ansible.com/t/set-object-property-using-set-fact/32340)

<div class="topic-metadata">

**Author:** [@Shyam\_Sunder1](https://forum.ansible.com/u/Shyam_Sunder1)\
**Replies:** 1\
**Last updated:** [February 27, 2020, 9:00am UTC](https://forum.ansible.com/t/set-object-property-using-set-fact/32340 "2020-02-27T09:00:25Z")

</div>

Hi, I am new to Ansible an trying to achieve this below. Is this possible to set a dictionary property using key in Ansible. vars: mydict: keyA: path: ‘path of device A’ error\_files: \[\] keyB: path: ‘path of device B’ e…

---

## [using hosts mentioned in inventory files in my tasks](https://forum.ansible.com/t/using-hosts-mentioned-in-inventory-files-in-my-tasks/32332)

<div class="topic-metadata">

**Author:** [@Vishal\_Bobade](https://forum.ansible.com/u/Vishal_Bobade)\
**Replies:** 1\
**Last updated:** [February 27, 2020, 7:21am UTC](https://forum.ansible.com/t/using-hosts-mentioned-in-inventory-files-in-my-tasks/32332 "2020-02-27T07:21:49Z")

</div>

Hello , I have a inventory file with some 5-6 hosts and I want use them in some of my tasks/main.yml file. Could some one please suggest how can I do that . Lets say below is my inventory file \[gameday\] grafana.domai…

---

## [license issues for ansible contribution.](https://forum.ansible.com/t/license-issues-for-ansible-contribution/32338)

<div class="topic-metadata">

**Author:** [@Nalin\_Garg](https://forum.ansible.com/u/Nalin_Garg)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 11:57pm UTC](https://forum.ansible.com/t/license-issues-for-ansible-contribution/32338 "2020-02-26T23:57:42Z")

</div>

I have a PR towards upstream ansible that is failing because of lib/ansible/modules/web\_infrastructure/jenkins\_node.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module I hav…

---

## [Running perl script on remote host as applcation user](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32337)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 9:28pm UTC](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32337 "2020-02-26T21:28:32Z")

</div>

It's probably because your script /sgi/atx/src/atxBoxHWM.pl need some environment variables set. When you login and manually execute the command you are using a interactive shell, when Ansible(or you) execute the comm…

---

## [How to associate hosts to group with the new 'awx' Command Line Interface](https://forum.ansible.com/t/how-to-associate-hosts-to-group-with-the-new-awx-command-line-interface/32325)

<div class="topic-metadata">

**Author:** [@Big\_Daddy](https://forum.ansible.com/u/Big_Daddy)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 8:33pm UTC](https://forum.ansible.com/t/how-to-associate-hosts-to-group-with-the-new-awx-command-line-interface/32325 "2020-02-26T20:33:12Z")

</div>

‘tower-cli’ is the legacy command line tool for Ansible Tower. ‘tower-cli host’ can associate/disassociate a group to/from a host https://tower-cli.readthedocs.io/en/latest/api\_ref/resources/host.html But now tower-cl…

---

## [How to build Ansible inventory file](https://forum.ansible.com/t/how-to-build-ansible-inventory-file/32227)

<div class="topic-metadata">

**Author:** [@Xinhuan\_Zheng](https://forum.ansible.com/u/Xinhuan_Zheng)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 8:18pm UTC](https://forum.ansible.com/t/how-to-build-ansible-inventory-file/32227 "2020-02-26T20:18:28Z")

</div>

Hello, I need to build Ansible inventory files, but somehow got stuck. Typically for a service, there is development, staging and production. Initially, I thought I can create 3 inventory files with those names. Later I…

---

## [Netscaler Ansible question](https://forum.ansible.com/t/netscaler-ansible-question/32336)

<div class="topic-metadata">

**Author:** [@Xinhuan\_Zheng](https://forum.ansible.com/u/Xinhuan_Zheng)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 8:11pm UTC](https://forum.ansible.com/t/netscaler-ansible-question/32336 "2020-02-26T20:11:18Z")

</div>

Hello, In my Netscaler Ansible module, I encountered a problem with netscaler\_lb\_vserver. I’m trying to use a list of servicebindings to create a single lb vserver with two services, but instead it only creates “test2-s…

---

## [Win\_ping Module | failed to run exec\_wrapper | URGENT](https://forum.ansible.com/t/win-ping-module-failed-to-run-exec-wrapper-urgent/32313)

<div class="topic-metadata">

**Author:** [@Piyush\_Bansal](https://forum.ansible.com/u/Piyush_Bansal)\
**Replies:** 5\
**Last updated:** [February 26, 2020, 7:32pm UTC](https://forum.ansible.com/t/win-ping-module-failed-to-run-exec-wrapper-urgent/32313 "2020-02-26T19:32:51Z")

</div>

Hello, I am running win\_ping for windows 2008R2 64bit server from ansible 2.8.2 & python version = 2.7.5. Below are connection parameters: winrm ssl 5986 ignore certificates Admin user Credentials are working fine…

---

## [Running perl script on remote host as applcation user](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32334)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 2:57pm UTC](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32334 "2020-02-26T14:57:26Z")

</div>

Could you please state clearly: - Which command did you run, and what actual output did you get from that (copied as plain text - not as images, attachments, or screenshots). - What the relevant tasks/playbooks/code/…

---

## [How can i pass hosts information dynamically from UI and invoke an ansible playbook .](https://forum.ansible.com/t/how-can-i-pass-hosts-information-dynamically-from-ui-and-invoke-an-ansible-playbook/32333)

<div class="topic-metadata">

**Author:** [@anilkumar\_panditi](https://forum.ansible.com/u/anilkumar_panditi)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 2:54pm UTC](https://forum.ansible.com/t/how-can-i-pass-hosts-information-dynamically-from-ui-and-invoke-an-ansible-playbook/32333 "2020-02-26T14:54:49Z")

</div>

Hi, I am trying to pass hosts information dynamically from UI and invoke an ansible playbook which will configure the things on the dynamically passed hosts from UI. Could you please help.

---

## [How can I pass predefined variable to playbook's “- hosts: ”POD\_'+VARIABLE+'\_master\_sn“”](https://forum.ansible.com/t/how-can-i-pass-predefined-variable-to-playbooks-hosts-pod-variable-master-sn/32331)

<div class="topic-metadata">

**Author:** [@Anton\_Tsurkanu](https://forum.ansible.com/u/Anton_Tsurkanu)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 9:33am UTC](https://forum.ansible.com/t/how-can-i-pass-predefined-variable-to-playbooks-hosts-pod-variable-master-sn/32331 "2020-02-26T09:33:53Z")

</div>

I need to read VARIABLE from some pre-defined file, not from the console. I have a file named “all” under group\_vars with predefined variable, the value of which can be changed, let say, from “C” to "D’ depends on what …

---

## [set\_fact undefined variable issue when concat string to itself.](https://forum.ansible.com/t/set-fact-undefined-variable-issue-when-concat-string-to-itself/32327)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 9:21am UTC](https://forum.ansible.com/t/set-fact-undefined-variable-issue-when-concat-string-to-itself/32327 "2020-02-26T09:21:29Z")

</div>

I need to set\_fact variable and contact to itself a list of items as below: \` set\_fact: excludefolders: “{{ excludefolders + ’ -o -name ’ + item | default(‘’) }}” with\_items: “{{ lookup(‘vars’, ‘MY\_’ + Layer).split(…

---

## [remote\_src and template\_host for template module not working for me](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32330)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 9:12am UTC](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32330 "2020-02-26T09:12:13Z")

</div>

Fix the truthy. See https://docs.ansible.com/ansible/latest/modules/fetch\_module.html#parameters flat: true HTH, -vlado

---

## [remote\_src and template\_host for template module not working for me](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32329)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 0\
**Last updated:** [February 26, 2020, 8:50am UTC](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32329 "2020-02-26T08:50:26Z")

</div>

Hi , 1. I have multiple json as well as j2 files , Need to generate multiple config files by using template module. 2. In fetch module . fetch the files with including host name in path . How we can avoid this hostna…

---

## [Unable to load variable from include\_vars into my playbook](https://forum.ansible.com/t/unable-to-load-variable-from-include-vars-into-my-playbook/32319)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 3\
**Last updated:** [February 26, 2020, 7:53am UTC](https://forum.ansible.com/t/unable-to-load-variable-from-include-vars-into-my-playbook/32319 "2020-02-26T07:53:40Z")

</div>

I have a playbook where I load a variable file \` cat vars/BASE.yaml EXCLUDE\_front: value1 EXCLUDE\_back: value2 \` I run my test.yml playbook using this command: \` ansible-playbook test.yml -e Layer=“back” -e base\_…

---

## [How to escape single quotes within single quotes in Ansible](https://forum.ansible.com/t/how-to-escape-single-quotes-within-single-quotes-in-ansible/32328)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 7:24am UTC](https://forum.ansible.com/t/how-to-escape-single-quotes-within-single-quotes-in-ansible/32328 "2020-02-26T07:24:24Z")

</div>

Below is my playbook: \` set\_fact: excludefolders: “{{ excludefolders + ’ -o -name ’ + item | default(‘’) }}” with\_items: “{{ lookup(‘vars’, ‘EXCLUDE\_’ + Layer).split(‘,’) }}” debug: msg: “excludedfolder is {{ e…

---

## [How to run plays on all hosts in a group using localhost](https://forum.ansible.com/t/how-to-run-plays-on-all-hosts-in-a-group-using-localhost/32215)

<div class="topic-metadata">

**Author:** [@shane.do](https://forum.ansible.com/u/shane.do)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 12:34am UTC](https://forum.ansible.com/t/how-to-run-plays-on-all-hosts-in-a-group-using-localhost/32215 "2020-02-26T00:34:48Z")

</div>

I’m trying to create a playbook that creates EC2 snapshots of some AWS Windows servers. I’m having a lot of trouble understanding how to get the correct directives in place to make sure things are running as they can. Wh…

---

## [Cannot create some accounts associated to a host inside an external inventory file](https://forum.ansible.com/t/cannot-create-some-accounts-associated-to-a-host-inside-an-external-inventory-file/32326)

<div class="topic-metadata">

**Author:** [@Stefano\_Leandro](https://forum.ansible.com/u/Stefano_Leandro)\
**Replies:** 0\
**Last updated:** [February 25, 2020, 10:23pm UTC](https://forum.ansible.com/t/cannot-create-some-accounts-associated-to-a-host-inside-an-external-inventory-file/32326 "2020-02-25T22:23:39Z")

</div>

Hi , Pratically im implementing this use case : Passing a inventory file containing host and vars associated ,i would create a play that iterate for each linux acciunt to create per host this is my inventory file form…

---

## [Insifficient support for LVM in Ansible (2.9+)](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321)

<div class="topic-metadata">

**Author:** [@Rene\_van\_der\_Linden](https://forum.ansible.com/u/Rene_van_der_Linden)\
**Replies:** 2\
**Last updated:** [February 25, 2020, 10:04pm UTC](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321 "2020-02-25T22:04:28Z")

</div>

The LVM related modules filesystem and lvol https://docs.ansible.com/ansible/latest/modules/filesystem\_module.html https://docs.ansible.com/ansible/latest/modules/lvol\_module.html are unable to manage xfs and swap fil…

---

## [How to translate a complex sed expressions into regex\_replace](https://forum.ansible.com/t/how-to-translate-a-complex-sed-expressions-into-regex-replace/32324)

<div class="topic-metadata">

**Author:** [@actionmystique](https://forum.ansible.com/u/actionmystique)\
**Replies:** 3\
**Last updated:** [February 25, 2020, 3:36pm UTC](https://forum.ansible.com/t/how-to-translate-a-complex-sed-expressions-into-regex-replace/32324 "2020-02-25T15:36:49Z")

</div>

ansible 2.9.5 (pip3) The following sed command: function is to replace all ‘\_’ by ‘-’ in all keys only (and not values) within a list of dictionaries in memory uses character classes which are probably not supported b…

[Previous page](https://forum.ansible.com/latest.md?page=395)

[Next page](https://forum.ansible.com/latest.md?page=397)
