# Ansible Project

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

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

**Page:** 123

---

## [Unable to run command on windows. Please explain!](https://forum.ansible.com/t/unable-to-run-command-on-windows-please-explain/33056)

<div class="topic-metadata">

**Author:** [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Replies:** 1\
**Last updated:** [May 30, 2020, 5:45am UTC](https://forum.ansible.com/t/unable-to-run-command-on-windows-please-explain/33056 "2020-05-30T05:45:36Z")

</div>

Hi, I am unable to run command and throws an error. What am I doing wrong? Please explain! Thanks “ansible\_facts”: { “discovered\_interpreter\_python”: “/usr/bin/python” }, “changed”: false, “module\_stderr”: "Exceptio…

---

## [reuse of paramter value inside configuration file](https://forum.ansible.com/t/reuse-of-paramter-value-inside-configuration-file/33054)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 1\
**Last updated:** [May 29, 2020, 8:50pm UTC](https://forum.ansible.com/t/reuse-of-paramter-value-inside-configuration-file/33054 "2020-05-29T20:50:09Z")

</div>

Hi, I’m running a playbook that create a user on remote server and also, generate keytab file for that user based on domain properties. I have a configuration file that holds the username , uid and some other informati…

---

## [Executing a role dependency on all hosts in a list before executing main role](https://forum.ansible.com/t/executing-a-role-dependency-on-all-hosts-in-a-list-before-executing-main-role/33053)

<div class="topic-metadata">

**Author:** [@quaffles](https://forum.ansible.com/u/quaffles)\
**Replies:** 0\
**Last updated:** [May 29, 2020, 8:10pm UTC](https://forum.ansible.com/t/executing-a-role-dependency-on-all-hosts-in-a-list-before-executing-main-role/33053 "2020-05-29T20:10:15Z")

</div>

I’m relatively new to Ansible and I have a question about role dependencies. Is it possible to have a dependency execute on all hosts in a hostList before proceeding to perform the tasks of the given role Just a sudo c…

---

## [Parsing results](https://forum.ansible.com/t/parsing-results/33023)

<div class="topic-metadata">

**Author:** [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Replies:** 8\
**Last updated:** [May 29, 2020, 5:19pm UTC](https://forum.ansible.com/t/parsing-results/33023 "2020-05-29T17:19:38Z")

</div>

Hello All, I have a script below that will get the instance ID and the subnet ID and then out put the information. I am using the module ec2\_instance\_info https://docs.ansible.com/ansible/latest/modules/ec2\_instance\_inf…

---

## [Restricting Commands after privilege escalation using sudo in ansible.](https://forum.ansible.com/t/restricting-commands-after-privilege-escalation-using-sudo-in-ansible/33049)

<div class="topic-metadata">

**Author:** [@varun\_mohan](https://forum.ansible.com/u/varun_mohan)\
**Replies:** 1\
**Last updated:** [May 29, 2020, 10:46am UTC](https://forum.ansible.com/t/restricting-commands-after-privilege-escalation-using-sudo-in-ansible/33049 "2020-05-29T10:46:16Z")

</div>

Hi, Currently ansible uses wrapper scripts(shell/python) for executing commands as privileged user suing sudo. Due to this its currently not possible to restrict what commands ansible fires on the remote machine after p…

---

## [Question: how to Use name of shell script as value to variable and execute it](https://forum.ansible.com/t/question-how-to-use-name-of-shell-script-as-value-to-variable-and-execute-it/33048)

<div class="topic-metadata">

**Author:** [@Adam\_Memon](https://forum.ansible.com/u/Adam_Memon)\
**Replies:** 0\
**Last updated:** [May 29, 2020, 10:31am UTC](https://forum.ansible.com/t/question-how-to-use-name-of-shell-script-as-value-to-variable-and-execute-it/33048 "2020-05-29T10:31:46Z")

</div>

Hi All, I have a requirement to login to multiple application servers and just run different scripts individually on different servers Rather than creating task for each server - I would like to just create one task wi…

---

## [Issue with lineinfile module #69739](https://forum.ansible.com/t/issue-with-lineinfile-module-69739/33045)

<div class="topic-metadata">

**Author:** [@Amith\_sha](https://forum.ansible.com/u/Amith_sha)\
**Replies:** 1\
**Last updated:** [May 29, 2020, 6:14am UTC](https://forum.ansible.com/t/issue-with-lineinfile-module-69739/33045 "2020-05-29T06:14:45Z")

</div>

SUMMARY Tried to write a line using lineinfule module sequentially were observed that the random lines are missed to write on the file.

---

## [authorized\_keys module is deleting too many line when using state: absent](https://forum.ansible.com/t/authorized-keys-module-is-deleting-too-many-line-when-using-state-absent/33039)

<div class="topic-metadata">

**Author:** [@Mario\_Garcia](https://forum.ansible.com/u/Mario_Garcia)\
**Replies:** 8\
**Last updated:** [May 28, 2020, 11:56pm UTC](https://forum.ansible.com/t/authorized-keys-module-is-deleting-too-many-line-when-using-state-absent/33039 "2020-05-28T23:56:48Z")

</div>

Hello I need to clean up a bit the authorized keys files on our infra i created a simple palybook that goes and removed one key from the remote authorized\_keys files but when I run it in check/diff mode i see it tried …

---

## [how to execute python script using ansible, python script running on different sub-directory under same project folder](https://forum.ansible.com/t/how-to-execute-python-script-using-ansible-python-script-running-on-different-sub-directory-under-same-project-folder/33030)

<div class="topic-metadata">

**Author:** [@aditya\_govindaraju](https://forum.ansible.com/u/aditya_govindaraju)\
**Replies:** 8\
**Last updated:** [May 28, 2020, 8:20pm UTC](https://forum.ansible.com/t/how-to-execute-python-script-using-ansible-python-script-running-on-different-sub-directory-under-same-project-folder/33030 "2020-05-28T20:20:59Z")

</div>

Am trying to write a playbook in order to execute a python script running on a different subdirectory under the same project folder A python script running on - /home/{username}/project1/reports/test1.py And playbook r…

---

## [How to deal with "virtual" hostnames?](https://forum.ansible.com/t/how-to-deal-with-virtual-hostnames/33043)

<div class="topic-metadata">

**Author:** [@Toni\_Mueller](https://forum.ansible.com/u/Toni_Mueller)\
**Replies:** 0\
**Last updated:** [May 28, 2020, 6:52pm UTC](https://forum.ansible.com/t/how-to-deal-with-virtual-hostnames/33043 "2020-05-28T18:52:30Z")

</div>

Hi, I would like to create a data structure which resembles a (virtual) host, but in a replicated fashion. Say, I have a number of nodes, and now I want to create the same "vhost" on a subset of them, for redundancy. …

---

## [SSH in shell command](https://forum.ansible.com/t/ssh-in-shell-command/33040)

<div class="topic-metadata">

**Author:** [@Sivaraman\_P](https://forum.ansible.com/u/Sivaraman_P)\
**Replies:** 1\
**Last updated:** [May 28, 2020, 5:44pm UTC](https://forum.ansible.com/t/ssh-in-shell-command/33040 "2020-05-28T17:44:48Z")

</div>

I am new to ansible, i have the script in the remote machine and the script name is ssh.sh which contains below lines to ssh into some another server and run the script, ssh @${server} "sh /tmp/script.sh" the question …

---

## [Unsupported parameters for (yum) module: enabled](https://forum.ansible.com/t/unsupported-parameters-for-yum-module-enabled/33038)

<div class="topic-metadata">

**Author:** [@sarang\_khulape](https://forum.ansible.com/u/sarang_khulape)\
**Replies:** 2\
**Last updated:** [May 28, 2020, 1:27pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-yum-module-enabled/33038 "2020-05-28T13:27:55Z")

</div>

tasks: name: Start and enable vmtoolsd yum: name=vmtoolsd state=started enabled=yes How to resolve below error ? fatal: \[\<IP\_ADDRESS\>\]: FAILED! =\> {“changed”: false, “msg”: “Unsupported parameters for (yum) module: …

---

## [PureStorage FlashArray Networking Module](https://forum.ansible.com/t/purestorage-flasharray-networking-module/33037)

<div class="topic-metadata">

**Author:** [@Jorge\_Rua1](https://forum.ansible.com/u/Jorge_Rua1)\
**Replies:** 1\
**Last updated:** [May 28, 2020, 11:32am UTC](https://forum.ansible.com/t/purestorage-flasharray-networking-module/33037 "2020-05-28T11:32:34Z")

</div>

Hi all, I am trying to configure some fa devices, as part of that process of configuring them we need to set some network parameters for certain interfaces. I’ve seen there’s a module for FlashBlades\[1\], but not for Fl…

---

## [vmfs device name of datastore](https://forum.ansible.com/t/vmfs-device-name-of-datastore/33031)

<div class="topic-metadata">

**Author:** [@Sadanand\_Alegaonkar](https://forum.ansible.com/u/Sadanand_Alegaonkar)\
**Replies:** 4\
**Last updated:** [May 28, 2020, 11:25am UTC](https://forum.ansible.com/t/vmfs-device-name-of-datastore/33031 "2020-05-28T11:25:34Z")

</div>

Hello All, I am trying to find out vmfs device name i.e. storage Lun number or WWPN (naa.60002ac0000000000000000000000000 ) I searched in vmware datastore facts module not able to get the exact result. Please help me …

---

## [retrive secrets from vault using github token](https://forum.ansible.com/t/retrive-secrets-from-vault-using-github-token/33036)

<div class="topic-metadata">

**Author:** [@Asmitha\_j.s](https://forum.ansible.com/u/Asmitha_j.s)\
**Replies:** 0\
**Last updated:** [May 28, 2020, 11:11am UTC](https://forum.ansible.com/t/retrive-secrets-from-vault-using-github-token/33036 "2020-05-28T11:11:19Z")

</div>

I want retrieve secrets from HashiCorp’s vault in ansible playbook using github token. When I checked the documentation https://docs.ansible.com/ansible/latest/plugins/lookup/hashi\_vault.html, I found auth method can be …

---

## [How to use cloud-init to customize a windows virtual machine in oracle cloud on first boot using ansible](https://forum.ansible.com/t/how-to-use-cloud-init-to-customize-a-windows-virtual-machine-in-oracle-cloud-on-first-boot-using-ansible/31726)

<div class="topic-metadata">

**Author:** [@Rahul\_Rawat](https://forum.ansible.com/u/Rahul_Rawat)\
**Replies:** 4\
**Last updated:** [May 27, 2020, 4:47pm UTC](https://forum.ansible.com/t/how-to-use-cloud-init-to-customize-a-windows-virtual-machine-in-oracle-cloud-on-first-boot-using-ansible/31726 "2020-05-27T16:47:46Z")

</div>

Hi, I have created VM using oci-ansible-modules on oracle cloud. Now, I want to run powershell script on first boot with the use of cloud-init using ansible. Means when my playbook run from ansible role, Firstly, VM c…

---

## [is it possible to  connect ms sql server locally with ansible?](https://forum.ansible.com/t/is-it-possible-to-connect-ms-sql-server-locally-with-ansible/33033)

<div class="topic-metadata">

**Author:** [@vinod\_devops](https://forum.ansible.com/u/vinod_devops)\
**Replies:** 0\
**Last updated:** [May 27, 2020, 3:56pm UTC](https://forum.ansible.com/t/is-it-possible-to-connect-ms-sql-server-locally-with-ansible/33033 "2020-05-27T15:56:15Z")

</div>

is it possible to connect ms sql server locally with ansible? I have paas database, i need to execute sql sripts from ansible control machine. first i need to login into paas db and execute the sql scripts. Thanks vin…

---

## [Using variable to compare stdout parameter](https://forum.ansible.com/t/using-variable-to-compare-stdout-parameter/33024)

<div class="topic-metadata">

**Author:** [@Sivakumar\_Saravanamu](https://forum.ansible.com/u/Sivakumar_Saravanamu)\
**Replies:** 5\
**Last updated:** [May 27, 2020, 11:46am UTC](https://forum.ansible.com/t/using-variable-to-compare-stdout-parameter/33024 "2020-05-27T11:46:33Z")

</div>

Hi I am writing a post build verification task and servers are located in three difference location. US, EU and AU I want to check chrony.conf output so that if servers in group\_names US it should check chrony.conf fi…

---

## [Vm mount iso and install vmware tools](https://forum.ansible.com/t/vm-mount-iso-and-install-vmware-tools/32972)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 15\
**Last updated:** [May 26, 2020, 10:33pm UTC](https://forum.ansible.com/t/vm-mount-iso-and-install-vmware-tools/32972 "2020-05-26T22:33:39Z")

</div>

IS there a playbook or how do i start with installing and upgrading vmware tools on windows vm for VM with no tools installed I need to mount the vmware tools iso run the setup64.exe /S /v “/qn REBOOT=R ADDLOCAL=ALL” …

---

## [Need help on using a variable in when condition](https://forum.ansible.com/t/need-help-on-using-a-variable-in-when-condition/33027)

<div class="topic-metadata">

**Author:** [@Pandu\_jh](https://forum.ansible.com/u/Pandu_jh)\
**Replies:** 1\
**Last updated:** [May 26, 2020, 6:56pm UTC](https://forum.ansible.com/t/need-help-on-using-a-variable-in-when-condition/33027 "2020-05-26T18:56:52Z")

</div>

I have a below task in my playbook. It checks the desired count of the process specified in vars. If a task returned 50 value and since it has 0. my condition gets satisfied which is incorrect. vars: sap\_process\_cou…

---

## [ansible kerberos library is not installed](https://forum.ansible.com/t/ansible-kerberos-library-is-not-installed/33021)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 10\
**Last updated:** [May 26, 2020, 1:45pm UTC](https://forum.ansible.com/t/ansible-kerberos-library-is-not-installed/33021 "2020-05-26T13:45:17Z")

</div>

not sure what happened but this was working last week. now I am getting this error tony@ubuntu:~/windows$ ansible windows -i hosts -m win\_ping -vvvvvvvvv ansible 2.9.0 config file = /etc/ansible/ansible.cfg configur…

---

## [Append to var in group or host var when defined in role default var](https://forum.ansible.com/t/append-to-var-in-group-or-host-var-when-defined-in-role-default-var/33026)

<div class="topic-metadata">

**Author:** [@Laurent\_HENSSEN](https://forum.ansible.com/u/Laurent_HENSSEN)\
**Replies:** 0\
**Last updated:** [May 26, 2020, 11:48am UTC](https://forum.ansible.com/t/append-to-var-in-group-or-host-var-when-defined-in-role-default-var/33026 "2020-05-26T11:48:34Z")

</div>

Hi, I’m trying something which is currently failing. I have a role using a list defined in its default vars. My objective is to use the same var but to be able to “add” more item into the list at group / host var defi…

---

## [how to  divide bulk dynamic  chunk data in to small chunks and pass  from ansible to API](https://forum.ansible.com/t/how-to-divide-bulk-dynamic-chunk-data-in-to-small-chunks-and-pass-from-ansible-to-api/33005)

<div class="topic-metadata">

**Author:** [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Replies:** 1\
**Last updated:** [May 26, 2020, 10:49am UTC](https://forum.ansible.com/t/how-to-divide-bulk-dynamic-chunk-data-in-to-small-chunks-and-pass-from-ansible-to-api/33005 "2020-05-26T10:49:15Z")

</div>

Hi Team Please help me how to divide bulk chunk data in to small chunks so small chunks update to the snow api. below is my playbook and my data is in EPG\_all variable there would be some 5000 lines of data . how i ca…

---

## [facing the problem in mapping network drive](https://forum.ansible.com/t/facing-the-problem-in-mapping-network-drive/32931)

<div class="topic-metadata">

**Author:** [@mahesh\_g\_o](https://forum.ansible.com/u/mahesh_g_o)\
**Replies:** 7\
**Last updated:** [May 26, 2020, 8:44am UTC](https://forum.ansible.com/t/facing-the-problem-in-mapping-network-drive/32931 "2020-05-26T08:44:11Z")

</div>

Hi , help is appreciated playbook:mount.yml hosts: localhost gather\_facts: false vars\_files: /etc/ansible/group\_vars/host\_vars tasks: name: create a mapped drive under Z win\_mapped\_drive: letter: Z path: \\10.23…

---

## [Read the values from file and store in variable.](https://forum.ansible.com/t/read-the-values-from-file-and-store-in-variable/33025)

<div class="topic-metadata">

**Author:** [@Akshay\_Bora](https://forum.ansible.com/u/Akshay_Bora)\
**Replies:** 2\
**Last updated:** [May 26, 2020, 6:53am UTC](https://forum.ansible.com/t/read-the-values-from-file-and-store-in-variable/33025 "2020-05-26T06:53:15Z")

</div>

Hi All, I have a file named as /etc/oraInst.loc. The file contents are as below. inventory\_loc=/u01/app/oraInventory inst\_group=oinstall I need to store the value of inventory\_loc , that is ,/u01/app/oraInventory in …

---

## [ansible shell variable](https://forum.ansible.com/t/ansible-shell-variable/33019)

<div class="topic-metadata">

**Author:** [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Replies:** 4\
**Last updated:** [May 25, 2020, 11:57pm UTC](https://forum.ansible.com/t/ansible-shell-variable/33019 "2020-05-25T23:57:19Z")

</div>

Hello All, I have an ansible script that I am writing to use meta data from an aws ec2 instance. I want to create and image of a list og servers from my inventory file them launch each one, then perform a function then …

---

## [\[WARNING\]: provided hosts list is empty, only localhost is available](https://forum.ansible.com/t/warning-provided-hosts-list-is-empty-only-localhost-is-available/33018)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 8\
**Last updated:** [May 25, 2020, 1:12pm UTC](https://forum.ansible.com/t/warning-provided-hosts-list-is-empty-only-localhost-is-available/33018 "2020-05-25T13:12:02Z")

</div>

---

## [unable to generate backup file with registered variable in ansible](https://forum.ansible.com/t/unable-to-generate-backup-file-with-registered-variable-in-ansible/33012)

<div class="topic-metadata">

**Author:** [@Sadanand\_Alegaonkar](https://forum.ansible.com/u/Sadanand_Alegaonkar)\
**Replies:** 9\
**Last updated:** [May 25, 2020, 12:16pm UTC](https://forum.ansible.com/t/unable-to-generate-backup-file-with-registered-variable-in-ansible/33012 "2020-05-25T12:16:29Z")

</div>

SUMMARY I trynig to take backup of existing file. reported below error ERROR! failed at splitting arguments, either an unbalanced jinja2 block or quotes: cp “{{file.stdout}” “{{file.stdout}}”\_bkp ansible-playbook pb\_D…

---

## [Merge Dictionary](https://forum.ansible.com/t/merge-dictionary/33006)

<div class="topic-metadata">

**Author:** [@Isa](https://forum.ansible.com/u/Isa)\
**Replies:** 6\
**Last updated:** [May 25, 2020, 9:25am UTC](https://forum.ansible.com/t/merge-dictionary/33006 "2020-05-25T09:25:38Z")

</div>

Hi All How can I merge dictionary with the same name. Example: groups\_vars/all \` users: name: jsmith comment: ‘John Smith’ shell: /bin/bash groups: wheel \`\` \` group\_vars/postgresql.yml users: - name: tdoe c…

---

## [AWX (ansible tower) yum module extra variables](https://forum.ansible.com/t/awx-ansible-tower-yum-module-extra-variables/33017)

<div class="topic-metadata">

**Author:** [@Jerry\_Hwang](https://forum.ansible.com/u/Jerry_Hwang)\
**Replies:** 1\
**Last updated:** [May 25, 2020, 5:20am UTC](https://forum.ansible.com/t/awx-ansible-tower-yum-module-extra-variables/33017 "2020-05-25T05:20:39Z")

</div>

Hi, I am trying yum module on AWX (ansible tower). AWX → Inventories → Run command → select module: yum etc. In the “EXTRA VARIABLES” section on AWX WebUI, what I should put in yaml if I want to install wget for examp…

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

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