# Ansible Project

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

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

**Page:** 72

---

## [Install a french version of SQLServer on an english windows server with ansible](https://forum.ansible.com/t/install-a-french-version-of-sqlserver-on-an-english-windows-server-with-ansible/35403)

<div class="topic-metadata">

**Author:** [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Replies:** 1\
**Last updated:** [June 26, 2021, 1:49pm UTC](https://forum.ansible.com/t/install-a-french-version-of-sqlserver-on-an-english-windows-server-with-ansible/35403 "2021-06-26T13:49:52Z")

</div>

Hi, I try to silently install a french version of SQLServer (this is not my idea, it's become this is the licensed version we have) with ansible using some code like this (I already installed MUI French lang pack via an…

---

## [How to copy a file from windows to linux](https://forum.ansible.com/t/how-to-copy-a-file-from-windows-to-linux/35416)

<div class="topic-metadata">

**Author:** [@senguler](https://forum.ansible.com/u/senguler)\
**Replies:** 7\
**Last updated:** [June 26, 2021, 11:21am UTC](https://forum.ansible.com/t/how-to-copy-a-file-from-windows-to-linux/35416 "2021-06-26T11:21:23Z")

</div>

Hi all, I want to copy a file from windows to linux but I cannot do that. I trıed win\_copy module and remote\_src=yes and job was success but the file did not exist on target machine. Where I am wrong. Thanks for helps.

---

## [How to get the hostname into jinja file](https://forum.ansible.com/t/how-to-get-the-hostname-into-jinja-file/35408)

<div class="topic-metadata">

**Author:** [@Abdulrazzaq\_shaik](https://forum.ansible.com/u/Abdulrazzaq_shaik)\
**Replies:** 1\
**Last updated:** [June 26, 2021, 6:20am UTC](https://forum.ansible.com/t/how-to-get-the-hostname-into-jinja-file/35408 "2021-06-26T06:20:34Z")

</div>

Hi Folks, Thank you for reading this. My expectation is to get the hostname from the inventory file, please help how to get this. Jinjafile : teaserverurl: “http://{{tibcoteahost}}:8777/tea” vars file : tibco\_tea\_g…

---

## [How to manage different password for different group with same hostname](https://forum.ansible.com/t/how-to-manage-different-password-for-different-group-with-same-hostname/35417)

<div class="topic-metadata">

**Author:** [@Dhineshkumar\_Chandra](https://forum.ansible.com/u/Dhineshkumar_Chandra)\
**Replies:** 0\
**Last updated:** [June 25, 2021, 9:03pm UTC](https://forum.ansible.com/t/how-to-manage-different-password-for-different-group-with-same-hostname/35417 "2021-06-25T21:03:27Z")

</div>

How to manage different password for different group with same hostname ? Ex., \[group1\] test-01 ansible\_sudo\_pass=‘pass1’ ansible\_ssh\_pass=‘pass1’ test-02 test-03 test-04 \[group2\] test-01 ansible\_sudo\_pass=‘pass3…

---

## [Creating a Group and Project within a group with gitlab module](https://forum.ansible.com/t/creating-a-group-and-project-within-a-group-with-gitlab-module/35395)

<div class="topic-metadata">

**Author:** [@Michael\_Weiner](https://forum.ansible.com/u/Michael_Weiner)\
**Replies:** 3\
**Last updated:** [June 25, 2021, 7:43pm UTC](https://forum.ansible.com/t/creating-a-group-and-project-within-a-group-with-gitlab-module/35395 "2021-06-25T19:43:10Z")

</div>

Hi all, I want to create a group in gitlab, and within that group create a project. Any suggestions? I can run the gitlab\_group module, and it does create, what appears to be a subgroup but not a project within that gr…

---

## [Using a variable in a loop](https://forum.ansible.com/t/using-a-variable-in-a-loop/35414)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 3\
**Last updated:** [June 25, 2021, 7:17pm UTC](https://forum.ansible.com/t/using-a-variable-in-a-loop/35414 "2021-06-25T19:17:29Z")

</div>

I’m trying to look through a loop of users to get their email addresses from an IPA server. When I run it, I get an error stating that “name” is an undefined variable. Can anyone see what I’m doing wrong?

---

## [Merging two dictionaries from different files.](https://forum.ansible.com/t/merging-two-dictionaries-from-different-files/35415)

<div class="topic-metadata">

**Author:** [@Steve\_Button](https://forum.ansible.com/u/Steve_Button)\
**Replies:** 1\
**Last updated:** [June 25, 2021, 6:57pm UTC](https://forum.ansible.com/t/merging-two-dictionaries-from-different-files/35415 "2021-06-25T18:57:05Z")

</div>

I’m have two files one which represents the default case, and another for a specific environment. variables/all.yml: all: vars: myapp: COMPONENT\_NAME: “app” (and another hundred or so default settings for myapp) v…

---

## [Issue with folder permissions with a playbook](https://forum.ansible.com/t/issue-with-folder-permissions-with-a-playbook/35412)

<div class="topic-metadata">

**Author:** [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Replies:** 2\
**Last updated:** [June 25, 2021, 6:18pm UTC](https://forum.ansible.com/t/issue-with-folder-permissions-with-a-playbook/35412 "2021-06-25T18:18:53Z")

</div>

We have a bash script that creates some folders and puts some ACLs on them, and we’re trying to do this with an Ansible playbook. When we run the bash script, the group permission is rwx like we want, but when running th…

---

## [find ansible\_fqdn and default\_ipv4.address with ansible hostvars](https://forum.ansible.com/t/find-ansible-fqdn-and-default-ipv4-address-with-ansible-hostvars/35413)

<div class="topic-metadata">

**Author:** [@Gustave\_Pablo](https://forum.ansible.com/u/Gustave_Pablo)\
**Replies:** 0\
**Last updated:** [June 25, 2021, 6:14pm UTC](https://forum.ansible.com/t/find-ansible-fqdn-and-default-ipv4-address-with-ansible-hostvars/35413 "2021-06-25T18:14:04Z")

</div>

There are my .j2 template and playbook to generate hostname, fqdn and ipv4 for all manage node → vi hosts.j2 {% for i in groups\[‘all’\] %} {{ hostvars\[i\].inventory\_hostname }} {{hostvars\[i\].ansible\_fqdn }} {{hostvar…

---

## [how to rewrite this  the proper way?](https://forum.ansible.com/t/how-to-rewrite-this-the-proper-way/35406)

<div class="topic-metadata">

**Author:** [@Gregory\_Edigarov](https://forum.ansible.com/u/Gregory_Edigarov)\
**Replies:** 1\
**Last updated:** [June 25, 2021, 9:15am UTC](https://forum.ansible.com/t/how-to-rewrite-this-the-proper-way/35406 "2021-06-25T09:15:03Z")

</div>

Hello here’s my playbook, I am looking for interface without IP:

---

## [error creating a directory](https://forum.ansible.com/t/error-creating-a-directory/33270)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 5\
**Last updated:** [June 24, 2021, 3:15pm UTC](https://forum.ansible.com/t/error-creating-a-directory/33270 "2021-06-24T15:15:15Z")

</div>

---

## [Run Postgres queries on a Windows target?](https://forum.ansible.com/t/run-postgres-queries-on-a-windows-target/35396)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 2:52pm UTC](https://forum.ansible.com/t/run-postgres-queries-on-a-windows-target/35396 "2021-06-24T14:52:02Z")

</div>

I’m aware that the postgres\_\* modules only run on Linux. Is there a way to run Postgres queries on a Windows target? For example, I want to CREATE DATABASE myDB Thanks, Chris

---

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

---

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

---

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

---

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

---

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

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

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