# Ansible Project

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

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

**Page:** 298

---

## [Problem with variables variables](https://forum.ansible.com/t/problem-with-variables-variables/26081)

<div class="topic-metadata">

**Author:** [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Replies:** 2\
**Last updated:** [November 21, 2017, 8:34am UTC](https://forum.ansible.com/t/problem-with-variables-variables/26081 "2017-11-21T08:34:42Z")

</div>

Hi, I have a problem with variables. this is correct: \` … debug: msg: “{{ vm\_list.virtual\_machines.SRV1.uuid }}” … \` but, i need: \` … register: vmname debug: msg: “{{ vm\_list.virtual\_machines.{{ vmname }}…

---

## [Best practices for folder structure in Ansible](https://forum.ansible.com/t/best-practices-for-folder-structure-in-ansible/26092)

<div class="topic-metadata">

**Author:** [@akazia.info](https://forum.ansible.com/u/akazia.info)\
**Replies:** 0\
**Last updated:** [November 21, 2017, 7:11am UTC](https://forum.ansible.com/t/best-practices-for-folder-structure-in-ansible/26092 "2017-11-21T07:11:29Z")

</div>

Hello experts, after going over the ansible documentation I have found this mix of recommendations a good starting point to setup a brand new structure. Here is the idea: Inventory: I split it into two so that I can …

---

## [Deploying resources on Azure using Ansible](https://forum.ansible.com/t/deploying-resources-on-azure-using-ansible/26089)

<div class="topic-metadata">

**Author:** [@more.avi008](https://forum.ansible.com/u/more.avi008)\
**Replies:** 0\
**Last updated:** [November 21, 2017, 3:46am UTC](https://forum.ansible.com/t/deploying-resources-on-azure-using-ansible/26089 "2017-11-21T03:46:50Z")

</div>

Dear All, I try to deploy the azure resources using ansible. Mu ansible base machin is on AWS and i installed all prerequisite regarding to ansible. When i execute the playbook for deploying azure VM, it’s give “resou…

---

## [Why sometimes result of tasks looping over with\_items entries are printed in one line and sometimes in multiple lines](https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075)

<div class="topic-metadata">

**Author:** [@Behrang](https://forum.ansible.com/u/Behrang)\
**Replies:** 1\
**Last updated:** [November 21, 2017, 3:36am UTC](https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075 "2017-11-21T03:36:26Z")

</div>

For example: \` TASK \[hal9000 : Install packages\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ok: \[localhost\] =\> (item=\[u’python-lxml’, u’jdk1.8.0\_92’\]) TASK \[hal9000 : Copy configurations\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ok: \[localhost\] =\> (item=a) ok…

---

## [service module with systemd and support for arguments parameter](https://forum.ansible.com/t/service-module-with-systemd-and-support-for-arguments-parameter/26086)

<div class="topic-metadata">

**Author:** [@Darren\_S](https://forum.ansible.com/u/Darren_S)\
**Replies:** 0\
**Last updated:** [November 21, 2017, 12:13am UTC](https://forum.ansible.com/t/service-module-with-systemd-and-support-for-arguments-parameter/26086 "2017-11-21T00:13:34Z")

</div>

$ ansible --version ansible 2.3.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.14 (default, Oct 2 2017, 09:52:26) \[GCC 4.2.1 Compatible O…

---

## [Looking for a more elegant way to declare complex variables](https://forum.ansible.com/t/looking-for-a-more-elegant-way-to-declare-complex-variables/26076)

<div class="topic-metadata">

**Author:** [@Behrang](https://forum.ansible.com/u/Behrang)\
**Replies:** 4\
**Last updated:** [November 20, 2017, 10:38pm UTC](https://forum.ansible.com/t/looking-for-a-more-elegant-way-to-declare-complex-variables/26076 "2017-11-20T22:38:06Z")

</div>

Sensu is monitoring services like Nagios and the things it should monitor can be configured with JSON check definition files. A JSON check definition file can have one or more check definitions. Here is a simplified exa…

---

## [Creating config files from .csv files](https://forum.ansible.com/t/creating-config-files-from-csv-files/26084)

<div class="topic-metadata">

**Author:** [@Tim\_Davidson](https://forum.ansible.com/u/Tim_Davidson)\
**Replies:** 0\
**Last updated:** [November 20, 2017, 7:26pm UTC](https://forum.ansible.com/t/creating-config-files-from-csv-files/26084 "2017-11-20T19:26:39Z")

</div>

Hello, I’m attempting to create config files from one or more csv files. I want the name of each config file to be the hostname (first field) within each record read from the csv files. I think I’m close, but I can’t se…

---

## [Current practice for setting ansible\_python\_interpreter based on group\_by: key={{ansible\_distribution}}](https://forum.ansible.com/t/current-practice-for-setting-ansible-python-interpreter-based-on-group-by-key-ansible-distribution/26073)

<div class="topic-metadata">

**Author:** [@Darren\_S](https://forum.ansible.com/u/Darren_S)\
**Replies:** 0\
**Last updated:** [November 19, 2017, 10:57pm UTC](https://forum.ansible.com/t/current-practice-for-setting-ansible-python-interpreter-based-on-group-by-key-ansible-distribution/26073 "2017-11-19T22:57:56Z")

</div>

ansible 2.3.1.0 python 2.7.14 I'm just wondering the best approach to handling a multi-OS environment where python interpreters are located at different paths: Linux: /usr/bin/python OpenBSD, FreeBSD /usr/loca…

---

## [Ansible + Docker](https://forum.ansible.com/t/ansible-docker/26072)

<div class="topic-metadata">

**Author:** [@Juraj\_Papic1](https://forum.ansible.com/u/Juraj_Papic1)\
**Replies:** 0\
**Last updated:** [November 19, 2017, 5:51pm UTC](https://forum.ansible.com/t/ansible-docker/26072 "2017-11-19T17:51:00Z")

</div>

Hello I have my server with docker , inside this docker I have (v24) all my playbooks are in the host server () when I run the playbooks this way I get out, but if I run the playbooks directly from the docker I have any…

---

## [Unable to SSH to localhost](https://forum.ansible.com/t/unable-to-ssh-to-localhost/26070)

<div class="topic-metadata">

**Author:** [@Raresticks](https://forum.ansible.com/u/Raresticks)\
**Replies:** 2\
**Last updated:** [November 19, 2017, 12:16am UTC](https://forum.ansible.com/t/unable-to-ssh-to-localhost/26070 "2017-11-19T00:16:58Z")

</div>

I’ve been told by a DevOps guru that Ansible needs to communicate over SSH with the localhost, on the server side of course. Ok. so I’ve added the account to the sudoers configurtion so that it may authenticate without…

---

## [replace module: how to replace all matching files](https://forum.ansible.com/t/replace-module-how-to-replace-all-matching-files/26020)

<div class="topic-metadata">

**Author:** [@Andrei\_Baban](https://forum.ansible.com/u/Andrei_Baban)\
**Replies:** 6\
**Last updated:** [November 18, 2017, 3:56pm UTC](https://forum.ansible.com/t/replace-module-how-to-replace-all-matching-files/26020 "2017-11-18T15:56:28Z")

</div>

Hi, I have a variables.yml file in which I store variables in this format: patterns: file: file\_1.xml regexp: 17701 replace: 17706 file: file\_2.xml regexp: 17701 replace: 17706 file: file\_3.xml regexp: 17701 re…

---

## [sudo and change user](https://forum.ansible.com/t/sudo-and-change-user/26065)

<div class="topic-metadata">

**Author:** [@Nikos\_Skalis](https://forum.ansible.com/u/Nikos_Skalis)\
**Replies:** 3\
**Last updated:** [November 18, 2017, 10:41am UTC](https://forum.ansible.com/t/sudo-and-change-user/26065 "2017-11-18T10:41:20Z")

</div>

Could you please advise how usera@serverX:~\> sudo su - userb Last login: Fri Nov 17 15:46:48 CET 2017 on pts/1 -bash-4.2$ (note that no password requested above) translates into ansible ? More specifically, I would l…

---

## [Sending Break/Escape Sequence hot keys via a play](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068)

<div class="topic-metadata">

**Author:** [@ayyappan\_ramanan](https://forum.ansible.com/u/ayyappan_ramanan)\
**Replies:** 2\
**Last updated:** [November 17, 2017, 11:55pm UTC](https://forum.ansible.com/t/sending-break-escape-sequence-hot-keys-via-a-play/26068 "2017-11-17T23:55:13Z")

</div>

Hi All, I am unsure if this question has been raised before. I use Ansible for network automation and it has been working great so far. I am trying to use Ansible/Ansible Tower to automate a virtual network lab on GNS3…

---

## [virt module VMNotFound](https://forum.ansible.com/t/virt-module-vmnotfound/26060)

<div class="topic-metadata">

**Author:** [@Moreno\_Garcia](https://forum.ansible.com/u/Moreno_Garcia)\
**Replies:** 7\
**Last updated:** [November 17, 2017, 10:34pm UTC](https://forum.ansible.com/t/virt-module-vmnotfound/26060 "2017-11-17T22:34:01Z")

</div>

I have 3 machines provisioned on KVM. Here is my inventory: \` \[local\] localhost ansible\_connection=local \[dbservers\] server1 server2 server3 \` When I run from the command line: $ ansible localhost -m virt -a “n…

---

## [Intermittent Kerberos Issues and Unable to Fetch Files Greater than 500MB](https://forum.ansible.com/t/intermittent-kerberos-issues-and-unable-to-fetch-files-greater-than-500mb/26064)

<div class="topic-metadata">

**Author:** [@Richard\_Rogers](https://forum.ansible.com/u/Richard_Rogers)\
**Replies:** 1\
**Last updated:** [November 17, 2017, 9:18pm UTC](https://forum.ansible.com/t/intermittent-kerberos-issues-and-unable-to-fetch-files-greater-than-500mb/26064 "2017-11-17T21:18:05Z")

</div>

Hi, I’m having a couple of issues at the moment. The main one being that running any playbook (or even direct ansible command) against a windows domain joined server (2008 R2/2012/2012 R2) sometimes fails with the belo…

---

## [Using ansible and EC2 to create instances... exact\_count not being honored (sort of)](https://forum.ansible.com/t/using-ansible-and-ec2-to-create-instances-exact-count-not-being-honored-sort-of/26067)

<div class="topic-metadata">

**Author:** [@Dayton\_Jones](https://forum.ansible.com/u/Dayton_Jones)\
**Replies:** 0\
**Last updated:** [November 17, 2017, 8:24pm UTC](https://forum.ansible.com/t/using-ansible-and-ec2-to-create-instances-exact-count-not-being-honored-sort-of/26067 "2017-11-17T20:24:59Z")

</div>

I’m trying to get ansible to create ec2 instances using the following play…works great the first time but there is an issue on subsequent runs… When first run, the host gets created, tagged,etc as expected. But when the…

---

## [Running ansible script on same host multiple times?](https://forum.ansible.com/t/running-ansible-script-on-same-host-multiple-times/25985)

<div class="topic-metadata">

**Author:** [@SHUBHAM\_JAIN1](https://forum.ansible.com/u/SHUBHAM_JAIN1)\
**Replies:** 6\
**Last updated:** [November 17, 2017, 8:24pm UTC](https://forum.ansible.com/t/running-ansible-script-on-same-host-multiple-times/25985 "2017-11-17T20:24:30Z")

</div>

For example \[brokers\] ansible-slave node\_id=1 kafka\_port=9092 ansible-slave node\_id=2 kafka\_port=9093 ansible-slave node\_id=3 kafka\_port=9094 I started playbook but it is running only once not three times. How to a…

---

## [ansible2.4: playbook group\_vars/\* no longer loaded into hostvars](https://forum.ansible.com/t/ansible2-4-playbook-group-vars-no-longer-loaded-into-hostvars/25995)

<div class="topic-metadata">

**Author:** [@Brano\_Zarnovican](https://forum.ansible.com/u/Brano_Zarnovican)\
**Replies:** 2\
**Last updated:** [November 17, 2017, 4:57pm UTC](https://forum.ansible.com/t/ansible2-4-playbook-group-vars-no-longer-loaded-into-hostvars/25995 "2017-11-17T16:57:03Z")

</div>

Hi, upgrade-ing to Ansible 2.4, I have noticed that variables defined in ‘group\_vars/all.yaml’, ‘group\_vars/groupX.yaml’ no longer appear in ‘hostvars’. I’m talking about referencing hostvars of another host from curren…

---

## [route53\_zone doesn't create a private and a public hosted zone.](https://forum.ansible.com/t/route53-zone-doesnt-create-a-private-and-a-public-hosted-zone/26063)

<div class="topic-metadata">

**Author:** [@Mohammad\_Asim\_Ayub](https://forum.ansible.com/u/Mohammad_Asim_Ayub)\
**Replies:** 0\
**Last updated:** [November 17, 2017, 2:14pm UTC](https://forum.ansible.com/t/route53-zone-doesnt-create-a-private-and-a-public-hosted-zone/26063 "2017-11-17T14:14:39Z")

</div>

Ansible version 2.3.0.0 I want to create two hosted zones 1 private and 1 public. When I create it manually on AWS console it gets created and the private hosted zone is associated with my VPC. However through Ansible o…

---

## [Use of synchronize ask a password](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051)

<div class="topic-metadata">

**Author:** [@lidor.ettinger](https://forum.ansible.com/u/lidor.ettinger)\
**Replies:** 4\
**Last updated:** [November 17, 2017, 1:51pm UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051 "2017-11-17T13:51:07Z")

</div>

Hi there, I’m using a synchronize task: http://docs.ansible.com/ansible/latest/synchronize\_module.html - synchronize: src: some/relative/path dest: /some/absolute/path So far so good but i expected that Ansib…

---

## ["SSLHandshake: Unsupported curveid: 29" with win\_get\_url](https://forum.ansible.com/t/sslhandshake-unsupported-curveid-29-with-win-get-url/26055)

<div class="topic-metadata">

**Author:** [@Jean\_Jordaan](https://forum.ansible.com/u/Jean_Jordaan)\
**Replies:** 4\
**Last updated:** [November 17, 2017, 1:22pm UTC](https://forum.ansible.com/t/sslhandshake-unsupported-curveid-29-with-win-get-url/26055 "2017-11-17T13:22:53Z")

</div>

Hi all We’re trying to get a file from a server in a playbook: \` win\_get\_url: url: https://some.domain.com/test.txt dest: D:\\test.txt url\_username: xxxxx url\_password: xxxxx skip\_certificate\_validation: yes val…

---

## [Windows Server 2016 non-domain server, Ansible setup module issue](https://forum.ansible.com/t/windows-server-2016-non-domain-server-ansible-setup-module-issue/26059)

<div class="topic-metadata">

**Author:** [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Replies:** 1\
**Last updated:** [November 17, 2017, 1:17pm UTC](https://forum.ansible.com/t/windows-server-2016-non-domain-server-ansible-setup-module-issue/26059 "2017-11-17T13:17:36Z")

</div>

Ansible: 2.1.0.0 Ansible Control Server: Centos 7.4 Target: Windows Server 2016 On running the playbook it fails during the setup module. I have tested locally on the machine for the property in question and it is pre…

---

## [module connect\_to\_api from vmware  has no attribute 'SSLContext'](https://forum.ansible.com/t/module-connect-to-api-from-vmware-has-no-attribute-sslcontext/26057)

<div class="topic-metadata">

**Author:** [@jrvilda](https://forum.ansible.com/u/jrvilda)\
**Replies:** 1\
**Last updated:** [November 17, 2017, 12:57pm UTC](https://forum.ansible.com/t/module-connect-to-api-from-vmware-has-no-attribute-sslcontext/26057 "2017-11-17T12:57:38Z")

</div>

Hello, I’m having problems with module vmware\_guest\_snapshot. Any solution? \` \[root@ges1ansibledes ansible\]# ansible --version ansible 2.4.1.0 config file = /etc/ansible/ansible.cfg configured module search path = …

---

## [lineinfile append to line?](https://forum.ansible.com/t/lineinfile-append-to-line/26050)

<div class="topic-metadata">

**Author:** [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Replies:** 1\
**Last updated:** [November 17, 2017, 10:22am UTC](https://forum.ansible.com/t/lineinfile-append-to-line/26050 "2017-11-17T10:22:26Z")

</div>

Trying to edit grub.conf and add a phrase to the kernel lines. Sample stanza: title CentOS (2.6.32-696.13.2.el6.x86\_64) root (hd0,0) kernel /vmlinuz-2.6.32-696.13.2.el6.x86\_64 ro root=/dev/mapper/vg\_…

---

## [basic connection to windows with WinRM failing, need a clue.](https://forum.ansible.com/t/basic-connection-to-windows-with-winrm-failing-need-a-clue/26052)

<div class="topic-metadata">

**Author:** [@Jackson\_Pollock](https://forum.ansible.com/u/Jackson_Pollock)\
**Replies:** 3\
**Last updated:** [November 17, 2017, 9:39am UTC](https://forum.ansible.com/t/basic-connection-to-windows-with-winrm-failing-need-a-clue/26052 "2017-11-17T09:39:54Z")

</div>

First time trying to get some windows automation going, I must be missing something. Installed winrm & powershell via the ansible provided scripts from: http://docs.ansible.com/ansible/latest/intro\_windows.html#windows-s…

---

## [Ansible ad-hoc win\_ping fails for Windows hosts where direct pywinrm request works](https://forum.ansible.com/t/ansible-ad-hoc-win-ping-fails-for-windows-hosts-where-direct-pywinrm-request-works/26044)

<div class="topic-metadata">

**Author:** [@macronaute](https://forum.ansible.com/u/macronaute)\
**Replies:** 2\
**Last updated:** [November 17, 2017, 9:24am UTC](https://forum.ansible.com/t/ansible-ad-hoc-win-ping-fails-for-windows-hosts-where-direct-pywinrm-request-works/26044 "2017-11-17T09:24:02Z")

</div>

Good morning, I’m struggling with an annoying issue with my current Ansible setup. Ansible master server is configured and I’m testing basic connectiviy with Linux and Windows nodes. Connectivity with Linux nodes is wo…

---

## [ansible --list-hosts behaviour](https://forum.ansible.com/t/ansible-list-hosts-behaviour/26019)

<div class="topic-metadata">

**Author:** [@Aivars\_Sterns](https://forum.ansible.com/u/Aivars_Sterns)\
**Replies:** 2\
**Last updated:** [November 17, 2017, 9:23am UTC](https://forum.ansible.com/t/ansible-list-hosts-behaviour/26019 "2017-11-17T09:23:29Z")

</div>

ansible --list-hosts behaviour is something strange, at least it works as i don’t expect, it differs from ansible 2.3 to ansible 2.4 test case: created inventory \` \[group\] host1-c1 host2 \[group1-c1\] host3 host4 …

---

## [Ansible Tower - LDAP](https://forum.ansible.com/t/ansible-tower-ldap/26058)

<div class="topic-metadata">

**Author:** [@Shaun\_Glass](https://forum.ansible.com/u/Shaun_Glass)\
**Replies:** 0\
**Last updated:** [November 17, 2017, 8:52am UTC](https://forum.ansible.com/t/ansible-tower-ldap/26058 "2017-11-17T08:52:09Z")

</div>

Good Day, I am trying to connect Tower to our LDAP Server (AD). I have captured tcpdumps and can see it is connecting; searching and finding records but the actual authentication is not occurring. Can anyone assist in t…

---

## [maximum recursion depth exceeded](https://forum.ansible.com/t/maximum-recursion-depth-exceeded/26056)

<div class="topic-metadata">

**Author:** [@Gerben\_Venekamp](https://forum.ansible.com/u/Gerben_Venekamp)\
**Replies:** 0\
**Last updated:** [November 17, 2017, 8:15am UTC](https://forum.ansible.com/t/maximum-recursion-depth-exceeded/26056 "2017-11-17T08:15:53Z")

</div>

I am running in to the below error. TASK \[include\_role\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Traceback (most recent call last): File “/usr/local/opt/python/Frameworks/Python.framework/V…

---

## [Install Java using its source :: Ansible](https://forum.ansible.com/t/install-java-using-its-source-ansible/26006)

<div class="topic-metadata">

**Author:** [@luke.devon80](https://forum.ansible.com/u/luke.devon80)\
**Replies:** 4\
**Last updated:** [November 17, 2017, 6:51am UTC](https://forum.ansible.com/t/install-java-using-its-source-ansible/26006 "2017-11-17T06:51:49Z")

</div>

Hi I want to install java using its source (tar.gz) for number of redhat servers . Can you please give me a little guide ? How can I use ansible for this task and what are the command list ? For example : I have 10 no.…

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

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