# Latest

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

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

**Page:** 294

---

## [python api return code. when task fails](https://forum.ansible.com/t/python-api-return-code-when-task-fails/35402)

<div class="topic-metadata">

**Author:** [@Mario\_Garcia](https://forum.ansible.com/u/Mario_Garcia)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 2:10pm UTC](https://forum.ansible.com/t/python-api-return-code-when-task-fails/35402 "2021-06-24T14:10:53Z")

</div>

I am running the python api to develop an inhouse script but the script returns always 0 even if a task failed. how can we capture the task exit code.? the python script always returns 0 even per instance there is a cop…

---

## [Ingress resource:Scheduled for sync](https://forum.ansible.com/t/ingress-resource-scheduled-for-sync/35400)

<div class="topic-metadata">

**Author:** [@Tapan\_Behera1](https://forum.ansible.com/u/Tapan_Behera1)\
**Replies:** 0\
**Last updated:** [June 24, 2021, 3:53am UTC](https://forum.ansible.com/t/ingress-resource-scheduled-for-sync/35400 "2021-06-24T03:53:22Z")

</div>

Hi All, I am trying to configure https for AWX tower Ingress resource is showing “scheduled for sync” Events: Type Reason Age From Message Normal Sync 39m (x2 over 3d20h) nginx-ingress-controller Scheduled for sync …

---

## [How to list installed and available versions of packages](https://forum.ansible.com/t/how-to-list-installed-and-available-versions-of-packages/35399)

<div class="topic-metadata">

**Author:** [@Ozgur\_G](https://forum.ansible.com/u/Ozgur_G)\
**Replies:** 0\
**Last updated:** [June 23, 2021, 10:59pm UTC](https://forum.ansible.com/t/how-to-list-installed-and-available-versions-of-packages/35399 "2021-06-23T22:59:15Z")

</div>

Hi - I posted in ansible project group by mistake. How can I iterate over variable yum\_output results? Task I want to script is roughly like this name: List installed and available versions of packages. yum: list:…

---

## [Handling REST API output with json\_query](https://forum.ansible.com/t/handling-rest-api-output-with-json-query/35393)

<div class="topic-metadata">

**Author:** [@Mike\_Cifelli](https://forum.ansible.com/u/Mike_Cifelli)\
**Replies:** 1\
**Last updated:** [June 23, 2021, 6:16pm UTC](https://forum.ansible.com/t/handling-rest-api-output-with-json-query/35393 "2021-06-23T18:16:06Z")

</div>

Seeking assistance with properly parsing returned json data, storing desired string as variable, to then append it in another play that updates a resource. Essentially I am interacting with Cisco ISE APIs to manage/updat…

---

## [Need clairifictions/help for dynamic tagging](https://forum.ansible.com/t/need-clairifictions-help-for-dynamic-tagging/35397)

<div class="topic-metadata">

**Author:** [@madeinindia.dot](https://forum.ansible.com/u/madeinindia.dot)\
**Replies:** 1\
**Last updated:** [June 23, 2021, 4:18pm UTC](https://forum.ansible.com/t/need-clairifictions-help-for-dynamic-tagging/35397 "2021-06-23T16:18:00Z")

</div>

problem statement: we have a playbook that we’re looking to use but do not own, playbook has a number of tags that we’ll need to use to skip several tags that will impact our application. In order to enforce tower RBAC,…

---

## [Sort ansible\_facts.packages|dict2items](https://forum.ansible.com/t/sort-ansible-facts-packages-dict2items/35392)

<div class="topic-metadata">

**Author:** [@Vino\_B](https://forum.ansible.com/u/Vino_B)\
**Replies:** 6\
**Last updated:** [June 23, 2021, 9:59am UTC](https://forum.ansible.com/t/sort-ansible-facts-packages-dict2items/35392 "2021-06-23T09:59:40Z")

</div>

Hi All, Request your help on how to sort a dict2item “{{ ansible\_facts.packages|dict2items }}”

---

## [Loop over vars not working](https://forum.ansible.com/t/loop-over-vars-not-working/34810)

<div class="topic-metadata">

**Author:** [@Sharon\_Day](https://forum.ansible.com/u/Sharon_Day)\
**Replies:** 5\
**Last updated:** [June 23, 2021, 5:59am UTC](https://forum.ansible.com/t/loop-over-vars-not-working/34810 "2021-06-23T05:59:09Z")

</div>

I have a playbook that is doing two lookup for the next available Infoblox network subnet in two different networks. I set the facts and I’m trying to loop over the results of the two lookups. I print the results of the …

---

## [How to start Postgres service via pg\_ctl in Ansible in background?](https://forum.ansible.com/t/how-to-start-postgres-service-via-pg-ctl-in-ansible-in-background/35394)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 0\
**Last updated:** [June 22, 2021, 11:49pm UTC](https://forum.ansible.com/t/how-to-start-postgres-service-via-pg-ctl-in-ansible-in-background/35394 "2021-06-22T23:49:52Z")

</div>

Ansible 2.11.0 and PostgreSQL 13 I’m using the PostgreSQL binaries to start the PostgreSQL service in Ansible, like this name: “Start PostgreSQL version {{ pg\_version }} service” win\_shell: “pg\_ctl.exe -D {{ pg\_data\_…

---

## [Ansible win\_file can not create a directory on a partitioned drive?](https://forum.ansible.com/t/ansible-win-file-can-not-create-a-directory-on-a-partitioned-drive/35388)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 2\
**Last updated:** [June 22, 2021, 11:46pm UTC](https://forum.ansible.com/t/ansible-win-file-can-not-create-a-directory-on-a-partitioned-drive/35388 "2021-06-22T23:46:03Z")

</div>

Ansible 2.11.0 I created an I: disk partition on my Windows 2019 host under jenkins user, who is an admin. Logged in as jenkins, I can create a directory on the partition through the GUI. Now I have this Ansible task t…

---

## [New releases: ansible-core 2.11.2, ansible-base 2.10.11, ansible 2.9.23](https://forum.ansible.com/t/new-releases-ansible-core-2-11-2-ansible-base-2-10-11-ansible-2-9-23/35391)

<div class="topic-metadata">

**Author:** [@relrod](https://forum.ansible.com/u/relrod)\
**Replies:** 0\
**Last updated:** [June 22, 2021, 2:23pm UTC](https://forum.ansible.com/t/new-releases-ansible-core-2-11-2-ansible-base-2-10-11-ansible-2-9-23/35391 "2021-06-22T14:23:17Z")

</div>

Hi all- we're happy to announce the general release of ansible-core 2.11.2, ansible-base 2.10.11, and ansible 2.9.23. These releases fix a templating security issue, CVE-2021-3583, in addition to several other bugs. H…

---

## [Is there a way to prevent debug module not to print passwords.](https://forum.ansible.com/t/is-there-a-way-to-prevent-debug-module-not-to-print-passwords/35390)

<div class="topic-metadata">

**Author:** [@anil\_reddy](https://forum.ansible.com/u/anil_reddy)\
**Replies:** 1\
**Last updated:** [June 22, 2021, 1:03pm UTC](https://forum.ansible.com/t/is-there-a-way-to-prevent-debug-module-not-to-print-passwords/35390 "2021-06-22T13:03:06Z")

</div>

Hi Team, I am able to print password using debug module even though the password is marked as secret in the credential type. Is there a way to prevent debug module to not to print the password when it is marked as secr…

---

## [Block of include\_tasks with handler/notify](https://forum.ansible.com/t/block-of-include-tasks-with-handler-notify/35389)

<div class="topic-metadata">

**Author:** [@Stefan\_Engel](https://forum.ansible.com/u/Stefan_Engel)\
**Replies:** 3\
**Last updated:** [June 22, 2021, 8:00am UTC](https://forum.ansible.com/t/block-of-include-tasks-with-handler-notify/35389 "2021-06-22T08:00:14Z")

</div>

Hi, Im trying to achieve the following: creating a block with multiple include tasks If any of the tasks change, write the config and sync to HA device (F5) tasks: name: F5 Vanity VIP update in all DC’s block: nam…

---

## [would like to skip unzip if directory exist](https://forum.ansible.com/t/would-like-to-skip-unzip-if-directory-exist/35085)

<div class="topic-metadata">

**Author:** [@jyanga](https://forum.ansible.com/u/jyanga)\
**Replies:** 1\
**Last updated:** [June 22, 2021, 1:52am UTC](https://forum.ansible.com/t/would-like-to-skip-unzip-if-directory-exist/35085 "2021-06-22T01:52:26Z")

</div>

Hi! I would like to skip the unzip of my task if the directory already exists. Here are my info. contents of playbook: install\_zip.yml

---

## [Using delegate\_to: localhost on Windows servers not working as expected](https://forum.ansible.com/t/using-delegate-to-localhost-on-windows-servers-not-working-as-expected/35386)

<div class="topic-metadata">

**Author:** [@shane.do](https://forum.ansible.com/u/shane.do)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 11:09pm UTC](https://forum.ansible.com/t/using-delegate-to-localhost-on-windows-servers-not-working-as-expected/35386 "2021-06-21T23:09:30Z")

</div>

Hi all, I’ve got a playbook that I’ve run on some linux servers for a long time without issue. I’m trying to expand this to cover some windows servers but having an issue with delegate\_to. Basically, we need something …

---

## [WSL2 Molecule testing Windows playbooks](https://forum.ansible.com/t/wsl2-molecule-testing-windows-playbooks/35310)

<div class="topic-metadata">

**Author:** [@John\_Menke](https://forum.ansible.com/u/John_Menke)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 10:03pm UTC](https://forum.ansible.com/t/wsl2-molecule-testing-windows-playbooks/35310 "2021-06-21T22:03:27Z")

</div>

I am new to Molecule and I have finally got the docker driver running from within WSL2. This covers the Linux hosts I have but we also have Windows hosts that I need to test for. is Vagrant the best option for this? Sho…

---

## [How to execute commands on a VM running on a remote host?](https://forum.ansible.com/t/how-to-execute-commands-on-a-vm-running-on-a-remote-host/35378)

<div class="topic-metadata">

**Author:** [@Peter\_Gebirgslok](https://forum.ansible.com/u/Peter_Gebirgslok)\
**Replies:** 4\
**Last updated:** [June 21, 2021, 9:00pm UTC](https://forum.ansible.com/t/how-to-execute-commands-on-a-vm-running-on-a-remote-host/35378 "2021-06-21T21:00:50Z")

</div>

Hello Guys, I have Ansible installed on a jumphost. From the jumphost I can reach several servers (with different IPs), each running a virtual machine (that VM has the same IP on each server). I need to read the inform…

---

## [Will 17.0 version have some minor updates ?](https://forum.ansible.com/t/will-17-0-version-have-some-minor-updates/35380)

<div class="topic-metadata">

**Author:** [@Aurelien1](https://forum.ansible.com/u/Aurelien1)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 8:59pm UTC](https://forum.ansible.com/t/will-17-0-version-have-some-minor-updates/35380 "2021-06-21T20:59:42Z")

</div>

Hello there, since version 18, docker is not supported as a production version for awx. For several reasons, I can’t install awx on kubernetes at the moment, so for now I stay on the 17.1.0 version which the last suppo…

---

## [Need clarification on set\_fact module](https://forum.ansible.com/t/need-clarification-on-set-fact-module/35383)

<div class="topic-metadata">

**Author:** [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Replies:** 5\
**Last updated:** [June 21, 2021, 6:58pm UTC](https://forum.ansible.com/t/need-clarification-on-set-fact-module/35383 "2021-06-21T18:58:44Z")

</div>

Ansible documentation for set\_fact module says “Set cacheable to yes to save variables across executions using a fact cache”. So my understanding is that setting ‘cacheable: yes’ would make the contents of custom variabl…

---

## [need help on  assigning a variable when string  contains](https://forum.ansible.com/t/need-help-on-assigning-a-variable-when-string-contains/35382)

<div class="topic-metadata">

**Author:** [@Sridhar\_Sambu](https://forum.ansible.com/u/Sridhar_Sambu)\
**Replies:** 2\
**Last updated:** [June 21, 2021, 6:45pm UTC](https://forum.ansible.com/t/need-help-on-assigning-a-variable-when-string-contains/35382 "2021-06-21T18:45:21Z")

</div>

name: abc set\_fact: Var1: “TestVarable” when: “{{‘prod’ in env}}” I will pass env as prod so it should pick var1 as Testvariable. Please help on correct syntax

---

## [Documenting Playbooks](https://forum.ansible.com/t/documenting-playbooks/35384)

<div class="topic-metadata">

**Author:** [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 5:29pm UTC](https://forum.ansible.com/t/documenting-playbooks/35384 "2021-06-21T17:29:06Z")

</div>

All, we are in the process of switching from another product to ansible at work. So we are working on our “how we want to operate” type stuff, to fill in gaps we currently have. So, we are documenting roles in a README …

---

## [Collecting key/value from json with ansible](https://forum.ansible.com/t/collecting-key-value-from-json-with-ansible/35381)

<div class="topic-metadata">

**Author:** [@Rodrigues](https://forum.ansible.com/u/Rodrigues)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 11:57am UTC](https://forum.ansible.com/t/collecting-key-value-from-json-with-ansible/35381 "2021-06-21T11:57:14Z")

</div>

Hi all, I have the below json data, however i’m having a hard time collecting the two keys i’m interested. which is parent\_path and id I can get to a single value using this, however i’d like to loop through all of ite…

---

## [How do you backup/copy a single Project?](https://forum.ansible.com/t/how-do-you-backup-copy-a-single-project/35379)

<div class="topic-metadata">

**Author:** [@Balaji1](https://forum.ansible.com/u/Balaji1)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 7:00am UTC](https://forum.ansible.com/t/how-do-you-backup-copy-a-single-project/35379 "2021-06-21T07:00:19Z")

</div>

Hello All, How do you backup/copy a single Project, template and related credentials in an Ansible AWX and restore it to a different AWX? Thanks,

---

## [failing to run playbook](https://forum.ansible.com/t/failing-to-run-playbook/35377)

<div class="topic-metadata">

**Author:** [@nitesh\_shet](https://forum.ansible.com/u/nitesh_shet)\
**Replies:** 3\
**Last updated:** [June 20, 2021, 2:01pm UTC](https://forum.ansible.com/t/failing-to-run-playbook/35377 "2021-06-20T14:01:58Z")

</div>

Hi experts, I am running below playbook :-

---

## [Batch size (serial) and playbook failing](https://forum.ansible.com/t/batch-size-serial-and-playbook-failing/35371)

<div class="topic-metadata">

**Author:** [@Go\_Away](https://forum.ansible.com/u/Go_Away)\
**Replies:** 4\
**Last updated:** [June 19, 2021, 10:12am UTC](https://forum.ansible.com/t/batch-size-serial-and-playbook-failing/35371 "2021-06-19T10:12:47Z")

</div>

Hi. I have a list of hosts of which some will always be unreachable or the tasks in playbook will otherwise fail. I have no problem with it. I cannot however understand why if I add “serial: 4” in my playbook and first …

---

## [Ansible best practices: idempotance](https://forum.ansible.com/t/ansible-best-practices-idempotance/35376)

<div class="topic-metadata">

**Author:** [@Jane\_Prusakova](https://forum.ansible.com/u/Jane_Prusakova)\
**Replies:** 17\
**Last updated:** [June 19, 2021, 5:06am UTC](https://forum.ansible.com/t/ansible-best-practices-idempotance/35376 "2021-06-19T05:06:16Z")

</div>

I am new to Ansible, and am trying to understand its best practices. My team uses Ansible for system setup and product deployment. I am reading that idempotance is the foundational virtue, where playbook idempotence is …

---

## [failed to create directory in windows remote machine](https://forum.ansible.com/t/failed-to-create-directory-in-windows-remote-machine/33663)

<div class="topic-metadata">

**Author:** [@P\_R\_Music\_video\_s](https://forum.ansible.com/u/P_R_Music_video_s)\
**Replies:** 7\
**Last updated:** [June 18, 2021, 8:43pm UTC](https://forum.ansible.com/t/failed-to-create-directory-in-windows-remote-machine/33663 "2021-06-18T20:43:12Z")

</div>

hi all please tell the solution for this problem “changed”: false, “msg”: "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target director…

---

## [Idempotency in amazon..aws.ec2\_instance](https://forum.ansible.com/t/idempotency-in-amazon-aws-ec2-instance/35374)

<div class="topic-metadata">

**Author:** [@Tim\_Diggins](https://forum.ansible.com/u/Tim_Diggins)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 6:24pm UTC](https://forum.ansible.com/t/idempotency-in-amazon-aws-ec2-instance/35374 "2021-06-18T18:24:51Z")

</div>

Hi when you run use “ec2” module to create an ec2 instance you can specify an id parameter to provide the client token for idempotency. I can’t see an equivalent in ec2\_instance - there’s instance\_ids, but this seems t…

---

## [increase serial value of bind zone](https://forum.ansible.com/t/increase-serial-value-of-bind-zone/35373)

<div class="topic-metadata">

**Author:** [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 6:04pm UTC](https://forum.ansible.com/t/increase-serial-value-of-bind-zone/35373 "2021-06-18T18:04:49Z")

</div>

Hello to everyone i have to change a value inside bind zone the problem is how i can increase the serial of the zone? example file attached

---

## [Test connectivity onto windows hosts](https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369)

<div class="topic-metadata">

**Author:** [@omoeko](https://forum.ansible.com/u/omoeko)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 2:00pm UTC](https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369 "2021-06-18T14:00:23Z")

</div>

Hi All, I have got an ansible tower setup, I am trying to test out which servers my saved credential has access to. To this effect, I am wondering what is the best way to achive this task ? Create a dynamic inventory a…

---

## [upgrade awx 9.1.0 to 17.1.0](https://forum.ansible.com/t/upgrade-awx-9-1-0-to-17-1-0/35368)

<div class="topic-metadata">

**Author:** [@Andrew\_Meyer1](https://forum.ansible.com/u/Andrew_Meyer1)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 8:34pm UTC](https://forum.ansible.com/t/upgrade-awx-9-1-0-to-17-1-0/35368 "2021-06-17T20:34:38Z")

</div>

In my quest to upgrade AWX to a more somewhat recent version I am getting hit with the following error: TASK \[local\_docker : Stop AWX before upgrading postgres\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

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

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