# Ansible Project

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

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

**Page:** 129

---

## [Ansible running script with wrong user](https://forum.ansible.com/t/ansible-running-script-with-wrong-user/32831)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 0\
**Last updated:** [May 2, 2020, 2:00am UTC](https://forum.ansible.com/t/ansible-running-script-with-wrong-user/32831 "2020-05-02T02:00:40Z")

</div>

become: yes + become\_method: sudo forces teh nginx\_user to use root to execute the tasks. Considering you are restarting a service, this seems correct.

---

## [variables in group\_vars and host\_vars do not load when using inventory directory](https://forum.ansible.com/t/variables-in-group-vars-and-host-vars-do-not-load-when-using-inventory-directory/28639)

<div class="topic-metadata">

**Author:** [@myprogramingnotes](https://forum.ansible.com/u/myprogramingnotes)\
**Replies:** 1\
**Last updated:** [May 1, 2020, 2:27pm UTC](https://forum.ansible.com/t/variables-in-group-vars-and-host-vars-do-not-load-when-using-inventory-directory/28639 "2020-05-01T14:27:18Z")

</div>

A playbook I ran, returned this failure: TASK \[create-admin-user : Create the non-root user account\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: \[415.791.30.131\]: FAILED! =\> {"msg": "The task includes an option with an undefined variab…

---

## [Ansible Get vSphere Virtual Machines](https://forum.ansible.com/t/ansible-get-vsphere-virtual-machines/32634)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 5\
**Last updated:** [April 30, 2020, 10:56am UTC](https://forum.ansible.com/t/ansible-get-vsphere-virtual-machines/32634 "2020-04-30T10:56:18Z")

</div>

Hi All, Trying to Output only the Virtual Machine Name: but having issues with the Json output \`

---

## [\--alias on docker\_network](https://forum.ansible.com/t/alias-on-docker-network/32820)

<div class="topic-metadata">

**Author:** [@Javi\_Legido](https://forum.ansible.com/u/Javi_Legido)\
**Replies:** 2\
**Last updated:** [April 30, 2020, 7:26am UTC](https://forum.ansible.com/t/alias-on-docker-network/32820 "2020-04-30T07:26:27Z")

</div>

Good morning. Is ‘–alias’ docker network parameter supported by docker\_network ansible module? Use case: I would like to “ansibilize” below native docker command: \` docker network connect --alias erp.example.com --al…

---

## [Need ansible connection vars to citrix netscalar device](https://forum.ansible.com/t/need-ansible-connection-vars-to-citrix-netscalar-device/32821)

<div class="topic-metadata">

**Author:** [@Venu\_Devannagari](https://forum.ansible.com/u/Venu_Devannagari)\
**Replies:** 0\
**Last updated:** [April 30, 2020, 6:48am UTC](https://forum.ansible.com/t/need-ansible-connection-vars-to-citrix-netscalar-device/32821 "2020-04-30T06:48:37Z")

</div>

Hello Team, I am trying to run some commands through cli\_command but through local action it is not connected when I put connection method as network\_cli I need ansible\_network\_os type but I did not find anywhere.Can yo…

---

## [How to post Unit Test results before/during PR](https://forum.ansible.com/t/how-to-post-unit-test-results-before-during-pr/32818)

<div class="topic-metadata">

**Author:** [@srinivas\_bonthu](https://forum.ansible.com/u/srinivas_bonthu)\
**Replies:** 0\
**Last updated:** [April 29, 2020, 10:29pm UTC](https://forum.ansible.com/t/how-to-post-unit-test-results-before-during-pr/32818 "2020-04-29T22:29:48Z")

</div>

Hi, I am new to github, i would like to work on Ansible Network Product Modules and i read the documentation that states, developer would need to include unit tests before doing PR. How/where do we post the Test result…

---

## [Ansible Multiple virtual machines or templates with same name found.](https://forum.ansible.com/t/ansible-multiple-virtual-machines-or-templates-with-same-name-found/32814)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 4\
**Last updated:** [April 29, 2020, 8:04pm UTC](https://forum.ansible.com/t/ansible-multiple-virtual-machines-or-templates-with-same-name-found/32814 "2020-04-29T20:04:15Z")

</div>

Hi All, Trying to Deploy a Virtual Machine on a Cluster within a DataCenter which appears that a Template with the Same name is on a different Cluster within the Same Datacenter: Looking at the Following from the Doc: …

---

## [define variables for multiple hosts in one file inside host\_vars](https://forum.ansible.com/t/define-variables-for-multiple-hosts-in-one-file-inside-host-vars/32800)

<div class="topic-metadata">

**Author:** [@Momodou\_Fatty](https://forum.ansible.com/u/Momodou_Fatty)\
**Replies:** 10\
**Last updated:** [April 29, 2020, 7:54pm UTC](https://forum.ansible.com/t/define-variables-for-multiple-hosts-in-one-file-inside-host-vars/32800 "2020-04-29T19:54:53Z")

</div>

Let’s say I have two groups of devices to configure, eos-group and junos-group. Let’s focus on junos-group. I have 10 devices in the junos-group. Each device will be configured with a mgmt ip, hostname, interface, rou…

---

## [get name of network  adapter](https://forum.ansible.com/t/get-name-of-network-adapter/32801)

<div class="topic-metadata">

**Author:** [@nikita\_nipon](https://forum.ansible.com/u/nikita_nipon)\
**Replies:** 5\
**Last updated:** [April 29, 2020, 6:54pm UTC](https://forum.ansible.com/t/get-name-of-network-adapter/32801 "2020-04-29T18:54:17Z")

</div>

I need to know the name of the network adapter. Since sometimes it is eth0 and other times ens192 for vwmare and rhev machines is it possible?

---

## [Yum Groupinstall Documentation vs Reality?](https://forum.ansible.com/t/yum-groupinstall-documentation-vs-reality/32812)

<div class="topic-metadata">

**Author:** [@Davide\_Scrimieri](https://forum.ansible.com/u/Davide_Scrimieri)\
**Replies:** 3\
**Last updated:** [April 29, 2020, 1:32pm UTC](https://forum.ansible.com/t/yum-groupinstall-documentation-vs-reality/32812 "2020-04-29T13:32:09Z")

</div>

Hello The documentation here , specifically states Package groups are specified as “@development-tools” During the DO407 exam I was explicitly asked to intsall the Development Tools group. By following the documentati…

---

## [ansible until with number of retries](https://forum.ansible.com/t/ansible-until-with-number-of-retries/32809)

<div class="topic-metadata">

**Author:** [@Ivo\_Hechmann](https://forum.ansible.com/u/Ivo_Hechmann)\
**Replies:** 4\
**Last updated:** [April 29, 2020, 1:08pm UTC](https://forum.ansible.com/t/ansible-until-with-number-of-retries/32809 "2020-04-29T13:08:42Z")

</div>

Hello team, i want to call a shell script from ansible, this script may fail, so ansible should retry the command, lets say 5 tries: name: process something, fail if not 5 files in tmpdir shell: “/home/ivo/workspace/…

---

## [Palo Alto password change](https://forum.ansible.com/t/palo-alto-password-change/32811)

<div class="topic-metadata">

**Author:** [@Zaldy\_B](https://forum.ansible.com/u/Zaldy_B)\
**Replies:** 2\
**Last updated:** [April 29, 2020, 11:45am UTC](https://forum.ansible.com/t/palo-alto-password-change/32811 "2020-04-29T11:45:32Z")

</div>

Hi experts, Have you tried changing palo alto password? I saw a module but its giving me an error: https://docs.ansible.com/ansible/latest/modules/panos\_admpwd\_module.html#parameter-key\_filename ansible-playbook panos…

---

## [copy j2 file to Json on windows server](https://forum.ansible.com/t/copy-j2-file-to-json-on-windows-server/32795)

<div class="topic-metadata">

**Author:** [@shyam.rpms](https://forum.ansible.com/u/shyam.rpms)\
**Replies:** 8\
**Last updated:** [April 29, 2020, 10:04am UTC](https://forum.ansible.com/t/copy-j2-file-to-json-on-windows-server/32795 "2020-04-29T10:04:32Z")

</div>

Hi, Im trying to create a json file using jinja2 template using the following play. The file is not creating and not giving any error. can any one help. - name: creating a config file win\_copy: content: “{{ lookup(‘t…

---

## [ERROR:  Failed to connect to the host via ssh: OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips](https://forum.ansible.com/t/error-failed-to-connect-to-the-host-via-ssh-openssh-7-4p1-openssl-1-0-2k-fips/32796)

<div class="topic-metadata">

**Author:** [@Parasuram\_A\_Havoji](https://forum.ansible.com/u/Parasuram_A_Havoji)\
**Replies:** 3\
**Last updated:** [April 29, 2020, 9:19am UTC](https://forum.ansible.com/t/error-failed-to-connect-to-the-host-via-ssh-openssh-7-4p1-openssl-1-0-2k-fips/32796 "2020-04-29T09:19:56Z")

</div>

Hello, I am seeing the below error while running playbook, i ran playbook with debug enabled and with increased verbose level but not sure of the root cuase of failure. Can someone please help me find the issue; thank y…

---

## [Problem connecting to Windows Server 2008R2 host](https://forum.ansible.com/t/problem-connecting-to-windows-server-2008r2-host/32807)

<div class="topic-metadata">

**Author:** [@Martin\_Lucas](https://forum.ansible.com/u/Martin_Lucas)\
**Replies:** 1\
**Last updated:** [April 29, 2020, 7:42am UTC](https://forum.ansible.com/t/problem-connecting-to-windows-server-2008r2-host/32807 "2020-04-29T07:42:18Z")

</div>

I did some Googling and found ansible\_python\_interpreter which I set to C:\\Program\\ Files\\Python3.7.5. This removed the python not found warning and the output is now: ansible -m ping 192.168.230.3 -vvv ansible 2.8.3 …

---

## [ansible letsencrypt](https://forum.ansible.com/t/ansible-letsencrypt/32806)

<div class="topic-metadata">

**Author:** [@sandy.hung](https://forum.ansible.com/u/sandy.hung)\
**Replies:** 7\
**Last updated:** [April 29, 2020, 6:52am UTC](https://forum.ansible.com/t/ansible-letsencrypt/32806 "2020-04-29T06:52:27Z")

</div>

Dear all: I run ansible letsencrypt show error message please help me thanks. TASK \[ansible-letsencrypt : update the apt cache\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /home/ldap/.ansible/roles/ansible-letsencrypt/t…

---

## [How to use machine type credential in playbook from awx](https://forum.ansible.com/t/how-to-use-machine-type-credential-in-playbook-from-awx/32808)

<div class="topic-metadata">

**Author:** [@Nasir\_Nasir](https://forum.ansible.com/u/Nasir_Nasir)\
**Replies:** 0\
**Last updated:** [April 29, 2020, 6:43am UTC](https://forum.ansible.com/t/how-to-use-machine-type-credential-in-playbook-from-awx/32808 "2020-04-29T06:43:44Z")

</div>

Hi all, how to use machine type credential in playbook from awx,. Please let us know the variable name. Regards, Syed

---

## [Problem use vmware\_content\_deploy\_template:](https://forum.ansible.com/t/problem-use-vmware-content-deploy-template/32799)

<div class="topic-metadata">

**Author:** [@nikita\_nipon](https://forum.ansible.com/u/nikita_nipon)\
**Replies:** 1\
**Last updated:** [April 29, 2020, 5:54am UTC](https://forum.ansible.com/t/problem-use-vmware-content-deploy-template/32799 "2020-04-29T05:54:15Z")

</div>

I have this playbook:

---

## [Yum update on multiple hosts but using a cusom repo file](https://forum.ansible.com/t/yum-update-on-multiple-hosts-but-using-a-cusom-repo-file/32752)

<div class="topic-metadata">

**Author:** [@Quad\_Zero](https://forum.ansible.com/u/Quad_Zero)\
**Replies:** 9\
**Last updated:** [April 29, 2020, 5:53am UTC](https://forum.ansible.com/t/yum-update-on-multiple-hosts-but-using-a-cusom-repo-file/32752 "2020-04-29T05:53:45Z")

</div>

G’day all Ansible gurus, I am very new to Ansible and I am learning through youtube videos as I am enquiring about this problem. It might be a simple one to some of you guys: So I have multiple servers on my System. I …

---

## [Jinja template error while using with copy module](https://forum.ansible.com/t/jinja-template-error-while-using-with-copy-module/32803)

<div class="topic-metadata">

**Author:** [@Suresh\_Karpurapu](https://forum.ansible.com/u/Suresh_Karpurapu)\
**Replies:** 2\
**Last updated:** [April 28, 2020, 8:18pm UTC](https://forum.ansible.com/t/jinja-template-error-while-using-with-copy-module/32803 "2020-04-28T20:18:13Z")

</div>

Hi All, I would like to use jinja templates for conditions instead when. Is there anyways to fix the below errors with copy module? name: makeing file backup as vfstab.bkp in /tmp copy: |- {% if ansible\_os\_family ==…

---

## [error installing nginx](https://forum.ansible.com/t/error-installing-nginx/32802)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 1\
**Last updated:** [April 28, 2020, 6:33pm UTC](https://forum.ansible.com/t/error-installing-nginx/32802 "2020-04-28T18:33:57Z")

</div>

any idea?

---

## [frr\_facts and/or frr\_bgp give assertionError?](https://forum.ansible.com/t/frr-facts-and-or-frr-bgp-give-assertionerror/30653)

<div class="topic-metadata">

**Author:** [@Piet\_Honkoop](https://forum.ansible.com/u/Piet_Honkoop)\
**Replies:** 13\
**Last updated:** [April 28, 2020, 4:07pm UTC](https://forum.ansible.com/t/frr-facts-and-or-frr-bgp-give-assertionerror/30653 "2020-04-28T16:07:21Z")

</div>

Trying to explore the possibilities of frr\_bgp module. If I try a task like: tasks: name: Get setup frr frr\_facts: gather\_subset: all That results in: File "/tmp/ansible\_frr\_facts\_payload\_UFKM\_S/ansible\_frr\_facts…

---

## [Input validation on user-supplied variable (example, setting environment to production/development/staging)](https://forum.ansible.com/t/input-validation-on-user-supplied-variable-example-setting-environment-to-production-development-staging/32794)

<div class="topic-metadata">

**Author:** [@Michael\_Moody](https://forum.ansible.com/u/Michael_Moody)\
**Replies:** 1\
**Last updated:** [April 28, 2020, 9:45am UTC](https://forum.ansible.com/t/input-validation-on-user-supplied-variable-example-setting-environment-to-production-development-staging/32794 "2020-04-28T09:45:47Z")

</div>

Good afternoon, I opened an issue on GitHub, and was directed here, which is the obvious place. (I initially thought that the behavior was indeed a bug, but there was some clarity added). What would be the preferred me…

---

## [Ansible Tower: Passing extra variables from one workflow template to other](https://forum.ansible.com/t/ansible-tower-passing-extra-variables-from-one-workflow-template-to-other/32792)

<div class="topic-metadata">

**Author:** [@Kaliyug\_Antagonist](https://forum.ansible.com/u/Kaliyug_Antagonist)\
**Replies:** 2\
**Last updated:** [April 28, 2020, 7:34am UTC](https://forum.ansible.com/t/ansible-tower-passing-extra-variables-from-one-workflow-template-to-other/32792 "2020-04-28T07:34:38Z")

</div>

Ansible 2.9.2 Tower 3.6.1 There are two Bitbucket repositories viz. bitbucketconfigurator and sonarconfigurator which contain playbooks to configure Bitbucket and Sonarqube projects, respectively. Here, showing just th…

---

## [Erorr while using magic variables](https://forum.ansible.com/t/erorr-while-using-magic-variables/32784)

<div class="topic-metadata">

**Author:** [@P\_r1](https://forum.ansible.com/u/P_r1)\
**Replies:** 8\
**Last updated:** [April 27, 2020, 11:39pm UTC](https://forum.ansible.com/t/erorr-while-using-magic-variables/32784 "2020-04-27T23:39:11Z")

</div>

Please refer to the attached file for issues I am running into… Here is my playbook: — # Ansible facts example hosts: centos tasks: name: create a file to write the fact values lineinfile: path: /home/ansible/ho…

---

## [I am attempting to run ansible-playbook on centos ansible server. However, I get the below failed result. SSH connection and Adhoc commands work fine. Can somebody please assist ?](https://forum.ansible.com/t/i-am-attempting-to-run-ansible-playbook-on-centos-ansible-server-however-i-get-the-below-failed-result-ssh-connection-and-adhoc-commands-work-fine-can-somebody-please-assist/32786)

<div class="topic-metadata">

**Author:** [@Dhaval\_Mandalia](https://forum.ansible.com/u/Dhaval_Mandalia)\
**Replies:** 3\
**Last updated:** [April 27, 2020, 5:47pm UTC](https://forum.ansible.com/t/i-am-attempting-to-run-ansible-playbook-on-centos-ansible-server-however-i-get-the-below-failed-result-ssh-connection-and-adhoc-commands-work-fine-can-somebody-please-assist/32786 "2020-04-27T17:47:31Z")

</div>

\[root@smartbox ansible\]# ansible alltestnodes -m raw -a “sh vrf | i mgmt” \[DEPRECATION WARNING\]: The TRANSFORM\_INVALID\_GROUP\_CHARS settings is set to allow bad characters in group names by default, this will change, but…

---

## [Trouble Updating VMware Custom Attributes with Ansible](https://forum.ansible.com/t/trouble-updating-vmware-custom-attributes-with-ansible/32793)

<div class="topic-metadata">

**Author:** [@OOS](https://forum.ansible.com/u/OOS)\
**Replies:** 1\
**Last updated:** [April 27, 2020, 2:45pm UTC](https://forum.ansible.com/t/trouble-updating-vmware-custom-attributes-with-ansible/32793 "2020-04-27T14:45:27Z")

</div>

Hi, I’m trying to update custom attributes for existing VMware VMs using Ansible. I spent quite a bit of time testing, but I can’t seem to get it working.

---

## [Run a command with different args everytime in Ansible playbook](https://forum.ansible.com/t/run-a-command-with-different-args-everytime-in-ansible-playbook/32790)

<div class="topic-metadata">

**Author:** [@Xenia\_Ioannidou](https://forum.ansible.com/u/Xenia_Ioannidou)\
**Replies:** 0\
**Last updated:** [April 27, 2020, 12:57pm UTC](https://forum.ansible.com/t/run-a-command-with-different-args-everytime-in-ansible-playbook/32790 "2020-04-27T12:57:59Z")

</div>

I am trying to run a command in Ansible so as to find the neighbors in my network: - name: Get neighbors junos\_rpc: rpc: "get-lldp-interface-neighbors" output: 'xml' args: interface\_device: A regis…

---

## [Need to pass variable and hostname to a playbook from CSV file.](https://forum.ansible.com/t/need-to-pass-variable-and-hostname-to-a-playbook-from-csv-file/32495)

<div class="topic-metadata">

**Author:** [@Pandu\_jh](https://forum.ansible.com/u/Pandu_jh)\
**Replies:** 15\
**Last updated:** [April 27, 2020, 12:35pm UTC](https://forum.ansible.com/t/need-to-pass-variable-and-hostname-to-a-playbook-from-csv-file/32495 "2020-04-27T12:35:50Z")

</div>

I have a CSV file that contains the IP’s and it’s variables. I need to use the details to log in to the host and use the respective variable’s value of the specfic IP’s. Please help me out with this. cat AnsibleTest.c…

---

## [condition based on register match](https://forum.ansible.com/t/condition-based-on-register-match/32787)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 5\
**Last updated:** [April 27, 2020, 9:21am UTC](https://forum.ansible.com/t/condition-based-on-register-match/32787 "2020-04-27T09:21:29Z")

</div>

I have a task that mounts devices in a Linux machine. I wish to run the task only if the device is not mounted, therefore I’m running a mount command and save the output in a register. On the mount task, I’m trying to …

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

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