# Ansible Project

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

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

**Page:** 71

---

## [Creating snapshot of an Openstack server/instance using Ansible](https://forum.ansible.com/t/creating-snapshot-of-an-openstack-server-instance-using-ansible/30424)

<div class="topic-metadata">

**Author:** [@Abdul\_Wahab](https://forum.ansible.com/u/Abdul_Wahab)\
**Replies:** 1\
**Last updated:** [July 2, 2021, 8:29pm UTC](https://forum.ansible.com/t/creating-snapshot-of-an-openstack-server-instance-using-ansible/30424 "2021-07-02T20:29:42Z")

</div>

Hello Everyone, I have been trying to find an ansible-module that can create a snapshot of a running server/instance on Openstack cloud. I have looked into os\_image, os\_server\_action and os\_server modules but couldn’t f…

---

## [Find all files owned by a particular user](https://forum.ansible.com/t/find-all-files-owned-by-a-particular-user/35449)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 7\
**Last updated:** [July 2, 2021, 3:33pm UTC](https://forum.ansible.com/t/find-all-files-owned-by-a-particular-user/35449 "2021-07-02T15:33:25Z")

</div>

I’m trying to use the find module to search a path and return all files owned by a particular user. I can get the list of all files in the folder, but the data returned has both the path and the pw\_name for each file. Ho…

---

## [how to start / stop windows services as unprivileged user via ansible?](https://forum.ansible.com/t/how-to-start-stop-windows-services-as-unprivileged-user-via-ansible/35452)

<div class="topic-metadata">

**Author:** [@0asp0](https://forum.ansible.com/u/0asp0)\
**Replies:** 0\
**Last updated:** [July 2, 2021, 12:02pm UTC](https://forum.ansible.com/t/how-to-start-stop-windows-services-as-unprivileged-user-via-ansible/35452 "2021-07-02T12:02:47Z")

</div>

Hi, I need to start / stop services as unprivileged user via ansible on a windows machine. So ansible will login as unprivileged user. I tried both: the recommended version of win32-openssh linked in ansible documentati…

---

## [Check file exists and skip task in next run playbooks](https://forum.ansible.com/t/check-file-exists-and-skip-task-in-next-run-playbooks/35451)

<div class="topic-metadata">

**Author:** [@Ti\_n\_Nguy\_n](https://forum.ansible.com/u/Ti_n_Nguy_n)\
**Replies:** 0\
**Last updated:** [July 2, 2021, 8:34am UTC](https://forum.ansible.com/t/check-file-exists-and-skip-task-in-next-run-playbooks/35451 "2021-07-02T08:34:35Z")

</div>

I write my playbook name: stat /opt/zookeeper-3.4.14/\* stat: path: “/opt/zookeeper-3.4.14” register: zoo name: mv opt/zookeeper-3.4.14 /opt/zookeeper shell: mv /opt/zookeeper-3.4.14/\* /opt/zookeeper when: zoo.stat…

---

## [Need to create a windows proxy servers](https://forum.ansible.com/t/need-to-create-a-windows-proxy-servers/35450)

<div class="topic-metadata">

**Author:** [@Gaurav\_Dhyani](https://forum.ansible.com/u/Gaurav_Dhyani)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 10:27pm UTC](https://forum.ansible.com/t/need-to-create-a-windows-proxy-servers/35450 "2021-07-01T22:27:16Z")

</div>

I have my windows terminal server which i want to use as a proxy server to connect our DMZ network.

---

## [Ansible cisco\_ios. Change Tunnel Interface Only Settings](https://forum.ansible.com/t/ansible-cisco-ios-change-tunnel-interface-only-settings/35448)

<div class="topic-metadata">

**Author:** [@user107](https://forum.ansible.com/u/user107)\
**Replies:** 0\
**Last updated:** [July 1, 2021, 1:09pm UTC](https://forum.ansible.com/t/ansible-cisco-ios-change-tunnel-interface-only-settings/35448 "2021-07-01T13:09:51Z")

</div>

I collect information about interfaces and after that I need to add the command “no cdp enable” in the tunnels. With the first part, it somehow worked out, but now how to select only the tunnels and add information? tas…

---

## [ansible - J2 template](https://forum.ansible.com/t/ansible-j2-template/35446)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 2\
**Last updated:** [July 1, 2021, 8:55am UTC](https://forum.ansible.com/t/ansible-j2-template/35446 "2021-07-01T08:55:07Z")

</div>

Ansible question I have a variable, let call it value1 and a J2 template. The J2 template includes the following line : LINE=” This string mut be included this string is optional= {{ value1}}” What I need to implemen…

---

## [Does the find module stores the files by sorting based on modification time?](https://forum.ansible.com/t/does-the-find-module-stores-the-files-by-sorting-based-on-modification-time/35441)

<div class="topic-metadata">

**Author:** [@Arun\_Kumar](https://forum.ansible.com/u/Arun_Kumar)\
**Replies:** 6\
**Last updated:** [July 1, 2021, 7:09am UTC](https://forum.ansible.com/t/does-the-find-module-stores-the-files-by-sorting-based-on-modification-time/35441 "2021-07-01T07:09:18Z")

</div>

Does the find module stores the files by sorting based on modification time?

---

## [Do I need to use a nested loop for this?](https://forum.ansible.com/t/do-i-need-to-use-a-nested-loop-for-this/35445)

<div class="topic-metadata">

**Author:** [@Clint\_Denham](https://forum.ansible.com/u/Clint_Denham)\
**Replies:** 0\
**Last updated:** [June 30, 2021, 6:27pm UTC](https://forum.ansible.com/t/do-i-need-to-use-a-nested-loop-for-this/35445 "2021-06-30T18:27:14Z")

</div>

TL;DR - I need to use with\_items on a Task (that is already using a loop) but I can’t use loop and with\_items in the same Task and ‘think’ I need to use a nested loop. I can’t find an idiot’s guide on how to accomplish t…

---

## [Good example of functional ansible collection?](https://forum.ansible.com/t/good-example-of-functional-ansible-collection/35444)

<div class="topic-metadata">

**Author:** [@Erik\_Godding\_Boye](https://forum.ansible.com/u/Erik_Godding_Boye)\
**Replies:** 0\
**Last updated:** [June 30, 2021, 5:38pm UTC](https://forum.ansible.com/t/good-example-of-functional-ansible-collection/35444 "2021-06-30T17:38:01Z")

</div>

Hi, I am looking for good examples of well written functional ansible collections. My goal is to pick up some tips from the experts. :slight\_smile: The collections I am looking for has mostly roles, maybe some simple pl…

---

## [Ansible vault without temp files](https://forum.ansible.com/t/ansible-vault-without-temp-files/35439)

<div class="topic-metadata">

**Author:** [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Replies:** 3\
**Last updated:** [June 30, 2021, 4:35pm UTC](https://forum.ansible.com/t/ansible-vault-without-temp-files/35439 "2021-06-30T16:35:43Z")

</div>

Quick question, please. A playbook. for each host generates a random password, sets it as root password on the host and stores, “:\< pwd\>” in local Ansible vault file. How can I add new entries to the vault without crea…

---

## [vSphere Playbook runs from Ansible Tower but not when run with Ansible-Playbook](https://forum.ansible.com/t/vsphere-playbook-runs-from-ansible-tower-but-not-when-run-with-ansible-playbook/35442)

<div class="topic-metadata">

**Author:** [@david.burtton](https://forum.ansible.com/u/david.burtton)\
**Replies:** 2\
**Last updated:** [June 30, 2021, 4:11pm UTC](https://forum.ansible.com/t/vsphere-playbook-runs-from-ansible-tower-but-not-when-run-with-ansible-playbook/35442 "2021-06-30T16:11:38Z")

</div>

I’ve written a playbook to interact with a VMWare vSphere instance I have which will start up a set of VMs however I’m running into an issue where I can’t run the playbook using ansible-playbook but I can run it from wit…

---

## [Ansible 4.2.0 released](https://forum.ansible.com/t/ansible-4-2-0-released/35443)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [June 30, 2021, 3:43pm UTC](https://forum.ansible.com/t/ansible-4-2-0-released/35443 "2021-06-30T15:43:26Z")

</div>

Hi all, We're happy to announce that the ansible-4.2.0 package has been released! The update contains bugfixes and new, backwards compatible features in the contained collections. How to get it

---

## [help debugging calling import\_playbook](https://forum.ansible.com/t/help-debugging-calling-import-playbook/35410)

<div class="topic-metadata">

**Author:** [@need\_abettername](https://forum.ansible.com/u/need_abettername)\
**Replies:** 5\
**Last updated:** [June 30, 2021, 2:20pm UTC](https://forum.ansible.com/t/help-debugging-calling-import-playbook/35410 "2021-06-30T14:20:05Z")

</div>

I need help getting more information on why an import\_ playbook fails please… During a play (play 1) I’m (ansible.builtin.template) sucessfully templating out another play (play 2) and variables file and using trying to…

---

## [Any use case of Storage Automation w.r.t Netapp, Unity, and Pure](https://forum.ansible.com/t/any-use-case-of-storage-automation-w-r-t-netapp-unity-and-pure/35433)

<div class="topic-metadata">

**Author:** [@Somarko\_Das](https://forum.ansible.com/u/Somarko_Das)\
**Replies:** 1\
**Last updated:** [June 30, 2021, 8:30am UTC](https://forum.ansible.com/t/any-use-case-of-storage-automation-w-r-t-netapp-unity-and-pure/35433 "2021-06-30T08:30:08Z")

</div>

Hi All, Can anybody please tell me what are all possible storage automation use cases with Netapp, Unity & Pure. I need the High level process flow. Any help is much appreciated\\ Thanks & Regards, Som

---

## [even after installing requests\_kerberos, getting same error.](https://forum.ansible.com/t/even-after-installing-requests-kerberos-getting-same-error/35436)

<div class="topic-metadata">

**Author:** [@Rohith\_C](https://forum.ansible.com/u/Rohith_C)\
**Replies:** 0\
**Last updated:** [June 29, 2021, 4:07pm UTC](https://forum.ansible.com/t/even-after-installing-requests-kerberos-getting-same-error/35436 "2021-06-29T16:07:36Z")

</div>

Getting below error ansible-playbook 2.9.21 config file = /etc/ansible/ansible.cfg configured module search path = \[u’/home/svc\_stsx\_ops\_windows/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’\] ansib…

---

## [Using variable into failed\_when in a role](https://forum.ansible.com/t/using-variable-into-failed-when-in-a-role/35421)

<div class="topic-metadata">

**Author:** [@gabriel\_westrelin](https://forum.ansible.com/u/gabriel_westrelin)\
**Replies:** 1\
**Last updated:** [June 29, 2021, 2:10pm UTC](https://forum.ansible.com/t/using-variable-into-failed-when-in-a-role/35421 "2021-06-29T14:10:47Z")

</div>

In a role, I would like to use a variable that I set when calling in the playbook in a “failed\_when”. I still have this error: FAILED! =\> {“msg”: “The conditional check ‘vars.reponseOK not in reponse.content’ failed. Th…

---

## [Simple playbook con cisco device don't work](https://forum.ansible.com/t/simple-playbook-con-cisco-device-dont-work/35434)

<div class="topic-metadata">

**Author:** [@Propus\_Gemini](https://forum.ansible.com/u/Propus_Gemini)\
**Replies:** 1\
**Last updated:** [June 29, 2021, 10:57am UTC](https://forum.ansible.com/t/simple-playbook-con-cisco-device-dont-work/35434 "2021-06-29T10:57:25Z")

</div>

this is my playbook

---

## [Ansible Docker command is not working](https://forum.ansible.com/t/ansible-docker-command-is-not-working/35432)

<div class="topic-metadata">

**Author:** [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Replies:** 2\
**Last updated:** [June 29, 2021, 5:35am UTC](https://forum.ansible.com/t/ansible-docker-command-is-not-working/35432 "2021-06-29T05:35:09Z")

</div>

Hi, I am trying to run a service via ansible name: Run airflow init shell: cmd: docker-compose up airflow-init chdir: /home/azureuser/airflow but it is throwing this error: fatal: \[dmpServer\]: FAILED! =\> {“change…

---

## [Update the port of server.xml file in Tomcat via ansible](https://forum.ansible.com/t/update-the-port-of-server-xml-file-in-tomcat-via-ansible/35431)

<div class="topic-metadata">

**Author:** [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Replies:** 1\
**Last updated:** [June 29, 2021, 3:32am UTC](https://forum.ansible.com/t/update-the-port-of-server-xml-file-in-tomcat-via-ansible/35431 "2021-06-29T03:32:13Z")

</div>

Hi, I am very new to Ansible and I need small help top update the p\[ort number in the server.xml file in tomcat to change the port from 8080 to 8090 here is the server.xml (highlighted in bold) ------------------------…

---

## [how to display sub variables using debug module](https://forum.ansible.com/t/how-to-display-sub-variables-using-debug-module/35427)

<div class="topic-metadata">

**Author:** [@John\_Veliss](https://forum.ansible.com/u/John_Veliss)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 4:05pm UTC](https://forum.ansible.com/t/how-to-display-sub-variables-using-debug-module/35427 "2021-06-28T16:05:21Z")

</div>

I am using the win.find module along with the debug module to list files. tasks: name: Find ALDM zip files ansible.windows.win\_find: paths: c:\\temp recurse: no patterns: “\*.zip” register: files\_to\_copy debug: ms…

---

## [need help to configure a loop](https://forum.ansible.com/t/need-help-to-configure-a-loop/35423)

<div class="topic-metadata">

**Author:** [@y\_c](https://forum.ansible.com/u/y_c)\
**Replies:** 2\
**Last updated:** [June 28, 2021, 3:00pm UTC](https://forum.ansible.com/t/need-help-to-configure-a-loop/35423 "2021-06-28T15:00:45Z")

</div>

Hello guys, I need to run loop with a file but run all tasks item by item. Here is my conf: name: test hosts: yo tasks: name: task 1 win\_uri: url: https://{{ frontsrc }}/{{ item }}/ with\_lines: cat /etc/ansibl…

---

## [How to find the current VM where play is running](https://forum.ansible.com/t/how-to-find-the-current-vm-where-play-is-running/35426)

<div class="topic-metadata">

**Author:** [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 2:52pm UTC](https://forum.ansible.com/t/how-to-find-the-current-vm-where-play-is-running/35426 "2021-06-28T14:52:56Z")

</div>

Hi, I want to automate the software deployment via ansible.Here is my problem where I need some help: When I run the playbook it goes through inventory to install software on a remote VM and update software config file…

---

## [How to pass variable to another playbook and from imported playbook to role used by it](https://forum.ansible.com/t/how-to-pass-variable-to-another-playbook-and-from-imported-playbook-to-role-used-by-it/35425)

<div class="topic-metadata">

**Author:** [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 2:41pm UTC](https://forum.ansible.com/t/how-to-pass-variable-to-another-playbook-and-from-imported-playbook-to-role-used-by-it/35425 "2021-06-28T14:41:36Z")

</div>

Hi, I have two playbooks Playbook1 name: Create Azure VM hosts: localhost name: Include Delete IP address import\_playbook: deleteIPaddress.yml Vars: ipaddress:“{{ipaddress}}” Now in this imported playbook …

---

## [How to add task after importing the playbook](https://forum.ansible.com/t/how-to-add-task-after-importing-the-playbook/35424)

<div class="topic-metadata">

**Author:** [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 2:37pm UTC](https://forum.ansible.com/t/how-to-add-task-after-importing-the-playbook/35424 "2021-06-28T14:37:47Z")

</div>

Hi, I want to add tasks after importing a playbook inside another playbook.’ name: Create Azure VM hosts: localhost name: Creating a targetIPAddress.txt copy: dest: “/home/azureuser/dmptargetIPAddress.txt” con…

---

## [Custom name for a template's temporary file name?](https://forum.ansible.com/t/custom-name-for-a-templates-temporary-file-name/35422)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 10:05am UTC](https://forum.ansible.com/t/custom-name-for-a-templates-temporary-file-name/35422 "2021-06-28T10:05:09Z")

</div>

Hi I'm trying to verify systemd unit files that we deploy with the template module like this: - name: Add systemd unit for our service become: true template: src: my.service.j2 dest: "/lib/systemd/syst…

---

## [How to use the tower\_schedule.](https://forum.ansible.com/t/how-to-use-the-tower-schedule/35420)

<div class="topic-metadata">

**Author:** [@Flavio\_Gobber](https://forum.ansible.com/u/Flavio_Gobber)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 8:37am UTC](https://forum.ansible.com/t/how-to-use-the-tower-schedule/35420 "2021-06-28T08:37:07Z")

</div>

Hello, I need to change the schedule parameter of a Template by script. I have found the command tower\_schedule but I am unable to include that command into a playbook. Here the yml file created:

---

## [change a schedule of a template.](https://forum.ansible.com/t/change-a-schedule-of-a-template/35405)

<div class="topic-metadata">

**Author:** [@Flavio\_Gobber](https://forum.ansible.com/u/Flavio_Gobber)\
**Replies:** 2\
**Last updated:** [June 28, 2021, 8:26am UTC](https://forum.ansible.com/t/change-a-schedule-of-a-template/35405 "2021-06-28T08:26:00Z")

</div>

Hello, I need to create a playbook to update a schedule linked to a Template, this to automate the update a lot of schedule time. Thank you Flavio Gobber

---

## [pyats doesn’t parse “show class-map”](https://forum.ansible.com/t/pyats-doesn-t-parse-show-class-map/35419)

<div class="topic-metadata">

**Author:** [@L\_Jankok](https://forum.ansible.com/u/L_Jankok)\
**Replies:** 0\
**Last updated:** [June 27, 2021, 11:24am UTC](https://forum.ansible.com/t/pyats-doesn-t-parse-show-class-map/35419 "2021-06-27T11:24:47Z")

</div>

Hi There I am testing the following task; name: Gather all class maps ansible.utils.cli\_parse: command: show class-map parser: name: ansible.netcommon.pyats os: iosxe set\_fact: cm The task fails with the follow…

---

## [Ansible Nested Loop Question](https://forum.ansible.com/t/ansible-nested-loop-question/35418)

<div class="topic-metadata">

**Author:** [@L\_Jankok](https://forum.ansible.com/u/L_Jankok)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 11:13am UTC](https://forum.ansible.com/t/ansible-nested-loop-question/35418 "2021-06-27T11:13:42Z")

</div>

Hi there, I am using the following tasks to iterate over all policy-maps (outer loop) and I would also like to iterate over all class-maps into each policy-map (inner-loop) name: Gather all policy-maps ansible.utils.…

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

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