# Ansible Project

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

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

**Page:** 91

---

## [register variable can't be used in shell module?](https://forum.ansible.com/t/register-variable-cant-be-used-in-shell-module/34476)

<div class="topic-metadata">

**Author:** [@liyo](https://forum.ansible.com/u/liyo)\
**Replies:** 10\
**Last updated:** [January 20, 2021, 8:32am UTC](https://forum.ansible.com/t/register-variable-cant-be-used-in-shell-module/34476 "2021-01-20T08:32:54Z")

</div>

when I edit a playbook test.yml:

---

## [Need permissions changed of folder + files together using Ansible synchronize module](https://forum.ansible.com/t/need-permissions-changed-of-folder-files-together-using-ansible-synchronize-module/34474)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 3:29am UTC](https://forum.ansible.com/t/need-permissions-changed-of-folder-files-together-using-ansible-synchronize-module/34474 "2021-01-20T03:29:34Z")

</div>

Unable to default omit when synchronize attributes are multiline in Ansible Below Ansible works fine when final\_file\_perm is defined: name: Copying from “{{ inventory\_hostname }}” to this ansible server. synchronize: …

---

## [Ansible Playbook Issue](https://forum.ansible.com/t/ansible-playbook-issue/34471)

<div class="topic-metadata">

**Author:** [@Prasath\_Sekar](https://forum.ansible.com/u/Prasath_Sekar)\
**Replies:** 1\
**Last updated:** [January 19, 2021, 7:08pm UTC](https://forum.ansible.com/t/ansible-playbook-issue/34471 "2021-01-19T19:08:22Z")

</div>

I have a ansible playbook file to create a digitalocean droplet. While running the playbook i am getting the issue “dopy \>= 0.3.2 required for this module” But I have already installed dopy 0.3.5 What would be the is…

---

## [Determine last host in host list](https://forum.ansible.com/t/determine-last-host-in-host-list/34463)

<div class="topic-metadata">

**Author:** [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Replies:** 5\
**Last updated:** [January 19, 2021, 5:53pm UTC](https://forum.ansible.com/t/determine-last-host-in-host-list/34463 "2021-01-19T17:53:31Z")

</div>

I need to determine how many hosts are left to be worked on in a playbook run. I have set serial to 1 in the playbook so only one host will be worked on at a time, and I have a long pause at the bottom of the playbook to…

---

## [Accessing playbook variables in external script](https://forum.ansible.com/t/accessing-playbook-variables-in-external-script/34470)

<div class="topic-metadata">

**Author:** [@Amjad\_Saleem1](https://forum.ansible.com/u/Amjad_Saleem1)\
**Replies:** 0\
**Last updated:** [January 19, 2021, 3:34pm UTC](https://forum.ansible.com/t/accessing-playbook-variables-in-external-script/34470 "2021-01-19T15:34:14Z")

</div>

I am doing data validation of all the variables defined in ansible using a python script. How do you access ansible variables in the external python script?

---

## [Assert documentation and possibilities](https://forum.ansible.com/t/assert-documentation-and-possibilities/34469)

<div class="topic-metadata">

**Author:** [@Amjad\_Saleem1](https://forum.ansible.com/u/Amjad_Saleem1)\
**Replies:** 3\
**Last updated:** [January 19, 2021, 3:30pm UTC](https://forum.ansible.com/t/assert-documentation-and-possibilities/34469 "2021-01-19T15:30:39Z")

</div>

Sorry for newbie question but I cannot find any information on what can be done with assert. For example, going through ansible modules in galaxy, I found that you can do something like ‘var is number’ to test that var i…

---

## [New release: ansible-base 2.10.5](https://forum.ansible.com/t/new-release-ansible-base-2-10-5/34466)

<div class="topic-metadata">

**Author:** [@relrod](https://forum.ansible.com/u/relrod)\
**Replies:** 0\
**Last updated:** [January 19, 2021, 12:42am UTC](https://forum.ansible.com/t/new-release-ansible-base-2-10-5/34466 "2021-01-19T00:42:32Z")

</div>

Hi all- we're happy to announce that the general release of ansible-base 2.10.5 is now available! How to get it

---

## [New Ansible release 2.9.17](https://forum.ansible.com/t/new-ansible-release-2-9-17/34465)

<div class="topic-metadata">

**Author:** [@relrod](https://forum.ansible.com/u/relrod)\
**Replies:** 0\
**Last updated:** [January 19, 2021, 12:39am UTC](https://forum.ansible.com/t/new-ansible-release-2-9-17/34465 "2021-01-19T00:39:24Z")

</div>

Hi all- we're happy to announce that the general release of Ansible 2.9.17 is now available! How do you get it?

---

## [Ansible copy module does not preserve permissions of directories but only files](https://forum.ansible.com/t/ansible-copy-module-does-not-preserve-permissions-of-directories-but-only-files/34455)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 4\
**Last updated:** [January 18, 2021, 5:40pm UTC](https://forum.ansible.com/t/ansible-copy-module-does-not-preserve-permissions-of-directories-but-only-files/34455 "2021-01-18T17:40:23Z")

</div>

The actual folder had 777 permissions as seen below: drwxrwxrwx 3 destuser destuser 29 Jan 14 08:40 /tmp/mohtas/folder I took the backup using the below playbook and wanted to preserve the permissions i.e 777 for the…

---

## [Ansible scripts run as expected from cli, not from AWX](https://forum.ansible.com/t/ansible-scripts-run-as-expected-from-cli-not-from-awx/34457)

<div class="topic-metadata">

**Author:** [@chr00ted](https://forum.ansible.com/u/chr00ted)\
**Replies:** 2\
**Last updated:** [January 18, 2021, 4:07pm UTC](https://forum.ansible.com/t/ansible-scripts-run-as-expected-from-cli-not-from-awx/34457 "2021-01-18T16:07:44Z")

</div>

I’ve been using ansible for awhile now and love it. I just installed AWX to try to let some of my junior admins access to ansible through AWX web interface. I’ve never used AWX previously as ansible has been easy for me.…

---

## [Unable to gather virtual machines configuration information from KVM hypervisor](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449)

<div class="topic-metadata">

**Author:** [@Jayan\_Anirudhan](https://forum.ansible.com/u/Jayan_Anirudhan)\
**Replies:** 5\
**Last updated:** [January 15, 2021, 3:09pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449 "2021-01-15T15:09:19Z")

</div>

Hi Team, I am trying to gather the entire configuration details of the virtual machine from KVM hypervisor and created a playbook as mentioned. Play book execution ends up with below mentioned error. I would highly appr…

---

## [Dynamic File/ Template populate.](https://forum.ansible.com/t/dynamic-file-template-populate/34437)

<div class="topic-metadata">

**Author:** [@ursa\_Brown](https://forum.ansible.com/u/ursa_Brown)\
**Replies:** 12\
**Last updated:** [January 15, 2021, 1:05pm UTC](https://forum.ansible.com/t/dynamic-file-template-populate/34437 "2021-01-15T13:05:21Z")

</div>

---

## [help while running sudo in Ansible playbooks](https://forum.ansible.com/t/help-while-running-sudo-in-ansible-playbooks/34446)

<div class="topic-metadata">

**Author:** [@Ramakrishna\_V](https://forum.ansible.com/u/Ramakrishna_V)\
**Replies:** 6\
**Last updated:** [January 15, 2021, 10:45am UTC](https://forum.ansible.com/t/help-while-running-sudo-in-ansible-playbooks/34446 "2021-01-15T10:45:58Z")

</div>

Hi Ansible team, I am Ram. We need some help in running the Ansible playbook ( specifically how to add sudo while running playbooks ). in your environment, we can run all admin related commands with sudo acess ( by addi…

---

## [Ansible --become not working when “sudo with NOPASSWD” is not activated on remote machine - MODULE FAILURE](https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447)

<div class="topic-metadata">

**Author:** [@Mohit\_Dhingra](https://forum.ansible.com/u/Mohit_Dhingra)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 9:06am UTC](https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447 "2021-01-15T09:06:42Z")

</div>

Hi, In remote server, normal user is having sudo access but NOPASSWD not activated. sudo su - command ask for user password. I am trying to run a command using Ansible as providing sudo password but its not working gett…

---

## [SQL Server Dynamic Database Creation using Ansible](https://forum.ansible.com/t/sql-server-dynamic-database-creation-using-ansible/34443)

<div class="topic-metadata">

**Author:** [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Replies:** 7\
**Last updated:** [January 15, 2021, 8:17am UTC](https://forum.ansible.com/t/sql-server-dynamic-database-creation-using-ansible/34443 "2021-01-15T08:17:39Z")

</div>

Hello All, I am trying to create a new database on sql server using the below mentioned ansible playbook. But when I am executing the playbook and in the prompt option putting the database name. It is not taking that …

---

## [Dynamic list of items created on remote side](https://forum.ansible.com/t/dynamic-list-of-items-created-on-remote-side/34439)

<div class="topic-metadata">

**Author:** [@Go\_Away](https://forum.ansible.com/u/Go_Away)\
**Replies:** 5\
**Last updated:** [January 15, 2021, 6:31am UTC](https://forum.ansible.com/t/dynamic-list-of-items-created-on-remote-side/34439 "2021-01-15T06:31:36Z")

</div>

And again I have a non-typical use case. How would you approach such task? I have some servers on which there is a piece of software running that's not configured by me and thus I can't control the configuration with an…

---

## [Using OAUTH2 authentication in REST requests](https://forum.ansible.com/t/using-oauth2-authentication-in-rest-requests/24386)

<div class="topic-metadata">

**Author:** [@Sridhar\_L](https://forum.ansible.com/u/Sridhar_L)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 4:40am UTC](https://forum.ansible.com/t/using-oauth2-authentication-in-rest-requests/24386 "2021-01-15T04:40:17Z")

</div>

Hi, I wanted to use oauth2 based authentication to interact with REST server instead of Basic Auth method. How can I achieve this?

---

## [ansible jira comment section](https://forum.ansible.com/t/ansible-jira-comment-section/34436)

<div class="topic-metadata">

**Author:** [@Ramesh\_AR](https://forum.ansible.com/u/Ramesh_AR)\
**Replies:** 6\
**Last updated:** [January 14, 2021, 11:05pm UTC](https://forum.ansible.com/t/ansible-jira-comment-section/34436 "2021-01-14T23:05:47Z")

</div>

Hi, I have a playbook to retrieve user details and getting the output by using debug module. on same playbook second task to comment the user details in JIRA ticket. any idea how to redirect the debug output to jira mo…

---

## [Request for Comments: Sustainability of Mitogen project](https://forum.ansible.com/t/request-for-comments-sustainability-of-mitogen-project/34435)

<div class="topic-metadata">

**Author:** [@moreati](https://forum.ansible.com/u/moreati)\
**Replies:** 1\
**Last updated:** [January 14, 2021, 9:10pm UTC](https://forum.ansible.com/t/request-for-comments-sustainability-of-mitogen-project/34435 "2021-01-14T21:10:43Z")

</div>

Mitogen is a fast execution engine for that can accelerate Ansible playbooks. https://mitogen.networkgenomics.com/ansible\_detailed.html There is a danger the project could become unmaintainable. It was created by David…

---

## [Options in Mount module for fstab](https://forum.ansible.com/t/options-in-mount-module-for-fstab/34434)

<div class="topic-metadata">

**Author:** [@1793](https://forum.ansible.com/u/1793)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 7:31pm UTC](https://forum.ansible.com/t/options-in-mount-module-for-fstab/34434 "2021-01-14T19:31:31Z")

</div>

Hello there, I have the following task: name: Mount /dev/testvg/testlv mount: path: /test src: /dev/testvg/testlv fstype: xfs opts: defaults state: present I’m using the mount module. I’m trying to achieve inse…

---

## [Microsoft SQL Server Module mssql\_db Not Working to create a Database.](https://forum.ansible.com/t/microsoft-sql-server-module-mssql-db-not-working-to-create-a-database/34159)

<div class="topic-metadata">

**Author:** [@Praveen\_Kumar\_Singh](https://forum.ansible.com/u/Praveen_Kumar_Singh)\
**Replies:** 6\
**Last updated:** [January 14, 2021, 3:06pm UTC](https://forum.ansible.com/t/microsoft-sql-server-module-mssql-db-not-working-to-create-a-database/34159 "2021-01-14T15:06:13Z")

</div>

ISSUE TYPE Feature Idea SUMMARY When I am using the SQL Server Module mssql\_db to create a new database on the microsoft SQL Server I am getting the below error. Microsoft SQL Server is on windows server. I am using …

---

## [Terraform Module - Output Returns Empty after Successful Run.](https://forum.ansible.com/t/terraform-module-output-returns-empty-after-successful-run/34433)

<div class="topic-metadata">

**Author:** [@Bharath\_Annamaneni](https://forum.ansible.com/u/Bharath_Annamaneni)\
**Replies:** 1\
**Last updated:** [January 14, 2021, 10:37am UTC](https://forum.ansible.com/t/terraform-module-output-returns-empty-after-successful-run/34433 "2021-01-14T10:37:19Z")

</div>

Hello Ansible Users, I am trying to run/use the Ansible’s Terraform Module to provision the servers in Public Cloud. The Terraform Code works fine when run manually and through Ansible, but, the Ansible doesn’t return t…

---

## [The playbook only works if everything is define.](https://forum.ansible.com/t/the-playbook-only-works-if-everything-is-define/34440)

<div class="topic-metadata">

**Author:** [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Replies:** 1\
**Last updated:** [January 14, 2021, 9:41am UTC](https://forum.ansible.com/t/the-playbook-only-works-if-everything-is-define/34440 "2021-01-14T09:41:19Z")

</div>

And the question is…?

---

## [Im generating a hosts file based on my inventory](https://forum.ansible.com/t/im-generating-a-hosts-file-based-on-my-inventory/34438)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 0\
**Last updated:** [January 14, 2021, 3:52am UTC](https://forum.ansible.com/t/im-generating-a-hosts-file-based-on-my-inventory/34438 "2021-01-14T03:52:53Z")

</div>

Fix the template https://gist.github.com/vbotka/31cdd229878a72780a72ea412252ab95 \* Expand the items one by one \* Take the first item of \*ansible\_all\_ipv4\_addresses\* (if this is what you want)

---

## [excludes not work as expected with find module in ansible playbook](https://forum.ansible.com/t/excludes-not-work-as-expected-with-find-module-in-ansible-playbook/34431)

<div class="topic-metadata">

**Author:** [@Nithin\_Subbaraj](https://forum.ansible.com/u/Nithin_Subbaraj)\
**Replies:** 4\
**Last updated:** [January 13, 2021, 3:38pm UTC](https://forum.ansible.com/t/excludes-not-work-as-expected-with-find-module-in-ansible-playbook/34431 "2021-01-13T15:38:37Z")

</div>

I have created an ansible playbook which finds files older than 7 days and zips the files. Also trying to exclude files from particular directory but not able to find. I am not able to the exclude the files under sub d…

---

## [ansible-galaxy fails to install roles the second time](https://forum.ansible.com/t/ansible-galaxy-fails-to-install-roles-the-second-time/34430)

<div class="topic-metadata">

**Author:** [@Riain\_Condon](https://forum.ansible.com/u/Riain_Condon)\
**Replies:** 4\
**Last updated:** [January 13, 2021, 12:34pm UTC](https://forum.ansible.com/t/ansible-galaxy-fails-to-install-roles-the-second-time/34430 "2021-01-13T12:34:37Z")

</div>

Hi, I’m using Ansible Galaxy v2.9.15 and attempting to install roles. This is all run as part of a Jenkins pipeline so ansible-galaxy is used across several jobs all installing the same central roles when they’re run. H…

---

## [uri module - post of large file fails](https://forum.ansible.com/t/uri-module-post-of-large-file-fails/34428)

<div class="topic-metadata">

**Author:** [@robbiee.dwyer](https://forum.ansible.com/u/robbiee.dwyer)\
**Replies:** 0\
**Last updated:** [January 13, 2021, 1:54am UTC](https://forum.ansible.com/t/uri-module-post-of-large-file-fails/34428 "2021-01-13T01:54:42Z")

</div>

Hello, I am running into the following urllib limitation.

---

## [python3.8 with ansible2.10.4 “with items” error](https://forum.ansible.com/t/python3-8-with-ansible2-10-4-with-items-error/34426)

<div class="topic-metadata">

**Author:** [@liyo](https://forum.ansible.com/u/liyo)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 1:08am UTC](https://forum.ansible.com/t/python3-8-with-ansible2-10-4-with-items-error/34426 "2021-01-13T01:08:18Z")

</div>

versions ansible version： 2.10.4 system version： CentOS7.9 kernel version: 3.10.0-1160.11.1.el7.x86\_64 bug errorswhen I use the ansible-playbook ,the yml file is below:- name: List images shell: ls /tmp/images regi…

---

## [Windows module error with ansible.legacy.setup  PowerShell -NoProfile -NonInteractive?](https://forum.ansible.com/t/windows-module-error-with-ansible-legacy-setup-powershell-noprofile-noninteractive/34422)

<div class="topic-metadata">

**Author:** [@Ryan\_Nix](https://forum.ansible.com/u/Ryan_Nix)\
**Replies:** 9\
**Last updated:** [January 12, 2021, 10:28pm UTC](https://forum.ansible.com/t/windows-module-error-with-ansible-legacy-setup-powershell-noprofile-noninteractive/34422 "2021-01-12T22:28:32Z")

</div>

Hello, I had my playbook working perfectly until I made what I thought was a small change! I’m running the latest version of Ansible, version 2.10.4. Ansible keeps telling me there is a problem with line 1 but I’m havi…

---

## [List comparison and retireval of items on match](https://forum.ansible.com/t/list-comparison-and-retireval-of-items-on-match/34427)

<div class="topic-metadata">

**Author:** [@Akshay\_Kumar](https://forum.ansible.com/u/Akshay_Kumar)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 6:12pm UTC](https://forum.ansible.com/t/list-comparison-and-retireval-of-items-on-match/34427 "2021-01-12T18:12:35Z")

</div>

Hi All, Good day to all. I am currently working on a scenario where i need to compare two lists and print out the items which match on both lists . List1 : \[‘dba’,‘admin’,‘developer’\] List2 : \[’ user1: dba admin’ , ‘…

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

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