# Ansible Project

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

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

**Page:** 304

---

## [adding vcenter to tower caused hosts displayed with ids](https://forum.ansible.com/t/adding-vcenter-to-tower-caused-hosts-displayed-with-ids/25852)

<div class="topic-metadata">

**Author:** [@Oguz\_Yarimtepe](https://forum.ansible.com/u/Oguz_Yarimtepe)\
**Replies:** 0\
**Last updated:** [October 28, 2017, 8:54am UTC](https://forum.ansible.com/t/adding-vcenter-to-tower-caused-hosts-displayed-with-ids/25852 "2017-10-28T08:54:19Z")

</div>

I added VMWare VCenter credential typt to AWX interface and also added source of my VCenter. I can see the vms on my VCenter but all are imported with their name\_id format which i dont want. How can i tell AWX (Tower) to…

---

## [Using a x509 certificate user as the login user not supported in mongodb\_user module?](https://forum.ansible.com/t/using-a-x509-certificate-user-as-the-login-user-not-supported-in-mongodb-user-module/25851)

<div class="topic-metadata">

**Author:** [@dariusquach](https://forum.ansible.com/u/dariusquach)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 8:19pm UTC](https://forum.ansible.com/t/using-a-x509-certificate-user-as-the-login-user-not-supported-in-mongodb-user-module/25851 "2017-10-27T20:19:14Z")

</div>

Ansible community, Does anyone know if the mongodb\_user supports the use of a x509 certificate based user? Looking at the given options, there doesn’t look like an option to specify an CA file or a key file even though …

---

## [local\_action tries to ssh to localhost](https://forum.ansible.com/t/local-action-tries-to-ssh-to-localhost/25834)

<div class="topic-metadata">

**Author:** [@raji\_sankaran](https://forum.ansible.com/u/raji_sankaran)\
**Replies:** 4\
**Last updated:** [October 27, 2017, 7:22pm UTC](https://forum.ansible.com/t/local-action-tries-to-ssh-to-localhost/25834 "2017-10-27T19:22:09Z")

</div>

I have the following task as part of a playbook which needs to be run on localhost. This tasks is for checking if the ansible host is able to ssh to remote server. \` name: Verify-User local\_action: shell ssh -o Prefe…

---

## [Is this jinja array or list if it starts with \[u' ?](https://forum.ansible.com/t/is-this-jinja-array-or-list-if-it-starts-with-u/25845)

<div class="topic-metadata">

**Author:** [@Abey\_Thomas](https://forum.ansible.com/u/Abey_Thomas)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 4:25pm UTC](https://forum.ansible.com/t/is-this-jinja-array-or-list-if-it-starts-with-u/25845 "2017-10-27T16:25:02Z")

</div>

Hi, I tried to convert a hash to a list. When I try to debug my list its showing “msg”: " \[u’value1’, u’value2’\]\\n" Looks like an array to me. What kind of object is this? Can i convert this back to list? I tried to d…

---

## [using ansible without creating a root shell?](https://forum.ansible.com/t/using-ansible-without-creating-a-root-shell/25846)

<div class="topic-metadata">

**Author:** [@Mark\_Lucia](https://forum.ansible.com/u/Mark_Lucia)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 4:15pm UTC](https://forum.ansible.com/t/using-ansible-without-creating-a-root-shell/25846 "2017-10-27T16:15:05Z")

</div>

Hello all. Sorry if this has been answered, but I couldn’t find the thread if it has. I’m new to ansible and have been trying to use ansible in our restricted environment and seem to be stuck… hoping someone can offer …

---

## [Cookies and the URI module](https://forum.ansible.com/t/cookies-and-the-uri-module/25843)

<div class="topic-metadata">

**Author:** [@Mathias\_Ettinger](https://forum.ansible.com/u/Mathias_Ettinger)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 3:54pm UTC](https://forum.ansible.com/t/cookies-and-the-uri-module/25843 "2017-10-27T15:54:46Z")

</div>

Hi all, I am using the URI module to contact a REST service of my own that I just deployed in the same playbook. I just happened to add user authentication to this service and I need the URI module to handle that. I su…

---

## [How to pass variables to task](https://forum.ansible.com/t/how-to-pass-variables-to-task/25842)

<div class="topic-metadata">

**Author:** [@KP1](https://forum.ansible.com/u/KP1)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 1:06pm UTC](https://forum.ansible.com/t/how-to-pass-variables-to-task/25842 "2017-10-27T13:06:28Z")

</div>

Hi, Is there a way to pass multiple variables to a task? All the variables will be defined in inventory file: For example: My inventory file 1 will be having variables like below: is\_xyz=true is\_abc=false is\_sdf=tr…

---

## [Adding Icinga Monitored Hosts via Ansible - Issues](https://forum.ansible.com/t/adding-icinga-monitored-hosts-via-ansible-issues/25841)

<div class="topic-metadata">

**Author:** [@Stuart\_Evans](https://forum.ansible.com/u/Stuart_Evans)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 1:02pm UTC](https://forum.ansible.com/t/adding-icinga-monitored-hosts-via-ansible-issues/25841 "2017-10-27T13:02:04Z")

</div>

Hi All, I’m looking for some help with the Add Hosts roles in this repository https://github.com/Icinga/icinga2-ansible , whenever i try to add hosts to be monitored by Icinga I always get the below failure; \` { “msg…

---

## [Passing array or json as variable to powershell](https://forum.ansible.com/t/passing-array-or-json-as-variable-to-powershell/25840)

<div class="topic-metadata">

**Author:** [@nbmprivat](https://forum.ansible.com/u/nbmprivat)\
**Replies:** 2\
**Last updated:** [October 27, 2017, 11:41am UTC](https://forum.ansible.com/t/passing-array-or-json-as-variable-to-powershell/25840 "2017-10-27T11:41:56Z")

</div>

Hi again, New challenge! How do I pass an array or json to a powershell script? \` name: Test script: “{{ role\_path }}/files/test.ps1 {{ object }}” \` Example json: \` { “env01”: { “path”: “C:\\Program Files (x86…

---

## [Specifying a default value to a dictionary element when the dictionary variable does not exist](https://forum.ansible.com/t/specifying-a-default-value-to-a-dictionary-element-when-the-dictionary-variable-does-not-exist/25838)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 9:45am UTC](https://forum.ansible.com/t/specifying-a-default-value-to-a-dictionary-element-when-the-dictionary-variable-does-not-exist/25838 "2017-10-27T09:45:01Z")

</div>

Hi, I am using a variables file for assigning values to the variables which i would then be using in my playbooks. Sometimes the values to these variables are further variables whose values are resolved at runtime, and …

---

## [Playbook for windows - Variable error](https://forum.ansible.com/t/playbook-for-windows-variable-error/25831)

<div class="topic-metadata">

**Author:** [@nbmprivat](https://forum.ansible.com/u/nbmprivat)\
**Replies:** 4\
**Last updated:** [October 27, 2017, 9:17am UTC](https://forum.ansible.com/t/playbook-for-windows-variable-error/25831 "2017-10-27T09:17:14Z")

</div>

Hello, I’m stuck and cannot find a solution :-/ I have some variables in host\_vars folder: \` links: “{{‘1.1.1.2:8080,1.1.1.3:8080,1.1.1.4:8080’}}” log: “{{‘C:\\Program Files (x86)\\Test\\’}}” \` My playbook looks like…

---

## [No Output from router](https://forum.ansible.com/t/no-output-from-router/25832)

<div class="topic-metadata">

**Author:** [@pateldipaktor](https://forum.ansible.com/u/pateldipaktor)\
**Replies:** 2\
**Last updated:** [October 26, 2017, 5:50pm UTC](https://forum.ansible.com/t/no-output-from-router/25832 "2017-10-26T17:50:36Z")

</div>

Hello Friends, I’ve just picked up network automation with ansible and this is my first attempt to build a very simple playbook to run “show version” on Cisco IOS router.Although, playbook runs successfully but i can’t …

---

## [Ansible Failing But SSH Connections are Successful](https://forum.ansible.com/t/ansible-failing-but-ssh-connections-are-successful/25795)

<div class="topic-metadata">

**Author:** [@Michael\_Ellis](https://forum.ansible.com/u/Michael_Ellis)\
**Replies:** 2\
**Last updated:** [October 26, 2017, 5:49pm UTC](https://forum.ansible.com/t/ansible-failing-but-ssh-connections-are-successful/25795 "2017-10-26T17:49:52Z")

</div>

Hello Group, New to Ansible and the Project, but like what I see so far! I am running Ansible 2.4.0 on RHEL7.4. I have SSH keys setup on several hosts and can connect to the remote hosts using the SSH Key Pair from my …

---

## [Unicode-objects must be encoded before hashing](https://forum.ansible.com/t/unicode-objects-must-be-encoded-before-hashing/25824)

<div class="topic-metadata">

**Author:** [@Laurent\_Goussard](https://forum.ansible.com/u/Laurent_Goussard)\
**Replies:** 3\
**Last updated:** [October 26, 2017, 1:41pm UTC](https://forum.ansible.com/t/unicode-objects-must-be-encoded-before-hashing/25824 "2017-10-26T13:41:33Z")

</div>

My brand new ARM server, freshly installed refuse to be managaed by ansible. As soon as I try to reach it, here is the error I get back : ansible chronos -m ping -u root -k SSH password: chronos.du-jour.fr | UNREACHABL…

---

## [ec2\_asg: attach existing instance](https://forum.ansible.com/t/ec2-asg-attach-existing-instance/25830)

<div class="topic-metadata">

**Author:** [@Pantelis\_Karamolegko](https://forum.ansible.com/u/Pantelis_Karamolegko)\
**Replies:** 1\
**Last updated:** [October 26, 2017, 12:02pm UTC](https://forum.ansible.com/t/ec2-asg-attach-existing-instance/25830 "2017-10-26T12:02:18Z")

</div>

Is it possible to attach an existing (running) instance when creating a new auto scaling group? The module documentation is not very straightforward on this. Is the replace\_instances option supposed to take care of thi…

---

## [with\_items and when](https://forum.ansible.com/t/with-items-and-when/25818)

<div class="topic-metadata">

**Author:** [@Sidh](https://forum.ansible.com/u/Sidh)\
**Replies:** 2\
**Last updated:** [October 26, 2017, 10:21am UTC](https://forum.ansible.com/t/with-items-and-when/25818 "2017-10-26T10:21:46Z")

</div>

Hi, Basically would like to check if file is present on remote system or not. If not present, then create one, otherwise skip this step. name: Checking if files already present stat: path: “{{ item }}” register: f…

---

## [Failed to connect to the host via ssh: command-line line 0: garbage at end of line;](https://forum.ansible.com/t/failed-to-connect-to-the-host-via-ssh-command-line-line-0-garbage-at-end-of-line/25775)

<div class="topic-metadata">

**Author:** [@Laurent\_Goussard](https://forum.ansible.com/u/Laurent_Goussard)\
**Replies:** 10\
**Last updated:** [October 26, 2017, 7:28am UTC](https://forum.ansible.com/t/failed-to-connect-to-the-host-via-ssh-command-line-line-0-garbage-at-end-of-line/25775 "2017-10-26T07:28:33Z")

</div>

Hello, I tried to fill in a bug report, but it seems it’s more a question than a bug : Since I’ve added a business dropbox to my existing personnal dropbox, ansible cannot read my symlinked inventory file anymore and a…

---

## [Ansible 2.4.1 has been released](https://forum.ansible.com/t/ansible-2-4-1-has-been-released/25826)

<div class="topic-metadata">

**Author:** [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Replies:** 0\
**Last updated:** [October 26, 2017, 12:35am UTC](https://forum.ansible.com/t/ansible-2-4-1-has-been-released/25826 "2017-10-26T00:35:37Z")

</div>

On behalf of the entire Ansible open source community, we are very happy to announce that Ansible 2.4.1 has been released! This release includes many bugfixes to the 2.4 codebase. For full details, please see the Cha…

---

## [Loop through items, regsiter var when defined.  Approaching this right?](https://forum.ansible.com/t/loop-through-items-regsiter-var-when-defined-approaching-this-right/25821)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 4\
**Last updated:** [October 25, 2017, 9:01pm UTC](https://forum.ansible.com/t/loop-through-items-regsiter-var-when-defined-approaching-this-right/25821 "2017-10-25T21:01:23Z")

</div>

Scenario: Server will have no user defined, or user1 or user2 (but not both). \` name: Discover sudo users getent: database: passwd key: “{{item}}” register: username when: result|succeeded with\_items: user1 use…

---

## [ERROR! no action dected in task.  os\_server\_action action: rebuild](https://forum.ansible.com/t/error-no-action-dected-in-task-os-server-action-action-rebuild/25780)

<div class="topic-metadata">

**Author:** [@Pete\_Pedersen](https://forum.ansible.com/u/Pete_Pedersen)\
**Replies:** 1\
**Last updated:** [October 25, 2017, 8:21pm UTC](https://forum.ansible.com/t/error-no-action-dected-in-task-os-server-action-action-rebuild/25780 "2017-10-25T20:21:27Z")

</div>

Hi all, I’m using Ansible Tower, 2.3.1.0, with Python 2.7.5. I wrote the following playbook to automate rebuilding of servers with new images.

---

## [Ansible Module for OpenStack LBaaSv2](https://forum.ansible.com/t/ansible-module-for-openstack-lbaasv2/25823)

<div class="topic-metadata">

**Author:** [@Pete\_Pedersen](https://forum.ansible.com/u/Pete_Pedersen)\
**Replies:** 0\
**Last updated:** [October 25, 2017, 8:14pm UTC](https://forum.ansible.com/t/ansible-module-for-openstack-lbaasv2/25823 "2017-10-25T20:14:12Z")

</div>

I’m using Ansible as the automation to set up different environments in an OpenStack cloud and was wondering if there is a work in progress to develop a module for OpenStack LBaaSv2? Something along the lines of os\_lbaas…

---

## [Random var and lenguage reference](https://forum.ansible.com/t/random-var-and-lenguage-reference/25817)

<div class="topic-metadata">

**Author:** [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Replies:** 1\
**Last updated:** [October 25, 2017, 6:25pm UTC](https://forum.ansible.com/t/random-var-and-lenguage-reference/25817 "2017-10-25T18:25:28Z")

</div>

Hi, I would like to get a 3 digit random number, for example 001. I have come to get: tasks: name: We assign a fixed random variable throughout the execution. set\_fact: Random\_Fix: “{{ 100 | random }}” run\_once: …

---

## [Need help with playbook to gather info from inventory and direct to a file](https://forum.ansible.com/t/need-help-with-playbook-to-gather-info-from-inventory-and-direct-to-a-file/25813)

<div class="topic-metadata">

**Author:** [@sri\_pavan\_kumar\_goda](https://forum.ansible.com/u/sri_pavan_kumar_goda)\
**Replies:** 1\
**Last updated:** [October 25, 2017, 6:18pm UTC](https://forum.ansible.com/t/need-help-with-playbook-to-gather-info-from-inventory-and-direct-to-a-file/25813 "2017-10-25T18:18:30Z")

</div>

Hi All, Need some help with creating a playbook to gather hostname, OS and package information from the inventory and output the result to a file in below format. “Hostname, OS, Package” I was able to come up with bel…

---

## [How to setup PATH variable in an Ansible task using the environment module?](https://forum.ansible.com/t/how-to-setup-path-variable-in-an-ansible-task-using-the-environment-module/25819)

<div class="topic-metadata">

**Author:** [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Replies:** 3\
**Last updated:** [October 25, 2017, 5:26pm UTC](https://forum.ansible.com/t/how-to-setup-path-variable-in-an-ansible-task-using-the-environment-module/25819 "2017-10-25T17:26:43Z")

</div>

I’m running Ansble v2.4.0.0 in a RHEL7.2 box. I’m trying to setup the PATH variable with the following simple task, but I’m getting a syntax error. \` tasks/main.yml

---

## [Ansible Tower Inventory clarification](https://forum.ansible.com/t/ansible-tower-inventory-clarification/25816)

<div class="topic-metadata">

**Author:** [@anoop\_vc](https://forum.ansible.com/u/anoop_vc)\
**Replies:** 0\
**Last updated:** [October 25, 2017, 11:34am UTC](https://forum.ansible.com/t/ansible-tower-inventory-clarification/25816 "2017-10-25T11:34:02Z")

</div>

How will I specify the credentials to be used for a group of machines using ansible tower UI. if it is single machine, I can create a credential and select it in template. if it is a group of machine, Do I need to use th…

---

## [restoring old configuation](https://forum.ansible.com/t/restoring-old-configuation/25814)

<div class="topic-metadata">

**Author:** [@id.ssh.2017](https://forum.ansible.com/u/id.ssh.2017)\
**Replies:** 1\
**Last updated:** [October 25, 2017, 7:14am UTC](https://forum.ansible.com/t/restoring-old-configuation/25814 "2017-10-25T07:14:02Z")

</div>

Team, I want to write a playbook where we need to check the samba configuration file and if someone has made any changes accidentally it should restore the old config file. Thanks,

---

## [jinja2 variable substituion](https://forum.ansible.com/t/jinja2-variable-substituion/25809)

<div class="topic-metadata">

**Author:** [@Hudec\_Peter](https://forum.ansible.com/u/Hudec_Peter)\
**Replies:** 2\
**Last updated:** [October 24, 2017, 8:55pm UTC](https://forum.ansible.com/t/jinja2-variable-substituion/25809 "2017-10-24T20:55:39Z")

</div>

Hi, I will try to simplify my problem as much as possible. In my case the auto generated, so I do not know the variable name before. Maybe this is better question to devel, but will try you guys. Consider to have val…

---

## [Manage Windows Remote Servers](https://forum.ansible.com/t/manage-windows-remote-servers/25797)

<div class="topic-metadata">

**Author:** [@Sam\_Cogan](https://forum.ansible.com/u/Sam_Cogan)\
**Replies:** 4\
**Last updated:** [October 24, 2017, 8:28pm UTC](https://forum.ansible.com/t/manage-windows-remote-servers/25797 "2017-10-24T20:28:05Z")

</div>

I’m currently assessing various configuration management systems for managing mostly Windows machines. I’m liking the look of Ansible so far, but I am concerned I have a fairly major blocker. I need the chosen system to …

---

## [Basic nslookup functionality](https://forum.ansible.com/t/basic-nslookup-functionality/25812)

<div class="topic-metadata">

**Author:** [@plavmark](https://forum.ansible.com/u/plavmark)\
**Replies:** 1\
**Last updated:** [October 24, 2017, 8:21pm UTC](https://forum.ansible.com/t/basic-nslookup-functionality/25812 "2017-10-24T20:21:49Z")

</div>

Hi, In my inventory file I have the following content, e.g. \[subnets\] 8.8.4.4 8.8.8.8 Now in the playbook I want to resolve DNS for this IP and save it back into another file (that will be used as input for another …

---

## [Ansible for Windows...](https://forum.ansible.com/t/ansible-for-windows/25811)

<div class="topic-metadata">

**Author:** [@Lalit\_Chawla](https://forum.ansible.com/u/Lalit_Chawla)\
**Replies:** 1\
**Last updated:** [October 24, 2017, 8:17pm UTC](https://forum.ansible.com/t/ansible-for-windows/25811 "2017-10-24T20:17:37Z")

</div>

I am new to Ansible but have powershell and Windows admin experience. Will there be still requirements to learn Linux/unix as I saw it works well with SSH.

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

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