# Archives

**URL:** https://forum.ansible.com/c/archives/31.md?page=560

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

**Page:** 561

---

## [testing python / ansible modules](https://forum.ansible.com/t/testing-python-ansible-modules/22369)

<div class="topic-metadata">

**Author:** [@Alex\_Leonhardt](https://forum.ansible.com/u/Alex_Leonhardt)\
**Replies:** 0\
**Last updated:** [August 24, 2016, 2:05pm UTC](https://forum.ansible.com/t/testing-python-ansible-modules/22369 "2016-08-24T14:05:23Z")

</div>

Hi All, I was wondering if anyone ever wrote tests for an ansible module ? I’m trying to instantiate m = AnsibleModule(argument\_spec=dict()) but it keeps failing with “Error: Module unable to decode valid JSON on stdin…

---

## [common library for multiple modules](https://forum.ansible.com/t/common-library-for-multiple-modules/22367)

<div class="topic-metadata">

**Author:** [@Victor\_Volle](https://forum.ansible.com/u/Victor_Volle)\
**Replies:** 1\
**Last updated:** [August 24, 2016, 1:46pm UTC](https://forum.ansible.com/t/common-library-for-multiple-modules/22367 "2016-08-24T13:46:48Z")

</div>

We are currently refactoring the digitalocean modules (not use an external library, migrate everything to the v2 API). all modules (do\_droplet, do\_tag, do\_sshkey, do\_domain, do\_storage) will need some common code. The …

---

## [Module "include\_vars" fails with when using "file" parameter](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22359)

<div class="topic-metadata">

**Author:** [@Frank\_Thommen](https://forum.ansible.com/u/Frank_Thommen)\
**Replies:** 1\
**Last updated:** [August 24, 2016, 10:45am UTC](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22359 "2016-08-24T10:45:57Z")

</div>

Hi, when using the include\_module with the "file" parameter, it fails with AttributeError: 'NoneType' object has no attribute 'startswith'. This works fine: ----- testmyvars\_1.yml -----------

---

## [Howto to use a ansible-galaxy role in a task](https://forum.ansible.com/t/howto-to-use-a-ansible-galaxy-role-in-a-task/22368)

<div class="topic-metadata">

**Author:** [@Nathan\_Husken](https://forum.ansible.com/u/Nathan_Husken)\
**Replies:** 0\
**Last updated:** [August 24, 2016, 10:32am UTC](https://forum.ansible.com/t/howto-to-use-a-ansible-galaxy-role-in-a-task/22368 "2016-08-24T10:32:59Z")

</div>

Hi, I have a ansible playbook which setups the configuration of my work computer (which uses fedora). I discovered https://galaxy.ansible.com/eddyhub/gnome\_shell/ which allows me to install gnome extensions. But I am u…

---

## [ansible  become time out issue](https://forum.ansible.com/t/ansible-become-time-out-issue/22366)

<div class="topic-metadata">

**Author:** [@hzj.zh](https://forum.ansible.com/u/hzj.zh)\
**Replies:** 0\
**Last updated:** [August 24, 2016, 8:38am UTC](https://forum.ansible.com/t/ansible-become-time-out-issue/22366 "2016-08-24T08:38:19Z")

</div>

hello， come accross a problem, there is this special hosts, i just cannot use ansible to become root user; here is the ouput \[root@localhost ~\]# ansible host1 -m raw -a ‘uname -a’ -u admin4A -b --become-method=su -k …

---

## [Ansible playbook freezes at getting output with communicate()](https://forum.ansible.com/t/ansible-playbook-freezes-at-getting-output-with-communicate/22365)

<div class="topic-metadata">

**Author:** [@Ahmed1](https://forum.ansible.com/u/Ahmed1)\
**Replies:** 0\
**Last updated:** [August 24, 2016, 7:37am UTC](https://forum.ansible.com/t/ansible-playbook-freezes-at-getting-output-with-communicate/22365 "2016-08-24T07:37:14Z")

</div>

I’m using Ansible to auto configure a device that has an OS similar to Cisco IOS, the below playbook works fine but every 4 or 5 times I run it, it freezes, I’m setting ANSIBLE\_DEBUG=1, when it freezes, it does at the fo…

---

## [Ansible 2.1.0 docker\_container module not pulling image when missing on remote host](https://forum.ansible.com/t/ansible-2-1-0-docker-container-module-not-pulling-image-when-missing-on-remote-host/22364)

<div class="topic-metadata">

**Author:** [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Replies:** 0\
**Last updated:** [August 24, 2016, 6:22am UTC](https://forum.ansible.com/t/ansible-2-1-0-docker-container-module-not-pulling-image-when-missing-on-remote-host/22364 "2016-08-24T06:22:37Z")

</div>

The documentation says: Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry. But a simple usage of docker\_container: - name: start…

---

## [Apt-get simulate command](https://forum.ansible.com/t/apt-get-simulate-command/22338)

<div class="topic-metadata">

**Author:** [@Remi\_Morel](https://forum.ansible.com/u/Remi_Morel)\
**Replies:** 4\
**Last updated:** [August 24, 2016, 5:59am UTC](https://forum.ansible.com/t/apt-get-simulate-command/22338 "2016-08-24T05:59:10Z")

</div>

Hello, I have spend a lot of time to find a solution at this issue. I have a task : \` name: check updated package (Debian) command: apt-get -s install {{ item.item }} register: updateD when: (ansible\_os\_family ==…

---

## [group\_vars behavior changed in 2.1?](https://forum.ansible.com/t/group-vars-behavior-changed-in-2-1/22311)

<div class="topic-metadata">

**Author:** [@Vincent\_Jorgensen](https://forum.ansible.com/u/Vincent_Jorgensen)\
**Replies:** 5\
**Last updated:** [August 24, 2016, 5:07am UTC](https://forum.ansible.com/t/group-vars-behavior-changed-in-2-1/22311 "2016-08-24T05:07:19Z")

</div>

Hi all, I have an ansible project with a groups\_vars directory, with a subdirectory called all beneath it, like so: /project/group\_vars/all/ami.yml /project/group\_vars/all/dns.yml /project/group\_vars/all/key.yml Prev…

---

## [Ansible docs help](https://forum.ansible.com/t/ansible-docs-help/22318)

<div class="topic-metadata">

**Author:** [@Donald\_Blodgett](https://forum.ansible.com/u/Donald_Blodgett)\
**Replies:** 5\
**Last updated:** [August 23, 2016, 3:41pm UTC](https://forum.ansible.com/t/ansible-docs-help/22318 "2016-08-23T15:41:14Z")

</div>

I am trying to find the listing of descriptions, valid and default values for playbook play parameters similar to the module index that lists these for each of the modules. Can anyone point me in the correct direction? T…

---

## [stdout looks empty, but 'when' thinks it isn't?](https://forum.ansible.com/t/stdout-looks-empty-but-when-thinks-it-isnt/22342)

<div class="topic-metadata">

**Author:** [@Steve\_Kersley](https://forum.ansible.com/u/Steve_Kersley)\
**Replies:** 3\
**Last updated:** [August 23, 2016, 2:58pm UTC](https://forum.ansible.com/t/stdout-looks-empty-but-when-thinks-it-isnt/22342 "2016-08-23T14:58:32Z")

</div>

As an Ansible newcomer, I’m trying to write some scripts to standardize Cisco switch configuration. Unfortunately since Cisco doesn’t offer a way to clear existing configuration before setting (in this instance I’m wanti…

---

## [Running playbook ios\_command through bastion host](https://forum.ansible.com/t/running-playbook-ios-command-through-bastion-host/22305)

<div class="topic-metadata">

**Author:** [@Bharath\_Bharadwaj](https://forum.ansible.com/u/Bharath_Bharadwaj)\
**Replies:** 5\
**Last updated:** [August 23, 2016, 2:08pm UTC](https://forum.ansible.com/t/running-playbook-ios-command-through-bastion-host/22305 "2016-08-23T14:08:33Z")

</div>

Hi All, I have followed instructions on setting up bastion host from this article “https://gagor.pl/2016/04/use-bastion-host-with-ansible/” while I’m able to connect to my cisco switch through bastion host from a comman…

---

## [How to access inventory from custom action plugin v2](https://forum.ansible.com/t/how-to-access-inventory-from-custom-action-plugin-v2/22358)

<div class="topic-metadata">

**Author:** [@James\_Kinley](https://forum.ansible.com/u/James_Kinley)\
**Replies:** 1\
**Last updated:** [August 23, 2016, 1:39pm UTC](https://forum.ansible.com/t/how-to-access-inventory-from-custom-action-plugin-v2/22358 "2016-08-23T13:39:20Z")

</div>

Hi, How does one get access to the inventory from a custom action plugin? I’m able to do something like this to access host vars: task\_vars\[“hostvars”\]\[“my\_host”\]\[“ansible\_host”\] but I need to be able to iterate all ho…

---

## [Windows question - is anyone managing Applocker with Ansible?](https://forum.ansible.com/t/windows-question-is-anyone-managing-applocker-with-ansible/22303)

<div class="topic-metadata">

**Author:** [@nikobelia](https://forum.ansible.com/u/nikobelia)\
**Replies:** 2\
**Last updated:** [August 23, 2016, 1:23pm UTC](https://forum.ansible.com/t/windows-question-is-anyone-managing-applocker-with-ansible/22303 "2016-08-23T13:23:33Z")

</div>

Hi ansible-devel, Quick question for anyone running Ansible on Windows: has anyone used Ansible to configure Applocker? It’s a security/hardening/audit tool for Windows, replacing Software Restriction Policies. The nat…

---

## [lxd\_container changed on each playbook run](https://forum.ansible.com/t/lxd-container-changed-on-each-playbook-run/22357)

<div class="topic-metadata">

**Author:** [@Jonathan\_Rosser](https://forum.ansible.com/u/Jonathan_Rosser)\
**Replies:** 0\
**Last updated:** [August 23, 2016, 8:16am UTC](https://forum.ansible.com/t/lxd-container-changed-on-each-playbook-run/22357 "2016-08-23T08:16:32Z")

</div>

I create containers using the lxd\_containers module. The “apply\_container\_configs” action is run each time the playbook runs so the task is “changed” on every playbook run. Here is the verbose output http://pastebin.com…

---

## [Playbook freezes at "getting output with communicate()"](https://forum.ansible.com/t/playbook-freezes-at-getting-output-with-communicate/22356)

<div class="topic-metadata">

**Author:** [@Ahmed1](https://forum.ansible.com/u/Ahmed1)\
**Replies:** 0\
**Last updated:** [August 23, 2016, 7:54am UTC](https://forum.ansible.com/t/playbook-freezes-at-getting-output-with-communicate/22356 "2016-08-23T07:54:46Z")

</div>

Hello, I’m using Ansible to manage configuration of a device that has a similar terminal to Cisco devices, The below playbook works fine but for every 4 or 5 times it freezes at sometimes. I use Ansible-Debug=1, when t…

---

## [Module "include\_vars" fails with when using "file" parameter](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22355)

<div class="topic-metadata">

**Author:** [@Frank\_Thommen](https://forum.ansible.com/u/Frank_Thommen)\
**Replies:** 0\
**Last updated:** [August 23, 2016, 7:34am UTC](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22355 "2016-08-23T07:34:25Z")

</div>

Hi, when using the include\_module with the "file" parameter, it fails with AttributeError: 'NoneType' object has no attribute 'startswith'. This works fine: ----- testmyvars\_1.yml -----------

---

## [Ruby DSL Project Feedback](https://forum.ansible.com/t/ruby-dsl-project-feedback/22354)

<div class="topic-metadata">

**Author:** [@Brady\_Wied](https://forum.ansible.com/u/Brady_Wied)\
**Replies:** 0\
**Last updated:** [August 23, 2016, 6:50am UTC](https://forum.ansible.com/t/ruby-dsl-project-feedback/22354 "2016-08-23T06:50:58Z")

</div>

Hi all, I started this as an experiment but it might end up being useful. https://github.com/wied03/ansible-ruby The idea is (for those that like Ruby) to have a Ruby DSL that ultimately generates YML files for Ansibl…

---

## [How to make global variables for a short playbook?](https://forum.ansible.com/t/how-to-make-global-variables-for-a-short-playbook/22353)

<div class="topic-metadata">

**Author:** [@Mcnilla](https://forum.ansible.com/u/Mcnilla)\
**Replies:** 0\
**Last updated:** [August 23, 2016, 5:56am UTC](https://forum.ansible.com/t/how-to-make-global-variables-for-a-short-playbook/22353 "2016-08-23T05:56:40Z")

</div>

Hi, I want to share global variables for a short playbook. The problem is, I need to run some commands on all hosts, then some commands on one node, then some commands on all nodes again. I don’t want to repeat with\_vars…

---

## [template not looking in templates directory for included roles](https://forum.ansible.com/t/template-not-looking-in-templates-directory-for-included-roles/22336)

<div class="topic-metadata">

**Author:** [@Daniel\_Watrous](https://forum.ansible.com/u/Daniel_Watrous)\
**Replies:** 6\
**Last updated:** [August 23, 2016, 2:19am UTC](https://forum.ansible.com/t/template-not-looking-in-templates-directory-for-included-roles/22336 "2016-08-23T02:19:48Z")

</div>

I have a playbook with several roles. For example, I have an nginx role and a php role. Each has the typical directory structure. The nginx role has a template and a task for a virtualhost file that appears like this in …

---

## [Ansible 2.1.2 RC1 is ready for testing](https://forum.ansible.com/t/ansible-2-1-2-rc1-is-ready-for-testing/22351)

<div class="topic-metadata">

**Author:** [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Replies:** 0\
**Last updated:** [August 22, 2016, 10:00pm UTC](https://forum.ansible.com/t/ansible-2-1-2-rc1-is-ready-for-testing/22351 "2016-08-22T22:00:59Z")

</div>

Hi all, we’re happy to announce that RC1 for 2.1.2 is now available for testing. This release candidate fixes many bugs, including (but not limited to): Fixed a bug introduced by static includes in 2.1, which prevente…

---

## [How to change/redefine variables in nested dictionary?](https://forum.ansible.com/t/how-to-change-redefine-variables-in-nested-dictionary/22349)

<div class="topic-metadata">

**Author:** [@Dmitry\_Owl](https://forum.ansible.com/u/Dmitry_Owl)\
**Replies:** 0\
**Last updated:** [August 22, 2016, 7:41pm UTC](https://forum.ansible.com/t/how-to-change-redefine-variables-in-nested-dictionary/22349 "2016-08-22T19:41:49Z")

</div>

I have dictionary: \` test: a: name: ‘somevalue’ other: ‘somevalue’ another: ‘somevalue’ b: name: ‘somevalue’ other: ‘somevalue’ another: ‘somevalue’ \` How can I change value of “name” in each dictionary durin…

---

## [SSH connection issue](https://forum.ansible.com/t/ssh-connection-issue/22331)

<div class="topic-metadata">

**Author:** [@Aaron\_Bernardino](https://forum.ansible.com/u/Aaron_Bernardino)\
**Replies:** 3\
**Last updated:** [August 22, 2016, 7:02pm UTC](https://forum.ansible.com/t/ssh-connection-issue/22331 "2016-08-22T19:02:40Z")

</div>

I’m running a playbook where tasks are failing with error message → “SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh”, “unreachable”: true The weird thing is that I have…

---

## [ec2.ini pattern\_exclude and instance\_filters](https://forum.ansible.com/t/ec2-ini-pattern-exclude-and-instance-filters/22348)

<div class="topic-metadata">

**Author:** [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Replies:** 1\
**Last updated:** [August 22, 2016, 6:23pm UTC](https://forum.ansible.com/t/ec2-ini-pattern-exclude-and-instance-filters/22348 "2016-08-22T18:23:55Z")

</div>

I’m trying to remove certain ec2 hosts from having ansible run on them by using the instance\_filters and/or pattern\_exclude options in the ini file for ec2.py, but it doesn’t seem to be working. I tried using the followi…

---

## [How do you avoid running same roles multiple times when including playbooks?](https://forum.ansible.com/t/how-do-you-avoid-running-same-roles-multiple-times-when-including-playbooks/22330)

<div class="topic-metadata">

**Author:** [@jacek.sniecikowski](https://forum.ansible.com/u/jacek.sniecikowski)\
**Replies:** 2\
**Last updated:** [August 22, 2016, 5:03pm UTC](https://forum.ansible.com/t/how-do-you-avoid-running-same-roles-multiple-times-when-including-playbooks/22330 "2016-08-22T17:03:41Z")

</div>

Short version: Why does Ansible keep running ‘-include: mysql-cluster.yml’ whenever it encounters it? Can’t it recognize this was already executed once? Long version: I am trying to find a good way to organize Ansible…

---

## [localhost in multiple groups (e.g. all) as well as "ungrouped"](https://forum.ansible.com/t/localhost-in-multiple-groups-e-g-all-as-well-as-ungrouped/22346)

<div class="topic-metadata">

**Author:** [@David\_Resnick](https://forum.ansible.com/u/David_Resnick)\
**Replies:** 0\
**Last updated:** [August 22, 2016, 3:38pm UTC](https://forum.ansible.com/t/localhost-in-multiple-groups-e-g-all-as-well-as-ungrouped/22346 "2016-08-22T15:38:24Z")

</div>

I’ve found a regression in Ansible 2.1.1.0 where group\_vars are not being applied correctly to a host that is shown as part of those groups. My playbook is for performing AWS operations. My inventory file looks somethi…

---

## [Feature add gtdLocation and failover on dnsmadeeasy module](https://forum.ansible.com/t/feature-add-gtdlocation-and-failover-on-dnsmadeeasy-module/22345)

<div class="topic-metadata">

**Author:** [@Mohamed\_Radwan](https://forum.ansible.com/u/Mohamed_Radwan)\
**Replies:** 0\
**Last updated:** [August 22, 2016, 2:59pm UTC](https://forum.ansible.com/t/feature-add-gtdlocation-and-failover-on-dnsmadeeasy-module/22345 "2016-08-22T14:59:09Z")

</div>

Hello Is it possobile to add gtdLocation option inside dnsmadeeasy module ? I have different Geo location for the same dns record and I want to define gtdLocation ? also it will be great if you add failover option ? Ri…

---

## [Unexpected evaluation of condition in 'when' statement](https://forum.ansible.com/t/unexpected-evaluation-of-condition-in-when-statement/22343)

<div class="topic-metadata">

**Author:** [@Alfredo\_M](https://forum.ansible.com/u/Alfredo_M)\
**Replies:** 0\
**Last updated:** [August 22, 2016, 2:09pm UTC](https://forum.ansible.com/t/unexpected-evaluation-of-condition-in-when-statement/22343 "2016-08-22T14:09:42Z")

</div>

Hi all, I’m trying to figure out why the expression “false and (var is undefined)”, when ‘var’ has the value of an undefined variable, returns true. Here it is an example: hosts: localhost vars: g: “{{ z }}” is\_fa…

---

## [Pre-requisite tasks](https://forum.ansible.com/t/pre-requisite-tasks/22341)

<div class="topic-metadata">

**Author:** [@Dan\_Nestor](https://forum.ansible.com/u/Dan_Nestor)\
**Replies:** 1\
**Last updated:** [August 22, 2016, 1:43pm UTC](https://forum.ansible.com/t/pre-requisite-tasks/22341 "2016-08-22T13:43:09Z")

</div>

Hello everybody, this is my first post here. I have a playbook that includes these tasks: \` name: Staging directory exists file: path: “{{ staging\_dir }}” recurse: yes state: directory name: “{{ java\_package …

---

## [win\_unzip hanging on overwrite](https://forum.ansible.com/t/win-unzip-hanging-on-overwrite/22300)

<div class="topic-metadata">

**Author:** [@Derek\_Viljoen](https://forum.ansible.com/u/Derek_Viljoen)\
**Replies:** 2\
**Last updated:** [August 22, 2016, 1:29pm UTC](https://forum.ansible.com/t/win-unzip-hanging-on-overwrite/22300 "2016-08-22T13:29:17Z")

</div>

I’m new to ansible. I’m debugging a called to win\_unzip that is hanging. I see other users having the same problem with no resolution. I’ve diagnosed it down to the generated powershell script calling Expand-Archive. If …

[Previous page](https://forum.ansible.com/c/archives/31.md?page=559)

[Next page](https://forum.ansible.com/c/archives/31.md?page=561)
