# Ansible Project

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

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

**Page:** 282

---

## [junos error](https://forum.ansible.com/t/junos-error/26735)

<div class="topic-metadata">

**Author:** [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Replies:** 0\
**Last updated:** [February 14, 2018, 5:44pm UTC](https://forum.ansible.com/t/junos-error/26735 "2018-02-14T17:44:58Z")

</div>

Hello I am trying to backup config on a juniper router without success and getting an error message ansible@ansible-new:/etc/ansible$ ansible-playbook -i hosts backup\_config-junos-facts.yml --user=ansible --extra-vars …

---

## [Ansible 2.5.0 Alpha 1 is available](https://forum.ansible.com/t/ansible-2-5-0-alpha-1-is-available/26634)

<div class="topic-metadata">

**Author:** [@system](https://forum.ansible.com/u/system)\
**Replies:** 2\
**Last updated:** [February 14, 2018, 5:38pm UTC](https://forum.ansible.com/t/ansible-2-5-0-alpha-1-is-available/26634 "2018-02-14T17:38:21Z")

</div>

Hi all! We’re happy to announce that Alpha 1 for 2.5.0 is now available. Note that while the core engine is feature complete, community module freeze is next week, so new modules and features will appear in the next pre…

---

## [Upgrade from 1.9 to 2.4 throws "recursive loop detected" error](https://forum.ansible.com/t/upgrade-from-1-9-to-2-4-throws-recursive-loop-detected-error/26715)

<div class="topic-metadata">

**Author:** [@K\_Seshadri\_Iyer](https://forum.ansible.com/u/K_Seshadri_Iyer)\
**Replies:** 2\
**Last updated:** [February 14, 2018, 2:25pm UTC](https://forum.ansible.com/t/upgrade-from-1-9-to-2-4-throws-recursive-loop-detected-error/26715 "2018-02-14T14:25:01Z")

</div>

Ansible newbie alert ! I am upgrading from 1.9 to 2.4. A play that works fine in the former throws up the error: recursive loop detected in template string: {{ service\_down | default(1) }}"} The last lines in the foll…

---

## [Looping over nested inventory items with conditional](https://forum.ansible.com/t/looping-over-nested-inventory-items-with-conditional/26724)

<div class="topic-metadata">

**Author:** [@Jason3](https://forum.ansible.com/u/Jason3)\
**Replies:** 2\
**Last updated:** [February 14, 2018, 2:24pm UTC](https://forum.ansible.com/t/looping-over-nested-inventory-items-with-conditional/26724 "2018-02-14T14:24:01Z")

</div>

Hey all, We’re migrating from a single load balancer pair for all systems (dev/test/qa/prod) to separate pairs for dev/test and qa/prod. As a result, my previous task to pull nodes from the pool on the load balancer wil…

---

## [ansible-pull query](https://forum.ansible.com/t/ansible-pull-query/26652)

<div class="topic-metadata">

**Author:** [@sriman\_dharba](https://forum.ansible.com/u/sriman_dharba)\
**Replies:** 1\
**Last updated:** [February 14, 2018, 1:41pm UTC](https://forum.ansible.com/t/ansible-pull-query/26652 "2018-02-14T13:41:15Z")

</div>

Hello I am using ansible-pull along with cron to perform hardening and predependencies for my infra. I am managing all the contents of ansible playbooks/roles/inventory in git I am using a seperate directory name templa…

---

## [Ansible vmware\_guest creates vmware vm, but hostname does not changes. Also creates a additional junk folder](https://forum.ansible.com/t/ansible-vmware-guest-creates-vmware-vm-but-hostname-does-not-changes-also-creates-a-additional-junk-folder/26682)

<div class="topic-metadata">

**Author:** [@Ajay\_Sharma](https://forum.ansible.com/u/Ajay_Sharma)\
**Replies:** 1\
**Last updated:** [February 14, 2018, 12:50pm UTC](https://forum.ansible.com/t/ansible-vmware-guest-creates-vmware-vm-but-hostname-does-not-changes-also-creates-a-additional-junk-folder/26682 "2018-02-14T12:50:52Z")

</div>

HI Everyone. this Ansible yaml script creates vmware vm from previous template, but does not changes its host name. also creates a additional folder named here is the screen shot attached. The vmware\_guest module crea…

---

## [Dynamically set /etc/hosts using ansible\_interfaces](https://forum.ansible.com/t/dynamically-set-etc-hosts-using-ansible-interfaces/20386)

<div class="topic-metadata">

**Author:** [@Dayton\_Jones](https://forum.ansible.com/u/Dayton_Jones)\
**Replies:** 8\
**Last updated:** [February 14, 2018, 9:51am UTC](https://forum.ansible.com/t/dynamically-set-etc-hosts-using-ansible-interfaces/20386 "2018-02-14T09:51:49Z")

</div>

I’m trying to dynamically set /etc/hosts based on the ipv4 address assigned to all the interfaces on a host… my template reads as such 127.0.0.1 localhost.localdomain localhost {% for item in ansible\_interfaces if …

---

## [Yaml statement over multiple lines.](https://forum.ansible.com/t/yaml-statement-over-multiple-lines/26717)

<div class="topic-metadata">

**Author:** [@mail.philfriend](https://forum.ansible.com/u/mail.philfriend)\
**Replies:** 2\
**Last updated:** [February 14, 2018, 2:29am UTC](https://forum.ansible.com/t/yaml-statement-over-multiple-lines/26717 "2018-02-14T02:29:13Z")

</div>

Hi, How should I split this dest: statement into multiple lines ? copy: content: “{{ config.stdout\[0\] }}” dest: “{{ backup\_root }}/{{ inventory\_hostname }}/dhcp\_leases\_{{ ansible\_date\_time.year }}{{ ansible\_date\_tim…

---

## [do\_dictsort() got an unexpected keyword argument 'reverse'](https://forum.ansible.com/t/do-dictsort-got-an-unexpected-keyword-argument-reverse/26571)

<div class="topic-metadata">

**Author:** [@Martin\_Cigorraga](https://forum.ansible.com/u/Martin_Cigorraga)\
**Replies:** 3\
**Last updated:** [February 14, 2018, 1:36am UTC](https://forum.ansible.com/t/do-dictsort-got-an-unexpected-keyword-argument-reverse/26571 "2018-02-14T01:36:12Z")

</div>

Hi everyone, We are using a Jinja2 template to populate a configuration file, based on the information Ansible feeds it on runtime: \` Main Processes {% for k, v in some\_conf | dictsort() %} cmdline -c /etc/some\_too…

---

## [jinja help](https://forum.ansible.com/t/jinja-help/26722)

<div class="topic-metadata">

**Author:** [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Replies:** 3\
**Last updated:** [February 13, 2018, 9:23pm UTC](https://forum.ansible.com/t/jinja-help/26722 "2018-02-13T21:23:34Z")

</div>

I need to take this and do the opposite: when: ansible\_hostname | lower | search ("sql-db") ie: when: not(ansible\_hostname | lower | search (“ebs-db”)) Is there a good place to find out what I can/can’t do for this ki…

---

## [Connecting to Windows hosts in EC2 using Kerberos (Tower) (maybe not what you think)](https://forum.ansible.com/t/connecting-to-windows-hosts-in-ec2-using-kerberos-tower-maybe-not-what-you-think/26723)

<div class="topic-metadata">

**Author:** [@travisk](https://forum.ansible.com/u/travisk)\
**Replies:** 0\
**Last updated:** [February 13, 2018, 7:45pm UTC](https://forum.ansible.com/t/connecting-to-windows-hosts-in-ec2-using-kerberos-tower-maybe-not-what-you-think/26723 "2018-02-13T19:45:26Z")

</div>

Hello! Currently in Tower we have dynamic inventory set up to pull in data about EC2 instances from our AWS account. We have vpc\_destination\_variable set to internal IPs since we connect to EC2 via Direct Connect. Afte…

---

## [Using 2 inventories. Can someone explain what I'm doing wrong?](https://forum.ansible.com/t/using-2-inventories-can-someone-explain-what-im-doing-wrong/26719)

<div class="topic-metadata">

**Author:** [@Varun\_Chopra](https://forum.ansible.com/u/Varun_Chopra)\
**Replies:** 2\
**Last updated:** [February 13, 2018, 7:07pm UTC](https://forum.ansible.com/t/using-2-inventories-can-someone-explain-what-im-doing-wrong/26719 "2018-02-13T19:07:26Z")

</div>

So I plan to use a static and a dynamic inventory (gce) and this is what my play folder looks like: \` . ├── ansible.cfg ├── credentials.json ├── gce\_vars │ ├── auth │ └── test\_servers ├── group\_vars │ └── all ├…

---

## [library/module\_utils functionality question](https://forum.ansible.com/t/library-module-utils-functionality-question/26720)

<div class="topic-metadata">

**Author:** [@Arthur\_Reyes](https://forum.ansible.com/u/Arthur_Reyes)\
**Replies:** 1\
**Last updated:** [February 13, 2018, 6:04pm UTC](https://forum.ansible.com/t/library-module-utils-functionality-question/26720 "2018-02-13T18:04:31Z")

</div>

If a module with the same name as a core module exists in the ./library or ./module\_utils directory of the plabyook, which module will be get invoked when I reference it in my playbook? I have a need to modify the funct…

---

## [Ansible Module Documentation](https://forum.ansible.com/t/ansible-module-documentation/26706)

<div class="topic-metadata">

**Author:** [@Bapi](https://forum.ansible.com/u/Bapi)\
**Replies:** 3\
**Last updated:** [February 13, 2018, 5:38pm UTC](https://forum.ansible.com/t/ansible-module-documentation/26706 "2018-02-13T17:38:16Z")

</div>

Hello, i am following the below ansible documentation. http://docs.ansible.com/ansible/latest/dev\_guide/developing\_modules\_documenting.html" Using this i could able to generate .html file for my custom module(MODULES=$c…

---

## [What's the safest way to do grep-like searches in files?](https://forum.ansible.com/t/whats-the-safest-way-to-do-grep-like-searches-in-files/26721)

<div class="topic-metadata">

**Author:** [@Nico\_Sabbi](https://forum.ansible.com/u/Nico_Sabbi)\
**Replies:** 6\
**Last updated:** [February 13, 2018, 5:03pm UTC](https://forum.ansible.com/t/whats-the-safest-way-to-do-grep-like-searches-in-files/26721 "2018-02-13T17:03:53Z")

</div>

HI, I need to do a grep-like search in a file without using shell commands and in a check\_mode compatible way. I just need to check the presence of a given string a in a file without doing overwrites of any kind. I im…

---

## [In a loop everything executes at the same time?](https://forum.ansible.com/t/in-a-loop-everything-executes-at-the-same-time/26691)

<div class="topic-metadata">

**Author:** [@Guillem\_Sola](https://forum.ansible.com/u/Guillem_Sola)\
**Replies:** 4\
**Last updated:** [February 13, 2018, 3:27pm UTC](https://forum.ansible.com/t/in-a-loop-everything-executes-at-the-same-time/26691 "2018-02-13T15:27:57Z")

</div>

I want to limit the number of parllel executions for a certain task inside a playbook (I have some constrains with downloading artifacts) In that way the rest of tasks wil execute in all hosts at the same time but when …

---

## [Dictionary Parsing](https://forum.ansible.com/t/dictionary-parsing/26716)

<div class="topic-metadata">

**Author:** [@Mona\_Gopal](https://forum.ansible.com/u/Mona_Gopal)\
**Replies:** 0\
**Last updated:** [February 13, 2018, 10:17am UTC](https://forum.ansible.com/t/dictionary-parsing/26716 "2018-02-13T10:17:34Z")

</div>

We are trying to write Ansible playbooks for releasing patches for an application In patch releases there are 4 basic changes that can be there We will create 4 roles for those BinaryRole : For changing war files and …

---

## [\[Windows\] Install visual studio](https://forum.ansible.com/t/windows-install-visual-studio/26565)

<div class="topic-metadata">

**Author:** [@Jeremie\_Levy](https://forum.ansible.com/u/Jeremie_Levy)\
**Replies:** 7\
**Last updated:** [February 13, 2018, 2:05am UTC](https://forum.ansible.com/t/windows-install-visual-studio/26565 "2018-02-13T02:05:20Z")

</div>

Hi It seems i need to wait a bit after the Visual studio installation. It stated as failed because it couldn’t remove the temporary install file (web install file) - VS was installed ! I’m using win\_package and i’m no…

---

## [Get details of installed iis websites](https://forum.ansible.com/t/get-details-of-installed-iis-websites/26661)

<div class="topic-metadata">

**Author:** [@groupfiles14](https://forum.ansible.com/u/groupfiles14)\
**Replies:** 1\
**Last updated:** [February 13, 2018, 2:01am UTC](https://forum.ansible.com/t/get-details-of-installed-iis-websites/26661 "2018-02-13T02:01:27Z")

</div>

I am using win\_iis\_website and would like to know whether it is possible to fetch the details of already installed websites like location, application pool and so on

---

## [Testing playbooks and roles between Ansible versions](https://forum.ansible.com/t/testing-playbooks-and-roles-between-ansible-versions/26670)

<div class="topic-metadata">

**Author:** [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Replies:** 2\
**Last updated:** [February 13, 2018, 1:55am UTC](https://forum.ansible.com/t/testing-playbooks-and-roles-between-ansible-versions/26670 "2018-02-13T01:55:43Z")

</div>

Hi all, So I have been looking at moving to later versions of Ansible (currently way back on 2.1.4). Ideally I want to have an automated(or relatively automated) way to work through all the internal roles and playbooks…

---

## [inventory two potential solutions](https://forum.ansible.com/t/inventory-two-potential-solutions/26712)

<div class="topic-metadata">

**Author:** [@Sergey\_Glazyrin](https://forum.ansible.com/u/Sergey_Glazyrin)\
**Replies:** 1\
**Last updated:** [February 12, 2018, 11:28pm UTC](https://forum.ansible.com/t/inventory-two-potential-solutions/26712 "2018-02-12T23:28:39Z")

</div>

Hey guys! We are developing a plugin for openstack horizon and a product which will be able to manage openstack infrastructure Our infrastructure is quite complex. For instance, we may have up to 10 openstack controll…

---

## [Trying to use the Python modules to integrate in my deployment scripts.  MODULE FAILURE](https://forum.ansible.com/t/trying-to-use-the-python-modules-to-integrate-in-my-deployment-scripts-module-failure/26711)

<div class="topic-metadata">

**Author:** [@David\_H](https://forum.ansible.com/u/David_H)\
**Replies:** 1\
**Last updated:** [February 12, 2018, 11:04pm UTC](https://forum.ansible.com/t/trying-to-use-the-python-modules-to-integrate-in-my-deployment-scripts-module-failure/26711 "2018-02-12T23:04:34Z")

</div>

Hi, I have been using ansible for a while with the yml’s and love the simplicity of the tool. Now, I have used a snippet of a script to try run various ansible tasks on a host via Python. Would one of you be able to p…

---

## [Using remote\_user for a single task in a play](https://forum.ansible.com/t/using-remote-user-for-a-single-task-in-a-play/26709)

<div class="topic-metadata">

**Author:** [@Robert\_Beaver](https://forum.ansible.com/u/Robert_Beaver)\
**Replies:** 2\
**Last updated:** [February 12, 2018, 5:25pm UTC](https://forum.ansible.com/t/using-remote-user-for-a-single-task-in-a-play/26709 "2018-02-12T17:25:02Z")

</div>

I’m guessing this isn’t possible, but I might have been looking at it too long at this point to know if I’m missing something… I have a playbook with a role in which one task has a remote\_user and a delegate\_to option s…

---

## [NTP Query vs. NTPstat using Ansible](https://forum.ansible.com/t/ntp-query-vs-ntpstat-using-ansible/26707)

<div class="topic-metadata">

**Author:** [@Alan\_Harkleroad](https://forum.ansible.com/u/Alan_Harkleroad)\
**Replies:** 2\
**Last updated:** [February 12, 2018, 3:30pm UTC](https://forum.ansible.com/t/ntp-query-vs-ntpstat-using-ansible/26707 "2018-02-12T15:30:22Z")

</div>

I setup a simple alias for my boss since he likes to run NTP queries for our rack system. One of my server wont return a ntpq -pn remotely but will execute it locally. Not sure why. Comes back with command not found rc=1…

---

## [Backup - user issues](https://forum.ansible.com/t/backup-user-issues/26705)

<div class="topic-metadata">

**Author:** [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Replies:** 2\
**Last updated:** [February 12, 2018, 2:58pm UTC](https://forum.ansible.com/t/backup-user-issues/26705 "2018-02-12T14:58:33Z")

</div>

Hello guys I am trying to backup my config on a router but I want to use the login details on the router for ansible e.g admin as written below to use to log into the router and not the ansible user on the ansible serv…

---

## [How to loop over this local\_fact in Ansible?](https://forum.ansible.com/t/how-to-loop-over-this-local-fact-in-ansible/26704)

<div class="topic-metadata">

**Author:** [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Replies:** 0\
**Last updated:** [February 12, 2018, 9:48am UTC](https://forum.ansible.com/t/how-to-loop-over-this-local-fact-in-ansible/26704 "2018-02-12T09:48:42Z")

</div>

Its not clear to me exactly what you want the result to be after your set\_fact processing but I suggest you take a look at json\_query plugin as you might be able to use this to just pick out the bits of the result that y…

---

## [How to loop over this local\_fact in Ansible?](https://forum.ansible.com/t/how-to-loop-over-this-local-fact-in-ansible/26703)

<div class="topic-metadata">

**Author:** [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Replies:** 0\
**Last updated:** [February 12, 2018, 9:47am UTC](https://forum.ansible.com/t/how-to-loop-over-this-local-fact-in-ansible/26703 "2018-02-12T09:47:53Z")

</div>

You could do something like this - set\_fact: profiles\_dicts: | {% set res = -%} {% for key, value in ansible\_local.was.profiles.iteritems() -%} {% set ignored = res.extend(\[{'…

---

## [Cygwin breaking ansible](https://forum.ansible.com/t/cygwin-breaking-ansible/26609)

<div class="topic-metadata">

**Author:** [@lpescatore](https://forum.ansible.com/u/lpescatore)\
**Replies:** 3\
**Last updated:** [February 12, 2018, 9:43am UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609 "2018-02-12T09:43:43Z")

</div>

Hi folks, I have a WEIRD problem. After running cygwin ssh-host-config on my PC, which starts sshd and rsync services, suddenly I can no longer run ansible. I get this error: root@Raspi\_Ctrl:/ansible/playbook/nuc# ans…

---

## [How do I use information from Dynamic Inventory Dictionary \_meta when executing on localhost?](https://forum.ansible.com/t/how-do-i-use-information-from-dynamic-inventory-dictionary-meta-when-executing-on-localhost/26700)

<div class="topic-metadata">

**Author:** [@Isaac\_Kane\_Eggleston](https://forum.ansible.com/u/Isaac_Kane_Eggleston)\
**Replies:** 0\
**Last updated:** [February 11, 2018, 7:07am UTC](https://forum.ansible.com/t/how-do-i-use-information-from-dynamic-inventory-dictionary-meta-when-executing-on-localhost/26700 "2018-02-11T07:07:33Z")

</div>

Excuse me if this has been covered in another post, I have searched diligently in documentation and on this group however the wording could be very different depending on the interpretation. If this is covered anywhere …

---

## [junos\_command](https://forum.ansible.com/t/junos-command/24314)

<div class="topic-metadata">

**Author:** [@vadud3](https://forum.ansible.com/u/vadud3)\
**Replies:** 8\
**Last updated:** [February 10, 2018, 11:33pm UTC](https://forum.ansible.com/t/junos-command/24314 "2018-02-10T23:33:36Z")

</div>

I am failing to make junos\_command work 2017-04-25 15:28:49,152 p=4058 u=user | PLAY \[sdwan-routers\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 2017-04-25 15:28…

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

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