# Latest

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

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

**Page:** 771

---

## [Use group\_vars with Dynamic Inventory](https://forum.ansible.com/t/use-group-vars-with-dynamic-inventory/21222)

<div class="topic-metadata">

**Author:** [@rajat.gupta712](https://forum.ansible.com/u/rajat.gupta712)\
**Replies:** 0\
**Last updated:** [April 20, 2016, 4:23pm UTC](https://forum.ansible.com/t/use-group-vars-with-dynamic-inventory/21222 "2016-04-20T16:23:22Z")

</div>

Hello all, I am trying to use group vars with dynamic inventory file ec2.py and It is not working. Can anyone help me how can I use group vars with dynamic inventory? i am doing like hosts: my\_host:tag\_env\_uat and i…

---

## [bare variables deprecated, what am I suppose to use instead?](https://forum.ansible.com/t/bare-variables-deprecated-what-am-i-suppose-to-use-instead/21219)

<div class="topic-metadata">

**Author:** [@Willjw1](https://forum.ansible.com/u/Willjw1)\
**Replies:** 0\
**Last updated:** [April 20, 2016, 2:12pm UTC](https://forum.ansible.com/t/bare-variables-deprecated-what-am-i-suppose-to-use-instead/21219 "2016-04-20T14:12:18Z")

</div>

I’d posted this in Ansible Project but didn’t get a response. Is there another valid way of building a variable in ansible? So first I’ll point out that we probably aren’t using this the standard way. I get that. But pl…

---

## [Emulating host\_vars and group\_vars for files](https://forum.ansible.com/t/emulating-host-vars-and-group-vars-for-files/18013)

<div class="topic-metadata">

**Author:** [@Anand\_Buddhdev2](https://forum.ansible.com/u/Anand_Buddhdev2)\
**Replies:** 8\
**Last updated:** [April 20, 2016, 10:15am UTC](https://forum.ansible.com/t/emulating-host-vars-and-group-vars-for-files/18013 "2016-04-20T10:15:09Z")

</div>

Dear Ansible developers and users, I really like the groups\_vars and host\_vars concept of Ansible, and I was thinking of a way to emulate this for files. So here’s an example playbook: hosts: all tasks: debug: var=it…

---

## [Impossible to use "with\_subelements"...](https://forum.ansible.com/t/impossible-to-use-with-subelements/21217)

<div class="topic-metadata">

**Author:** [@Clement\_VALENTIN](https://forum.ansible.com/u/Clement_VALENTIN)\
**Replies:** 1\
**Last updated:** [April 20, 2016, 9:30am UTC](https://forum.ansible.com/t/impossible-to-use-with-subelements/21217 "2016-04-20T09:30:17Z")

</div>

Hi, I try to use function “with\_subelements” with module mysql\_user to create an user with multiple host with a dict. But i can’t do this :frowning: roles/vars/main.yml : TEST: name: TEST300 app\_MySQLHost: “127.0…

---

## [How to change active directory using ansible](https://forum.ansible.com/t/how-to-change-active-directory-using-ansible/21216)

<div class="topic-metadata">

**Author:** [@Mick\_st\_john](https://forum.ansible.com/u/Mick_st_john)\
**Replies:** 1\
**Last updated:** [April 20, 2016, 9:15am UTC](https://forum.ansible.com/t/how-to-change-active-directory-using-ansible/21216 "2016-04-20T09:15:11Z")

</div>

I am trying to change my active directory to a directory which has a script that I want to run. Playbook:

---

## [Can't get os\_network to work.](https://forum.ansible.com/t/cant-get-os-network-to-work/21206)

<div class="topic-metadata">

**Author:** [@Cees\_Moerkerken](https://forum.ansible.com/u/Cees_Moerkerken)\
**Replies:** 2\
**Last updated:** [April 20, 2016, 9:08am UTC](https://forum.ansible.com/t/cant-get-os-network-to-work/21206 "2016-04-20T09:08:17Z")

</div>

Hi all, I have successfully managed to deploy some cloud servers with ansible 2.0 on openstack, but seem to get stuck on creating the network. State should not be required according to http://docs.ansible.com/ansible/o…

---

## [ansible connection failure](https://forum.ansible.com/t/ansible-connection-failure/21202)

<div class="topic-metadata">

**Author:** [@John.1209](https://forum.ansible.com/u/John.1209)\
**Replies:** 1\
**Last updated:** [April 20, 2016, 8:09am UTC](https://forum.ansible.com/t/ansible-connection-failure/21202 "2016-04-20T08:09:04Z")

</div>

I issue the following command on a host: ssh remote-host uptime and I get the expected answer. I issue the following command on a host: ansible remote-host -m command -a uptime -vvvvv and I get a no hosts matched. I…

---

## [ansible with azure](https://forum.ansible.com/t/ansible-with-azure/21213)

<div class="topic-metadata">

**Author:** [@yaniv\_refael](https://forum.ansible.com/u/yaniv_refael)\
**Replies:** 1\
**Last updated:** [April 20, 2016, 7:51am UTC](https://forum.ansible.com/t/ansible-with-azure/21213 "2016-04-20T07:51:04Z")

</div>

I started to work with Ansible with azure. I need to use dynamic inventory. I provision new vm image using Ansible and its work fine. but when I try to do it with image that I capture it failed with error "OSImage tmpl…

---

## [not able to import dispay module](https://forum.ansible.com/t/not-able-to-import-dispay-module/21214)

<div class="topic-metadata">

**Author:** [@prakul\_singhal](https://forum.ansible.com/u/prakul_singhal)\
**Replies:** 0\
**Last updated:** [April 20, 2016, 4:35am UTC](https://forum.ansible.com/t/not-able-to-import-dispay-module/21214 "2016-04-20T04:35:05Z")

</div>

Hi, I develop a security module for adding firewall rules irrespective of OS centos 6/centos7 or Ubuntu.But for ubuntu user i am try to give some warning using " from ansible.utils.display import Display" module in ansi…

---

## [Any way to gather localhost information to use in templates for remote hosts?](https://forum.ansible.com/t/any-way-to-gather-localhost-information-to-use-in-templates-for-remote-hosts/21212)

<div class="topic-metadata">

**Author:** [@Brian\_Huddleston](https://forum.ansible.com/u/Brian_Huddleston)\
**Replies:** 1\
**Last updated:** [April 20, 2016, 3:01am UTC](https://forum.ansible.com/t/any-way-to-gather-localhost-information-to-use-in-templates-for-remote-hosts/21212 "2016-04-20T03:01:43Z")

</div>

I’m trying to write a task that updates the MODT (Message of the Day) for the target host the playbook is touching. I’m trying to capture localhost information and the and add those to the MOTD for each target host th…

---

## [copy module with hard link destination](https://forum.ansible.com/t/copy-module-with-hard-link-destination/16693)

<div class="topic-metadata">

**Author:** [@Sean\_McGowan](https://forum.ansible.com/u/Sean_McGowan)\
**Replies:** 5\
**Last updated:** [April 19, 2016, 11:53pm UTC](https://forum.ansible.com/t/copy-module-with-hard-link-destination/16693 "2016-04-19T23:53:02Z")

</div>

Background: I am using Ansible 1.5 on RedHat. Apparently system-config-network creates a hard link to /etc/hosts and /etc/resolve.conf. I want to be able to copy the correct hosts file in place if is not there, whether o…

---

## [Ansible 2.0.2.0 has been released](https://forum.ansible.com/t/ansible-2-0-2-0-has-been-released/21210)

<div class="topic-metadata">

**Author:** [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Replies:** 0\
**Last updated:** [April 19, 2016, 10:14pm UTC](https://forum.ansible.com/t/ansible-2-0-2-0-has-been-released/21210 "2016-04-19T22:14:23Z")

</div>

Hi all, 2.0.2.0 has been released, and is now available. This release continues to fix bugs introduced in the 2.0 release, as well as one security bug: SECURITY: Fix lxc\_container module having predictable temp file n…

---

## [Skip tag 'always' in a role if no tasks in that role are executed](https://forum.ansible.com/t/skip-tag-always-in-a-role-if-no-tasks-in-that-role-are-executed/21179)

<div class="topic-metadata">

**Author:** [@Strahinja\_Kustudic](https://forum.ansible.com/u/Strahinja_Kustudic)\
**Replies:** 10\
**Last updated:** [April 19, 2016, 6:24pm UTC](https://forum.ansible.com/t/skip-tag-always-in-a-role-if-no-tasks-in-that-role-are-executed/21179 "2016-04-19T18:24:52Z")

</div>

For example if I have a playbook like this: \` // site.yml

---

## [Use results from facts](https://forum.ansible.com/t/use-results-from-facts/21205)

<div class="topic-metadata">

**Author:** [@lunser](https://forum.ansible.com/u/lunser)\
**Replies:** 1\
**Last updated:** [April 19, 2016, 4:56pm UTC](https://forum.ansible.com/t/use-results-from-facts/21205 "2016-04-19T16:56:27Z")

</div>

Hi, I am getting facts from the ec2\_vpc\_net\_facts module which I’m trying to grab the vpc-id from the output and use it as a variable to create a security group. This seems that it should be easy enough and I’ve read th…

---

## [set\_fact is not a valid attribute for a Play](https://forum.ansible.com/t/set-fact-is-not-a-valid-attribute-for-a-play/21197)

<div class="topic-metadata">

**Author:** [@darknight](https://forum.ansible.com/u/darknight)\
**Replies:** 3\
**Last updated:** [April 19, 2016, 4:15pm UTC](https://forum.ansible.com/t/set-fact-is-not-a-valid-attribute-for-a-play/21197 "2016-04-19T16:15:16Z")

</div>

Hi Everyone, I am a newbie using ansible and trying to write a playbook. I was encountering an issue with using set\_fact variable in my play and not sure where i am going wrong . could any one correct me on this error. …

---

## [How to loop on a parameter file the play of the playbook](https://forum.ansible.com/t/how-to-loop-on-a-parameter-file-the-play-of-the-playbook/21189)

<div class="topic-metadata">

**Author:** [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Replies:** 1\
**Last updated:** [April 19, 2016, 10:32am UTC](https://forum.ansible.com/t/how-to-loop-on-a-parameter-file-the-play-of-the-playbook/21189 "2016-04-19T10:32:10Z")

</div>

Hello, I would like to use only parameters in my playbook and so to use an external variables file to set the host, user, http parameters etc … so my playbook would loop on it. Is this possible ? Here is an explainati…

---

## [can extra-vars be a parameter from the host file ?](https://forum.ansible.com/t/can-extra-vars-be-a-parameter-from-the-host-file/21190)

<div class="topic-metadata">

**Author:** [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Replies:** 4\
**Last updated:** [April 19, 2016, 10:31am UTC](https://forum.ansible.com/t/can-extra-vars-be-a-parameter-from-the-host-file/21190 "2016-04-19T10:31:20Z")

</div>

Hello, I would like to set a lot of parameters when playing my playbook, depending on the server/user where it will be deployed so the idea is to set it in the hosts file. It doesn’t seem to work as my varaibles are no…

---

## [Can't pass seem to pass list of variables to ansible via variables file](https://forum.ansible.com/t/cant-pass-seem-to-pass-list-of-variables-to-ansible-via-variables-file/21191)

<div class="topic-metadata">

**Author:** [@Joseph\_DJOMEDA](https://forum.ansible.com/u/Joseph_DJOMEDA)\
**Replies:** 1\
**Last updated:** [April 19, 2016, 8:46am UTC](https://forum.ansible.com/t/cant-pass-seem-to-pass-list-of-variables-to-ansible-via-variables-file/21191 "2016-04-19T08:46:33Z")

</div>

Hello Gurus, I have been banging my head against the wall about this issue. With the variable below: serviceinstaller\_deployment\_details: { “service\_name”: “cardmanagement”, “artifact\_location”: “{{ javamicroapp\_de…

---

## [get\_url is not a valid attribute for play](https://forum.ansible.com/t/get-url-is-not-a-valid-attribute-for-play/21200)

<div class="topic-metadata">

**Author:** [@darknight](https://forum.ansible.com/u/darknight)\
**Replies:** 1\
**Last updated:** [April 19, 2016, 7:51am UTC](https://forum.ansible.com/t/get-url-is-not-a-valid-attribute-for-play/21200 "2016-04-19T07:51:49Z")

</div>

Hi, I am totally confused about why i cannot use the get\_url attribute in a play i was writing. I get the above error when i try to run the play-book. I am not sure why this is happening and i am totally lost of whats w…

---

## [retry file not generated if failed hosts associated to succeded hosts](https://forum.ansible.com/t/retry-file-not-generated-if-failed-hosts-associated-to-succeded-hosts/21203)

<div class="topic-metadata">

**Author:** [@nickwe3](https://forum.ansible.com/u/nickwe3)\
**Replies:** 0\
**Last updated:** [April 19, 2016, 7:48am UTC](https://forum.ansible.com/t/retry-file-not-generated-if-failed-hosts-associated-to-succeded-hosts/21203 "2016-04-19T07:48:08Z")

</div>

Hello, I don’t know if it’s a bug or not, so I prefer to ask first: ansible --version ansible 2.1.0 (devel 0e2f1b423d) last updated 2016/04/19 09:21:18 (GMT +200) lib/ansible/modules/core: (detached HEAD 5409ed1b28) la…

---

## [Ansible Netscaler  error](https://forum.ansible.com/t/ansible-netscaler-error/21167)

<div class="topic-metadata">

**Author:** [@gsong](https://forum.ansible.com/u/gsong)\
**Replies:** 1\
**Last updated:** [April 19, 2016, 7:09am UTC](https://forum.ansible.com/t/ansible-netscaler-error/21167 "2016-04-19T07:09:58Z")

</div>

Dear All, My command is : ansible localhost -m netscaler -a “nsc\_host=nsc.example user=user password=password name=node1.example.com type=service action=disable validate\_certs=False” got error : “‘NoneType’ object ha…

---

## [Need help on Dynamic Inventory (AWS) with Ansible](https://forum.ansible.com/t/need-help-on-dynamic-inventory-aws-with-ansible/21198)

<div class="topic-metadata">

**Author:** [@MrVegas](https://forum.ansible.com/u/MrVegas)\
**Replies:** 1\
**Last updated:** [April 18, 2016, 6:53pm UTC](https://forum.ansible.com/t/need-help-on-dynamic-inventory-aws-with-ansible/21198 "2016-04-18T18:53:04Z")

</div>

Hi Guys, I was following the dynamic inventory guide here for AWS EC2 Inventory Script http://docs.ansible.com/ansible/intro\_dynamic\_inventory.html#example-aws-ec2-external-inventory-script Unfortunately when I get to…

---

## [Ansible error code for a role, not each ansible task](https://forum.ansible.com/t/ansible-error-code-for-a-role-not-each-ansible-task/21196)

<div class="topic-metadata">

**Author:** [@Richard\_M](https://forum.ansible.com/u/Richard_M)\
**Replies:** 0\
**Last updated:** [April 18, 2016, 3:58pm UTC](https://forum.ansible.com/t/ansible-error-code-for-a-role-not-each-ansible-task/21196 "2016-04-18T15:58:32Z")

</div>

Is it possible to capture an error code (success/failure) at the level of an ansible role and not each individual task? We have a rather complex ansible playbook with multiple roles and would like to be able to log (on …

---

## [Dynamic inventory not working in playbook](https://forum.ansible.com/t/dynamic-inventory-not-working-in-playbook/21192)

<div class="topic-metadata">

**Author:** [@Pavanan\_M\_S](https://forum.ansible.com/u/Pavanan_M_S)\
**Replies:** 0\
**Last updated:** [April 18, 2016, 2:06pm UTC](https://forum.ansible.com/t/dynamic-inventory-not-working-in-playbook/21192 "2016-04-18T14:06:50Z")

</div>

Hi all, I am using a playbook to create a GCE VM intance and deploy some code to it. I was hard coding the IP of the created instance until i realized the use of dynamic inventories. I downloaded gce.py and made it exe…

---

## [Random "'ansible\_hostname' is undefined" errors](https://forum.ansible.com/t/random-ansible-hostname-is-undefined-errors/21180)

<div class="topic-metadata">

**Author:** [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Replies:** 5\
**Last updated:** [April 18, 2016, 1:30pm UTC](https://forum.ansible.com/t/random-ansible-hostname-is-undefined-errors/21180 "2016-04-18T13:30:55Z")

</div>

I have a weird issue where occasionally when I run a playbook that has a task which uses the {{ ansible\_hostname }} variable in it, I get an error “‘ansible\_hostname’ is undefined”. In most cases, if I re-run the playboo…

---

## [Ansible AD Domain Authentication](https://forum.ansible.com/t/ansible-ad-domain-authentication/21091)

<div class="topic-metadata">

**Author:** [@Mark\_Matthews](https://forum.ansible.com/u/Mark_Matthews)\
**Replies:** 15\
**Last updated:** [April 18, 2016, 10:23am UTC](https://forum.ansible.com/t/ansible-ad-domain-authentication/21091 "2016-04-18T10:23:26Z")

</div>

Hi Currently I have been connecting to servers to using local server accounts, and therefore my ‘group\_vars/winservers.yml’ file has looked like the following: ansible\_ssh\_user: Administrator ansible\_ssh\_pass: PASSWOR…

---

## [ssh connection is broken while running task.](https://forum.ansible.com/t/ssh-connection-is-broken-while-running-task/21148)

<div class="topic-metadata">

**Author:** [@selvam\_vasu](https://forum.ansible.com/u/selvam_vasu)\
**Replies:** 1\
**Last updated:** [April 18, 2016, 8:12am UTC](https://forum.ansible.com/t/ssh-connection-is-broken-while-running-task/21148 "2016-04-18T08:12:40Z")

</div>

Hi, I have playbook which has 4 tasks on that. The task are running on more than 10 remote hosts. The first two tasks are ever running without any problem. But when the third task is running, The am getting error like “…

---

## [lineinfile behavior replace line if found, add line if not found?](https://forum.ansible.com/t/lineinfile-behavior-replace-line-if-found-add-line-if-not-found/21184)

<div class="topic-metadata">

**Author:** [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Replies:** 2\
**Last updated:** [April 18, 2016, 7:31am UTC](https://forum.ansible.com/t/lineinfile-behavior-replace-line-if-found-add-line-if-not-found/21184 "2016-04-18T07:31:21Z")

</div>

Struggling with lineinfile behavior. The general question: can lineinfile be used to replace a line in a file if it’s found and if it’s not found add the line to the file? I’ve seen posts saying yes, same saying no, sa…

---

## [How can I output debug info from ansible API](https://forum.ansible.com/t/how-can-i-output-debug-info-from-ansible-api/21187)

<div class="topic-metadata">

**Author:** [@Andy3](https://forum.ansible.com/u/Andy3)\
**Replies:** 0\
**Last updated:** [April 18, 2016, 6:57am UTC](https://forum.ansible.com/t/how-can-i-output-debug-info-from-ansible-api/21187 "2016-04-18T06:57:20Z")

</div>

Hi experts, I am using ansible pre 2.0 api, I meet one problem when use the api to connect to other host, and this is a random bug, I want to enable ansible debug for track this issue, but I didn’t find how to enable de…

---

## [Discussion of open proposals at upcoming core team meeting](https://forum.ansible.com/t/discussion-of-open-proposals-at-upcoming-core-team-meeting/21186)

<div class="topic-metadata">

**Author:** [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Replies:** 0\
**Last updated:** [April 18, 2016, 4:51am UTC](https://forum.ansible.com/t/discussion-of-open-proposals-at-upcoming-core-team-meeting/21186 "2016-04-18T04:51:37Z")

</div>

Now that our proposal process is underway, we've got some open proposals to discuss: https://github.com/ansible/proposals/issues We'd like to have our first discussion period of these at our upcoming Core meeting on …

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

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