# Latest

**URL:** https://forum.ansible.com/latest.md?page=828

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

**Page:** 829

---

## [when: a file contains this regexp](https://forum.ansible.com/t/when-a-file-contains-this-regexp/15129)

<div class="topic-metadata">

**Author:** [@Peter\_Leggett](https://forum.ansible.com/u/Peter_Leggett)\
**Replies:** 4\
**Last updated:** [October 9, 2015, 12:38am UTC](https://forum.ansible.com/t/when-a-file-contains-this-regexp/15129 "2015-10-09T00:38:52Z")

</div>

Hi, how can i execute a ansible task only if a file contains a specfic regexp ? I was hoping to use the when: statement as follows :- name: do this task only if file contains fred command: some command when: file c…

---

## [Getting Unable to find an inventory file error programtically in Python](https://forum.ansible.com/t/getting-unable-to-find-an-inventory-file-error-programtically-in-python/19468)

<div class="topic-metadata">

**Author:** [@John\_Wong](https://forum.ansible.com/u/John_Wong)\
**Replies:** 0\
**Last updated:** [October 8, 2015, 9:44pm UTC](https://forum.ansible.com/t/getting-unable-to-find-an-inventory-file-error-programtically-in-python/19468 "2015-10-08T21:44:10Z")

</div>

Hi I am working with Ansible API but I run into problem with the Playbook module. I’ve done some reading in https://github.com/oriolrius/programming-ansible-basics/blob/master/test\_playbook.py and also looked through he…

---

## [EC2 module, exact\_count, and loops](https://forum.ansible.com/t/ec2-module-exact-count-and-loops/19467)

<div class="topic-metadata">

**Author:** [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Replies:** 3\
**Last updated:** [October 8, 2015, 6:59pm UTC](https://forum.ansible.com/t/ec2-module-exact-count-and-loops/19467 "2015-10-08T18:59:07Z")

</div>

I have a playbook that fires up some ec2 instances in multiple subnets using exact\_count and count\_tag to control how many instances are created. I’m using when to loop over the subnets I want to use - in this particular…

---

## [rebooting nodes (centos)](https://forum.ansible.com/t/rebooting-nodes-centos/19463)

<div class="topic-metadata">

**Author:** [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Replies:** 5\
**Last updated:** [October 8, 2015, 6:33pm UTC](https://forum.ansible.com/t/rebooting-nodes-centos/19463 "2015-10-08T18:33:57Z")

</div>

Hi all, As part of a playbook I reboot nodes if they’re missing a file I’m checking against. This is done like so: name: Reboot node if check file does not exist (we assume this is the first run) command: shutdown -r…

---

## [Local fact not passed](https://forum.ansible.com/t/local-fact-not-passed/19459)

<div class="topic-metadata">

**Author:** [@ticktockhouse](https://forum.ansible.com/u/ticktockhouse)\
**Replies:** 1\
**Last updated:** [October 8, 2015, 4:35pm UTC](https://forum.ansible.com/t/local-fact-not-passed/19459 "2015-10-08T16:35:19Z")

</div>

Hello, Ansible\_version: 1.9.2 stable I have a custom fact, generated via bash: #!/bin/bash MYSQL\_PW=$(cat /etc/psa/.psa.shadow) cat \<\< EOF { "pw":"$MYSQL\_PW" } EOF When I run this on the command line, it gives t…

---

## [Jinja2 - variable inside a variable](https://forum.ansible.com/t/jinja2-variable-inside-a-variable/19450)

<div class="topic-metadata">

**Author:** [@Vikas\_Kumar](https://forum.ansible.com/u/Vikas_Kumar)\
**Replies:** 5\
**Last updated:** [October 8, 2015, 4:27pm UTC](https://forum.ansible.com/t/jinja2-variable-inside-a-variable/19450 "2015-10-08T16:27:55Z")

</div>

Hello Everyone, I am trying to iterate over a dictionary in a Jinja2 template (in Ansible). One of the arrays or keys in the dictionary is ‘abcd’ This works fine, but key ‘abcd’ varies in each dictionary. {{ item.valu…

---

## [Trying to Clone Git Repo But Not Sure How to Handle RSA Keys](https://forum.ansible.com/t/trying-to-clone-git-repo-but-not-sure-how-to-handle-rsa-keys/19465)

<div class="topic-metadata">

**Author:** [@Justin\_Neel](https://forum.ansible.com/u/Justin_Neel)\
**Replies:** 1\
**Last updated:** [October 8, 2015, 3:36pm UTC](https://forum.ansible.com/t/trying-to-clone-git-repo-but-not-sure-how-to-handle-rsa-keys/19465 "2015-10-08T15:36:43Z")

</div>

Ok, so I’m somewhat new to running Vagrant. But I’m getting better. I’ve been using Ansible as my provisioner of choice. What I would like to do now is create a task that will run a git clone of a hosted repo. It’s not g…

---

## [ansible2 -- filter\_plugins](https://forum.ansible.com/t/ansible2-filter-plugins/19448)

<div class="topic-metadata">

**Author:** [@cohen.ben](https://forum.ansible.com/u/cohen.ben)\
**Replies:** 1\
**Last updated:** [October 8, 2015, 2:44pm UTC](https://forum.ansible.com/t/ansible2-filter-plugins/19448 "2015-10-08T14:44:45Z")

</div>

I wanted to start looking at ansible 2 now that its in beta – most things are working for me out of the box – but I have a very simple custom filter that I need to use which isn’t being discovered: sts-infrastructure (m…

---

## [please help me translate command "sudo apt-get dist-upgrade docker-engine-cs" to Ansible task](https://forum.ansible.com/t/please-help-me-translate-command-sudo-apt-get-dist-upgrade-docker-engine-cs-to-ansible-task/19464)

<div class="topic-metadata">

**Author:** [@Michal\_Zwierzchowski](https://forum.ansible.com/u/Michal_Zwierzchowski)\
**Replies:** 0\
**Last updated:** [October 8, 2015, 2:31pm UTC](https://forum.ansible.com/t/please-help-me-translate-command-sudo-apt-get-dist-upgrade-docker-engine-cs-to-ansible-task/19464 "2015-10-08T14:31:53Z")

</div>

Hi guys, Please help me translate command “sudo apt-get dist-upgrade docker-engine-cs” to Ansible task. Thanks, Michal.

---

## [WINRM issue with domain user - some works and some dont](https://forum.ansible.com/t/winrm-issue-with-domain-user-some-works-and-some-dont/19154)

<div class="topic-metadata">

**Author:** [@Eyal\_Zarchi](https://forum.ansible.com/u/Eyal_Zarchi)\
**Replies:** 10\
**Last updated:** [October 8, 2015, 2:11pm UTC](https://forum.ansible.com/t/winrm-issue-with-domain-user-some-works-and-some-dont/19154 "2015-10-08T14:11:47Z")

</div>

Hi. we have a few windows server 2008 R2 that we would like to use the winrm module. we have similar machines that some work and some dont. i compared the build of the machine, the build of the powershell and even loca…

---

## [Can I splih group\_vars variables in more than one file?](https://forum.ansible.com/t/can-i-splih-group-vars-variables-in-more-than-one-file/19460)

<div class="topic-metadata">

**Author:** [@Klemen\_Kobetic](https://forum.ansible.com/u/Klemen_Kobetic)\
**Replies:** 1\
**Last updated:** [October 8, 2015, 1:44pm UTC](https://forum.ansible.com/t/can-i-splih-group-vars-variables-in-more-than-one-file/19460 "2015-10-08T13:44:00Z")

</div>

I now have group\_vars/webservers is there a way that I make, let’s say group\_vars/webservers.part1 and group\_vars/webservers.part2 ? my point is that those files would be stil automatically picked up by ansible (becau…

---

## [Merging 2 complex dictionary vars](https://forum.ansible.com/t/merging-2-complex-dictionary-vars/19462)

<div class="topic-metadata">

**Author:** [@Amir\_Luzon](https://forum.ansible.com/u/Amir_Luzon)\
**Replies:** 0\
**Last updated:** [October 8, 2015, 9:23am UTC](https://forum.ansible.com/t/merging-2-complex-dictionary-vars/19462 "2015-10-08T09:23:43Z")

</div>

Hey guys, so we have a complex variable which we would like ansible to merge. It does not seem to be doing this and i am trying to figure out why this is happening (hash\_behaviour=merge is configured). here is the info…

---

## [error executing raw on windows remote](https://forum.ansible.com/t/error-executing-raw-on-windows-remote/19454)

<div class="topic-metadata">

**Author:** [@Thorsten\_Klaus](https://forum.ansible.com/u/Thorsten_Klaus)\
**Replies:** 3\
**Last updated:** [October 8, 2015, 7:41am UTC](https://forum.ansible.com/t/error-executing-raw-on-windows-remote/19454 "2015-10-08T07:41:22Z")

</div>

Hi everyone, I am already running multiple tasks using raw on my windows remote. The patch that is mentioned in previouse posts (KB2842230) is already installed. When I am running my playbook, I am getting the followin…

---

## [idea: invoke tags for roles in role definition](https://forum.ansible.com/t/idea-invoke-tags-for-roles-in-role-definition/12740)

<div class="topic-metadata">

**Author:** [@Mattias\_Gees](https://forum.ansible.com/u/Mattias_Gees)\
**Replies:** 23\
**Last updated:** [October 7, 2015, 10:37pm UTC](https://forum.ansible.com/t/idea-invoke-tags-for-roles-in-role-definition/12740 "2015-10-07T22:37:11Z")

</div>

I think it would be a good idea to make it possible to invoke tags when you define a role in you playbook. For example we have a yum-repos roles with multiple repository definitions in it. All these repository’s are tag…

---

## [Ansible deployment script, variable hosts value](https://forum.ansible.com/t/ansible-deployment-script-variable-hosts-value/19455)

<div class="topic-metadata">

**Author:** [@Rob\_Wilkerson](https://forum.ansible.com/u/Rob_Wilkerson)\
**Replies:** 4\
**Last updated:** [October 7, 2015, 9:14pm UTC](https://forum.ansible.com/t/ansible-deployment-script-variable-hosts-value/19455 "2015-10-07T21:14:59Z")

</div>

I’m tipping my toe in the Ansible pool via a simple project deployment script. I have 3 environments (the usual dev, staging, production) and the deployment is exactly the same for each. In every example I’ve seen so far…

---

## [Unspecified GSS failure](https://forum.ansible.com/t/unspecified-gss-failure/19457)

<div class="topic-metadata">

**Author:** [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Replies:** 2\
**Last updated:** [October 7, 2015, 8:15pm UTC](https://forum.ansible.com/t/unspecified-gss-failure/19457 "2015-10-07T20:15:26Z")

</div>

Hi all, I’m getting a new error I’ve never seen before. Control node is Centos7. When trying to use a domain account I’m getting this error when running ansible: MSC10051.domain.local | FAILED =\> Traceback (most recent…

---

## [windows modules; strict mode; use of Latest](https://forum.ansible.com/t/windows-modules-strict-mode-use-of-latest/19391)

<div class="topic-metadata">

**Author:** [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Replies:** 3\
**Last updated:** [October 7, 2015, 8:10pm UTC](https://forum.ansible.com/t/windows-modules-strict-mode-use-of-latest/19391 "2015-10-07T20:10:06Z")

</div>

Following on from the discussion here temporarily disable strictmode by trondhindenes · Pull Request #12525 · ansible/ansible · GitHub its clear that strict mode is here to stay for powershell based modules. I’d like to…

---

## [Selecting hosts with softlayer.py dynamic inventory](https://forum.ansible.com/t/selecting-hosts-with-softlayer-py-dynamic-inventory/19442)

<div class="topic-metadata">

**Author:** [@Bedwyr\_Humphreys](https://forum.ansible.com/u/Bedwyr_Humphreys)\
**Replies:** 3\
**Last updated:** [October 7, 2015, 8:03pm UTC](https://forum.ansible.com/t/selecting-hosts-with-softlayer-py-dynamic-inventory/19442 "2015-10-07T20:03:49Z")

</div>

Hi, I’m trying to use a dynamic inventory to configure Softlayer hosts. My scripts are working with a static inventory file where I specify things like \[BACKUP\_SERVER\] 10.000.00.00 \[JIRA\] 10.111.11.11 Now i want to…

---

## [gathering smart and ansible\_env behaviour](https://forum.ansible.com/t/gathering-smart-and-ansible-env-behaviour/19439)

<div class="topic-metadata">

**Author:** [@Darragh\_Bailey](https://forum.ansible.com/u/Darragh_Bailey)\
**Replies:** 2\
**Last updated:** [October 7, 2015, 2:37pm UTC](https://forum.ansible.com/t/gathering-smart-and-ansible-env-behaviour/19439 "2015-10-07T14:37:45Z")

</div>

Hi, Encountered somewhat surprising behaviour regarding what happens when you enable smart fact gathering, have some plays using ‘become: yes’ at the top level along with using ansible\_env\[‘USER’\] and ansible\_env\[‘HOME’…

---

## [why ansible skips hosts even after using add-host module in bootstrapping EC2 instances](https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456)

<div class="topic-metadata">

**Author:** [@Diwaakartg\_Ganesh](https://forum.ansible.com/u/Diwaakartg_Ganesh)\
**Replies:** 1\
**Last updated:** [October 7, 2015, 1:27pm UTC](https://forum.ansible.com/t/why-ansible-skips-hosts-even-after-using-add-host-module-in-bootstrapping-ec2-instances/19456 "2015-10-07T13:27:54Z")

</div>

ansible - 1.9.3 Dynamic inventory is used. bootstrapping an EC2 instance and adding the instance to host using add-host, but it skips the plays for the newly created hosts. But when running the play next time, it finds …

---

## [Build /etc/hosts with template](https://forum.ansible.com/t/build-etc-hosts-with-template/19453)

<div class="topic-metadata">

**Author:** [@jepper](https://forum.ansible.com/u/jepper)\
**Replies:** 0\
**Last updated:** [October 7, 2015, 9:08am UTC](https://forum.ansible.com/t/build-etc-hosts-with-template/19453 "2015-10-07T09:08:48Z")

</div>

I have a template to build /etc/hosts by taking stuff from the inventory file. It’s fragile to be sure, and I’m looking for suggestions. Here what I have so far: $ cat hosts.j2 127.0.0.1 localhost localhost.localdomain…

---

## [Enhancing model data](https://forum.ansible.com/t/enhancing-model-data/19452)

<div class="topic-metadata">

**Author:** [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Replies:** 0\
**Last updated:** [October 7, 2015, 8:10am UTC](https://forum.ansible.com/t/enhancing-model-data/19452 "2015-10-07T08:10:50Z")

</div>

Hello, I have a model/dictionary as YAML and want to define default values before using the model in several templates. t\_default: bar p\_default: 42 cfg: h1: t: foo h2: p: 1 Now I want to prepare cfg so that cfg…

---

## [When I use azure module , I saw "PEM\_read\_bio:no start line:pem\_lib.c:703:Expecting: TRUSTED CERTIFICATE"](https://forum.ansible.com/t/when-i-use-azure-module-i-saw-pem-read-bio-no-start-line-pem-lib-cexpecting-trusted-certificate/19451)

<div class="topic-metadata">

**Author:** [@Takeshi\_Kuramochi](https://forum.ansible.com/u/Takeshi_Kuramochi)\
**Replies:** 0\
**Last updated:** [October 7, 2015, 8:00am UTC](https://forum.ansible.com/t/when-i-use-azure-module-i-saw-pem-read-bio-no-start-line-pem-lib-cexpecting-trusted-certificate/19451 "2015-10-07T08:00:29Z")

</div>

Hi all, Ansible 2.0.0 alpha 2 azure python module 1.0.2 python 2.7.6 Also, I try to use #2114 because it has exists issue(#2014). openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mycert.pem -out mycert.pem …

---

## [syntax error while loading yaml script](https://forum.ansible.com/t/syntax-error-while-loading-yaml-script/19437)

<div class="topic-metadata">

**Author:** [@ansible\_novice1](https://forum.ansible.com/u/ansible_novice1)\
**Replies:** 7\
**Last updated:** [October 7, 2015, 7:47am UTC](https://forum.ansible.com/t/syntax-error-while-loading-yaml-script/19437 "2015-10-07T07:47:32Z")

</div>

I\`m trying to launch one playbook:

---

## [Windows Server 2012 R2 - Process is terminated due to StackOverflowException.](https://forum.ansible.com/t/windows-server-2012-r2-process-is-terminated-due-to-stackoverflowexception/19378)

<div class="topic-metadata">

**Author:** [@Amir\_Luzon](https://forum.ansible.com/u/Amir_Luzon)\
**Replies:** 9\
**Last updated:** [October 7, 2015, 7:30am UTC](https://forum.ansible.com/t/windows-server-2012-r2-process-is-terminated-due-to-stackoverflowexception/19378 "2015-10-07T07:30:36Z")

</div>

I am running a playbook on this machine an i am recieving the following error: 2015-09-29 15:35:46,339 p=13487 u=deploy\_rn | failed: \[some\_host\] =\> (item=default) =\> {“failed”: true, “item”: “default”, “parsed”: false} …

---

## [docs update](https://forum.ansible.com/t/docs-update/19446)

<div class="topic-metadata">

**Author:** [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Replies:** 2\
**Last updated:** [October 6, 2015, 9:35pm UTC](https://forum.ansible.com/t/docs-update/19446 "2015-10-06T21:35:45Z")

</div>

I was just wondering: How/when are doc updates moved to the live website? I made some changes to the Windows module dev guide which got merged last week, but I still don’t see the updates on docs.ansible.com.

---

## [Converting lookup plugin to V2](https://forum.ansible.com/t/converting-lookup-plugin-to-v2/19447)

<div class="topic-metadata">

**Author:** [@mmorris](https://forum.ansible.com/u/mmorris)\
**Replies:** 0\
**Last updated:** [October 6, 2015, 4:41pm UTC](https://forum.ansible.com/t/converting-lookup-plugin-to-v2/19447 "2015-10-06T16:41:16Z")

</div>

Hi all, I am trying to convert my one lookup plugin to the new V2 version and because I am not the original creator, I am at a loss for what still needs to be done. This is what I currently have: https://gist.github.co…

---

## [Gathering ec2 instance facts with only a region and instance id?](https://forum.ansible.com/t/gathering-ec2-instance-facts-with-only-a-region-and-instance-id/19441)

<div class="topic-metadata">

**Author:** [@Frank\_Perks](https://forum.ansible.com/u/Frank_Perks)\
**Replies:** 3\
**Last updated:** [October 6, 2015, 12:43pm UTC](https://forum.ansible.com/t/gathering-ec2-instance-facts-with-only-a-region-and-instance-id/19441 "2015-10-06T12:43:48Z")

</div>

So i have a small problem, the only thing i have from the output of another tool is just an instance\_id, along with its region. I need to grab some more information about the ec2 instance (such as the platform, tags, etc…

---

## [Ansible 2.0 is BETA!](https://forum.ansible.com/t/ansible-2-0-is-beta/19444)

<div class="topic-metadata">

**Author:** [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Replies:** 0\
**Last updated:** [October 6, 2015, 12:42pm UTC](https://forum.ansible.com/t/ansible-2-0-is-beta/19444 "2015-10-06T12:42:54Z")

</div>

Hi all, I’m very happy to announce the first beta release of Ansible 2.0! In case you missed the original update in the alpha release, here’s a quick break down of some of the new features in 2.0: Blocks, which allow …

---

## [multiple tag name in hosts](https://forum.ansible.com/t/multiple-tag-name-in-hosts/19443)

<div class="topic-metadata">

**Author:** [@Igal\_Dahan](https://forum.ansible.com/u/Igal_Dahan)\
**Replies:** 0\
**Last updated:** [October 6, 2015, 11:59am UTC](https://forum.ansible.com/t/multiple-tag-name-in-hosts/19443 "2015-10-06T11:59:10Z")

</div>

Hi could i use multiple tag\_Name in hosts for AWS? and How? Igal lets say i have those tags: Environment: DevOps App: Attribution Role: Web and i want something like : hosts: tag\_Environment\_DevOps…

[Previous page](https://forum.ansible.com/latest.md?page=827)

[Next page](https://forum.ansible.com/latest.md?page=829)
