# Ansible Project

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

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

**Page:** 141

---

## [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 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…

---

## [ansible and yaml syntax - There appears to be both 'k=v' shorthand syntax and YAML in this task. Only one syntax may be used.](https://forum.ansible.com/t/ansible-and-yaml-syntax-there-appears-to-be-both-k-v-shorthand-syntax-and-yaml-in-this-task-only-one-syntax-may-be-used/32323)

<div class="topic-metadata">

**Author:** [@Nicolas\_W](https://forum.ansible.com/u/Nicolas_W)\
**Replies:** 3\
**Last updated:** [February 25, 2020, 3:15pm UTC](https://forum.ansible.com/t/ansible-and-yaml-syntax-there-appears-to-be-both-k-v-shorthand-syntax-and-yaml-in-this-task-only-one-syntax-may-be-used/32323 "2020-02-25T15:15:15Z")

</div>

Hello, any clues what is a workaround for the syntax issue below? This variable is defined in a group among other variables. My playbook won’t run because of this error. I may have to escape the =… I m hoping to keep th…

---

## [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/32322)

<div class="topic-metadata">

**Author:** [@racke](https://forum.ansible.com/u/racke)\
**Replies:** 1\
**Last updated:** [February 25, 2020, 2:53pm UTC](https://forum.ansible.com/t/remote-src-and-template-host-for-template-module-not-working-for-me/32322 "2020-02-25T14:53:06Z")

</div>

Thank u Jordan and Dick , Can you please help to know , how can we fetch folder from remote to controller as fetch module not supported folders rather than files. i can able to fetch multiple files but not able t…

---

## [My playbook hangs during a task.](https://forum.ansible.com/t/my-playbook-hangs-during-a-task/32289)

<div class="topic-metadata">

**Author:** [@Keith\_Koene](https://forum.ansible.com/u/Keith_Koene)\
**Replies:** 2\
**Last updated:** [February 25, 2020, 8:44am UTC](https://forum.ansible.com/t/my-playbook-hangs-during-a-task/32289 "2020-02-25T08:44:30Z")

</div>

I have written a playbook that checks for accessible hosts, then copies a script to those hosts, runs the script, copies output to file and then looks for that file and copies it back to the local machine. I ran this pla…

---

## [\[ Ansible \] - Weird nested loop help](https://forum.ansible.com/t/ansible-weird-nested-loop-help/32314)

<div class="topic-metadata">

**Author:** [@Joao\_Santos](https://forum.ansible.com/u/Joao_Santos)\
**Replies:** 3\
**Last updated:** [February 24, 2020, 10:57pm UTC](https://forum.ansible.com/t/ansible-weird-nested-loop-help/32314 "2020-02-24T22:57:27Z")

</div>

Hey community, need your help again… On my goal of automation I’m blocked on loops… dont know if I’m doing wrong, need to change approach or if just stupid… Well, lets try… I would like to replace lines in FILES\_A wit…

---

## [Templating error with Ansible 2.9 or higher](https://forum.ansible.com/t/templating-error-with-ansible-2-9-or-higher/32273)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 6:59pm UTC](https://forum.ansible.com/t/templating-error-with-ansible-2-9-or-higher/32273 "2020-02-24T18:59:56Z")

</div>

I’m using the Satellite6 Content Views role found here: https://galaxy.ansible.com/ahuffman/satellite6\_manage\_content\_views. It works on Ansible up to 2.8.6, but any version after that gives the following error: TASK \[s…

---

## [Create Key value pair](https://forum.ansible.com/t/create-key-value-pair/32315)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 8\
**Last updated:** [February 24, 2020, 4:40pm UTC](https://forum.ansible.com/t/create-key-value-pair/32315 "2020-02-24T16:40:16Z")

</div>

I have list of items to be executed in the command and I have to save the result in stdout for each item to the same item. Ex: hosts: dev tasks: - name: get variable shell: cat file #this file contain the li…

---

## [Issue with openssl\_csr authority\_cert\_issuer](https://forum.ansible.com/t/issue-with-openssl-csr-authority-cert-issuer/32300)

<div class="topic-metadata">

**Author:** [@Joshua\_Goldman](https://forum.ansible.com/u/Joshua_Goldman)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 4:22pm UTC](https://forum.ansible.com/t/issue-with-openssl-csr-authority-cert-issuer/32300 "2020-02-24T16:22:54Z")

</div>

Hello, I am trying to specify O and CN authority\_cert\_issuer: ‘dirName:O = Example Net, CN = example.net’ authority\_key\_identifier: xxxxxxxx authority\_cert\_serial\_number: xxxxxxxxx I get the following error on playb…

---

## [How to pass Node\_Resource\_Group while creating AKS cluster via ansible azure\_rm\_aks module](https://forum.ansible.com/t/how-to-pass-node-resource-group-while-creating-aks-cluster-via-ansible-azure-rm-aks-module/32179)

<div class="topic-metadata">

**Author:** [@Prakash\_Sharma](https://forum.ansible.com/u/Prakash_Sharma)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 7:36am UTC](https://forum.ansible.com/t/how-to-pass-node-resource-group-while-creating-aks-cluster-via-ansible-azure-rm-aks-module/32179 "2020-02-24T07:36:27Z")

</div>

Hello , I am having a difficult time to understand how one can pass node resource group while creating AKS cluster with ansible modules . As I know , in azure cli , one has to add aks-preview addon , and in terraform t…

---

## [Need provisioning in gcp\_container\_cluster module to specify GKE cluster version](https://forum.ansible.com/t/need-provisioning-in-gcp-container-cluster-module-to-specify-gke-cluster-version/32312)

<div class="topic-metadata">

**Author:** [@Rahul\_Monde](https://forum.ansible.com/u/Rahul_Monde)\
**Replies:** 0\
**Last updated:** [February 24, 2020, 5:20am UTC](https://forum.ansible.com/t/need-provisioning-in-gcp-container-cluster-module-to-specify-gke-cluster-version/32312 "2020-02-24T05:20:20Z")

</div>

Hello, Background: We have ansible tower where all the playbooks resides. End user makes call to such playbook to create required resource. Problem statement: I am using gcp\_container\_cluster module to launch GKE clust…

---

## [Connecting to a WinRM host with different credentials?](https://forum.ansible.com/t/connecting-to-a-winrm-host-with-different-credentials/32305)

<div class="topic-metadata">

**Author:** [@Dave\_York](https://forum.ansible.com/u/Dave_York)\
**Replies:** 3\
**Last updated:** [February 24, 2020, 4:07am UTC](https://forum.ansible.com/t/connecting-to-a-winrm-host-with-different-credentials/32305 "2020-02-24T04:07:44Z")

</div>

I have a playbook in which I want to create a random password and use it later to connect to a windows box over WinRM I’ve generated a random password like this: name: Generate a temporary random password for new host …

---

## [Building a VM using Ansible Tower](https://forum.ansible.com/t/building-a-vm-using-ansible-tower/32301)

<div class="topic-metadata">

**Author:** [@Sindhu\_Rao](https://forum.ansible.com/u/Sindhu_Rao)\
**Replies:** 1\
**Last updated:** [February 23, 2020, 8:20pm UTC](https://forum.ansible.com/t/building-a-vm-using-ansible-tower/32301 "2020-02-23T20:20:13Z")

</div>

I’m building a VM on Vcenter with a playbook that runs fine and creates a VM when executed from the Ansible server but fails to create a VM when the same playbook is executed from ANsible Tower. I do not see any syntax …

---

## [win\_shell module with multiple lines not working](https://forum.ansible.com/t/win-shell-module-with-multiple-lines-not-working/32308)

<div class="topic-metadata">

**Author:** [@Yehuda\_Pinhas](https://forum.ansible.com/u/Yehuda_Pinhas)\
**Replies:** 2\
**Last updated:** [February 23, 2020, 6:57pm UTC](https://forum.ansible.com/t/win-shell-module-with-multiple-lines-not-working/32308 "2020-02-23T18:57:56Z")

</div>

Hi guys. This is my code:

---

## [wait\_for ping?](https://forum.ansible.com/t/wait-for-ping/32307)

<div class="topic-metadata">

**Author:** [@Heinz\_Meier](https://forum.ansible.com/u/Heinz_Meier)\
**Replies:** 3\
**Last updated:** [February 23, 2020, 6:54pm UTC](https://forum.ansible.com/t/wait-for-ping/32307 "2020-02-23T18:54:19Z")

</div>

Hi, need to wait until a host is up and running. This host does not (yet) offer ssh, so I need a simple ping. The module wait\_for only offers port tests, as far as I can see. Any ideas? Michael Schwartzkopff

---

## [ansible-playbook for getting orion managed nodes](https://forum.ansible.com/t/ansible-playbook-for-getting-orion-managed-nodes/32310)

<div class="topic-metadata">

**Author:** [@Yehuda\_Pinhas](https://forum.ansible.com/u/Yehuda_Pinhas)\
**Replies:** 0\
**Last updated:** [February 23, 2020, 2:22pm UTC](https://forum.ansible.com/t/ansible-playbook-for-getting-orion-managed-nodes/32310 "2020-02-23T14:22:43Z")

</div>

Hi! Can anyone help me build this playbook? how can i fetch this information from my orion windows-based server?

---

## [Callback plugins works with ansible command?](https://forum.ansible.com/t/callback-plugins-works-with-ansible-command/32306)

<div class="topic-metadata">

**Author:** [@ansiblekrazy](https://forum.ansible.com/u/ansiblekrazy)\
**Replies:** 1\
**Last updated:** [February 23, 2020, 8:23am UTC](https://forum.ansible.com/t/callback-plugins-works-with-ansible-command/32306 "2020-02-23T08:23:06Z")

</div>

Hi Guys, We have been using customized callback plugin with playbooks ansile-playbooks command. I’ve been trying callback plugin to improve the output on screen with ansible command, however it is not working. Does cal…

---

## [shell module failing for grep](https://forum.ansible.com/t/shell-module-failing-for-grep/32298)

<div class="topic-metadata">

**Author:** [@mzagrabe](https://forum.ansible.com/u/mzagrabe)\
**Replies:** 3\
**Last updated:** [February 22, 2020, 6:20pm UTC](https://forum.ansible.com/t/shell-module-failing-for-grep/32298 "2020-02-22T18:20:30Z")

</div>

Greetings, I'm running ansible 2.9 (2.9.4+dfsg-1) and I've searched the mailing list archives regarding this issue, but I haven't found out why I'm seeing what I am seeing. shell module is failing when I'm not expect…

---

## [Ansible - Environment variable](https://forum.ansible.com/t/ansible-environment-variable/32283)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 8\
**Last updated:** [February 22, 2020, 6:18am UTC](https://forum.ansible.com/t/ansible-environment-variable/32283 "2020-02-22T06:18:14Z")

</div>

0I have the env file which is present in target machine and it contain certain number of variables with export command(the export command itself was present inside the file). export AB\_HOME=/et/dev/abinitio/abinitio-V3 …

---

## [jump through two bastion hosts?](https://forum.ansible.com/t/jump-through-two-bastion-hosts/32276)

<div class="topic-metadata">

**Author:** [@erichymowitz](https://forum.ansible.com/u/erichymowitz)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 11:31pm UTC](https://forum.ansible.com/t/jump-through-two-bastion-hosts/32276 "2020-02-21T23:31:53Z")

</div>

So I’ve got a host that I need to jump through two bastion hosts to get to: Ansible -----\> bastion\_1 -----\> bastion\_2 -----\> target I can use ansible to get to bastion\_2 by setting up a hostvar: ansible\_ssh\_common\_arg…

---

## [How to source a file which contains environment variables in a linux](https://forum.ansible.com/t/how-to-source-a-file-which-contains-environment-variables-in-a-linux/26810)

<div class="topic-metadata">

**Author:** [@Gopi\_Krishna](https://forum.ansible.com/u/Gopi_Krishna)\
**Replies:** 5\
**Last updated:** [February 21, 2020, 10:37pm UTC](https://forum.ansible.com/t/how-to-source-a-file-which-contains-environment-variables-in-a-linux/26810 "2020-02-21T22:37:23Z")

</div>

Hi All, name: “source then env file” shell: . /home/myfiles/setup.env I used . & source to source the env file, but its was not happening the way that works in linux environement my setup.env: export ip\_net=xx.xx.x…

---

## [Migration off Tool Server to Admin Box on Citrix](https://forum.ansible.com/t/migration-off-tool-server-to-admin-box-on-citrix/32299)

<div class="topic-metadata">

**Author:** [@Harris\_Humayun](https://forum.ansible.com/u/Harris_Humayun)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 10:03pm UTC](https://forum.ansible.com/t/migration-off-tool-server-to-admin-box-on-citrix/32299 "2020-02-21T22:03:04Z")

</div>

Hello: I am a sys admin for a contractor in the govt. Where I work we have servers with tools on them, what I am tasked with doing is moving these tools over to an admin box on Citrix, so it can be accessed by VDI. I ne…

---

## [Ansible delegate to another host](https://forum.ansible.com/t/ansible-delegate-to-another-host/32296)

<div class="topic-metadata">

**Author:** [@Amit\_Juneja](https://forum.ansible.com/u/Amit_Juneja)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 9:52pm UTC](https://forum.ansible.com/t/ansible-delegate-to-another-host/32296 "2020-02-21T21:52:54Z")

</div>

Hi everyone, I would appreciate if you could please look at my issue below and provide your suggestions - GOAL - Identify if the data in lower environment is scrambled. Steps - Identify all lower environment and for…

---

## [ansible - ios\_config:  suppress all the "show running-configs" that occur after updating each port on a cisco switch?](https://forum.ansible.com/t/ansible-ios-config-suppress-all-the-show-running-configs-that-occur-after-updating-each-port-on-a-cisco-switch/32297)

<div class="topic-metadata">

**Author:** [@John\_Hawley](https://forum.ansible.com/u/John_Hawley)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 8:14pm UTC](https://forum.ansible.com/t/ansible-ios-config-suppress-all-the-show-running-configs-that-occur-after-updating-each-port-on-a-cisco-switch/32297 "2020-02-21T20:14:04Z")

</div>

I have a playbook that steps through all the ports on a cisco switch stack, adding or removing lines and it takes a very long time to run. I can see in TACACS command accounting that it is doing a “show running-config” a…

---

## [\[ Ansible \] - How to comment (add #) all lines in file](https://forum.ansible.com/t/ansible-how-to-comment-add-all-lines-in-file/32288)

<div class="topic-metadata">

**Author:** [@Joao\_Santos](https://forum.ansible.com/u/Joao_Santos)\
**Replies:** 6\
**Last updated:** [February 21, 2020, 4:59pm UTC](https://forum.ansible.com/t/ansible-how-to-comment-add-all-lines-in-file/32288 "2020-02-21T16:59:03Z")

</div>

Hey Ansible gurus, need your help here… Just googled around and was not able to find a satisfactory answer to the following: I have a file and want to insert in the beginning of each line the # character No matter if …

---

## [.ansible/tmp/ansible-tmp readonly file systems](https://forum.ansible.com/t/ansible-tmp-ansible-tmp-readonly-file-systems/32295)

<div class="topic-metadata">

**Author:** [@Bill\_Mounsey](https://forum.ansible.com/u/Bill_Mounsey)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 3:04pm UTC](https://forum.ansible.com/t/ansible-tmp-ansible-tmp-readonly-file-systems/32295 "2020-02-21T15:04:12Z")

</div>

serverA | UNREACHABLE! =\> { “changed”: false, “msg”: “Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing …

---

## [\[ Ansible \] - Read a properties file (java/springboot) to use later](https://forum.ansible.com/t/ansible-read-a-properties-file-java-springboot-to-use-later/32291)

<div class="topic-metadata">

**Author:** [@Joao\_Santos](https://forum.ansible.com/u/Joao_Santos)\
**Replies:** 3\
**Last updated:** [February 21, 2020, 2:11pm UTC](https://forum.ansible.com/t/ansible-read-a-properties-file-java-springboot-to-use-later/32291 "2020-02-21T14:11:43Z")

</div>

Hey all, Would like to count with your experience/feedback with a very specific task… I would like to collect the content of a properties file (java/springboot) and turn it to a form of data structure to later use it d…

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

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