# Latest

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

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

**Page:** 650

---

## [Ansible won't create dir when file exists with same name](https://forum.ansible.com/t/ansible-wont-create-dir-when-file-exists-with-same-name/24753)

<div class="topic-metadata">

**Author:** [@Rusty\_Roy](https://forum.ansible.com/u/Rusty_Roy)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 11:34pm UTC](https://forum.ansible.com/t/ansible-wont-create-dir-when-file-exists-with-same-name/24753 "2017-06-19T23:34:42Z")

</div>

I have the following task: \` name: create tmp dir to copy db sql to file: path=/tmp/sql state=directory \` When I run it, I get the error: \` TASK \[mysql-data : create tmp dir to copy db sql to\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

---

## [Using Ansible authorized\_key, how can I copy the keys from all hosts in a group?](https://forum.ansible.com/t/using-ansible-authorized-key-how-can-i-copy-the-keys-from-all-hosts-in-a-group/24545)

<div class="topic-metadata">

**Author:** [@Bob\_Lawson](https://forum.ansible.com/u/Bob_Lawson)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 11:31pm UTC](https://forum.ansible.com/t/using-ansible-authorized-key-how-can-i-copy-the-keys-from-all-hosts-in-a-group/24545 "2017-06-19T23:31:59Z")

</div>

I’m trying to use Ansible to copy keys from multiple hosts to a remote host user’s authorized\_key file. In my inventory, I have a collectors group and receiver group, as follows: \[collectors\] c1 c2 c3 \[receiver\] r1 I…

---

## [ansible Failed to connect to the host via ssh: Received message too long](https://forum.ansible.com/t/ansible-failed-to-connect-to-the-host-via-ssh-received-message-too-long/24754)

<div class="topic-metadata">

**Author:** [@batchenr](https://forum.ansible.com/u/batchenr)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 11:30pm UTC](https://forum.ansible.com/t/ansible-failed-to-connect-to-the-host-via-ssh-received-message-too-long/24754 "2017-06-19T23:30:03Z")

</div>

when i try to test ping to my remote pbx servers i get this error : \> Failed to connect to the host via ssh: Received message too long i know this servers has by defult long promote- cant ansible ignore it ? i…

---

## [Output only changed list items](https://forum.ansible.com/t/output-only-changed-list-items/24749)

<div class="topic-metadata">

**Author:** [@B\_Holmes](https://forum.ansible.com/u/B_Holmes)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 11:27pm UTC](https://forum.ansible.com/t/output-only-changed-list-items/24749 "2017-06-19T23:27:37Z")

</div>

My vars.yml file is: \` linux\_users: username: testuser1 state: present username: testuser2 state: present \` If I add another user: \` linux\_users: username: testuser1 state: present username: testus…

---

## ["msg": "Value of unknown type: \<class 'pandas.core.frame.DataFrame'\>,](https://forum.ansible.com/t/msg-value-of-unknown-type-class-pandas-core-frame-dataframe/24765)

<div class="topic-metadata">

**Author:** [@Durgaprasad\_Ala](https://forum.ansible.com/u/Durgaprasad_Ala)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 11:02pm UTC](https://forum.ansible.com/t/msg-value-of-unknown-type-class-pandas-core-frame-dataframe/24765 "2017-06-19T23:02:22Z")

</div>

I am getting this error while trying to get the csv values. fatal: \[xxxxxxxxxx → localhost\]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: "Value of unknown type: \<class ‘pandas.core.frame.DataFrame’\>, Snippet o…

---

## [How to notify a handler when using set\_fact module?](https://forum.ansible.com/t/how-to-notify-a-handler-when-using-set-fact-module/24744)

<div class="topic-metadata">

**Author:** [@Ivan\_Godorogea](https://forum.ansible.com/u/Ivan_Godorogea)\
**Replies:** 2\
**Last updated:** [June 19, 2017, 9:30pm UTC](https://forum.ansible.com/t/how-to-notify-a-handler-when-using-set-fact-module/24744 "2017-06-19T21:30:09Z")

</div>

Hi, I am trying to notify a handler in a set\_fact task, but it doesn’t work. Is that not implemented or I’m doing it wrong? Thank you, Ivan Here are the code snippets: /tasks/main.yml \`

---

## [Capture return values to file](https://forum.ansible.com/t/capture-return-values-to-file/24762)

<div class="topic-metadata">

**Author:** [@David\_Rose](https://forum.ansible.com/u/David_Rose)\
**Replies:** 1\
**Last updated:** [June 19, 2017, 8:09pm UTC](https://forum.ansible.com/t/capture-return-values-to-file/24762 "2017-06-19T20:09:18Z")

</div>

Hello all! I have a questions regarding capturing return values and writing them to a file. Specifically, my use-case is in cloud provisioning … I am standing up any number of VMs. When the VM is created, and only when …

---

## [Dynamic inventory shows some internal host incorrectly](https://forum.ansible.com/t/dynamic-inventory-shows-some-internal-host-incorrectly/24764)

<div class="topic-metadata">

**Author:** [@Anthony\_Cheng](https://forum.ansible.com/u/Anthony_Cheng)\
**Replies:** 0\
**Last updated:** [June 19, 2017, 5:50pm UTC](https://forum.ansible.com/t/dynamic-inventory-shows-some-internal-host-incorrectly/24764 "2017-06-19T17:50:18Z")

</div>

I am currently using dynamic inventory with ec2.ini set to use private\_dns\_name & private\_ip\_address However certain host in a different subnet are showing up as ip-x.x.x.x.ec2-internal as opposed to just returning thei…

---

## [Ansible Module to look up variables](https://forum.ansible.com/t/ansible-module-to-look-up-variables/24750)

<div class="topic-metadata">

**Author:** [@Hagen\_Kuehn](https://forum.ansible.com/u/Hagen_Kuehn)\
**Replies:** 2\
**Last updated:** [June 19, 2017, 4:28pm UTC](https://forum.ansible.com/t/ansible-module-to-look-up-variables/24750 "2017-06-19T16:28:02Z")

</div>

I would like to create an Ansible Module that can be used to lookup variables of a given role. Background: Our build Git repository is organized in away that we have one Ansible role per micro service (built repo). Tho…

---

## [Find number of servers where something is true](https://forum.ansible.com/t/find-number-of-servers-where-something-is-true/24755)

<div class="topic-metadata">

**Author:** [@Tommy\_Ash](https://forum.ansible.com/u/Tommy_Ash)\
**Replies:** 3\
**Last updated:** [June 19, 2017, 4:27pm UTC](https://forum.ansible.com/t/find-number-of-servers-where-something-is-true/24755 "2017-06-19T16:27:57Z")

</div>

Hi, I’m trying to get a count of how many servers have a specific file on them. For example, if /tmp/testFile is on 8 of 25 hosts that I’m running a playbook against, I’d like to register a variable and give it the value…

---

## [Can not attach CM rom in Vmware](https://forum.ansible.com/t/can-not-attach-cm-rom-in-vmware/19525)

<div class="topic-metadata">

**Author:** [@Nick\_Vanadium](https://forum.ansible.com/u/Nick_Vanadium)\
**Replies:** 6\
**Last updated:** [June 19, 2017, 10:08am UTC](https://forum.ansible.com/t/can-not-attach-cm-rom-in-vmware/19525 "2017-06-19T10:08:58Z")

</div>

Greetings all. Apologies if this is not the correct place to post this but I wasn’t able to find anything related to this. So I have recently began playing with Ansible and I am trying to build some VMs in Vmware Sphere…

---

## [CircleCI + Notifications?](https://forum.ansible.com/t/circleci-notifications/24757)

<div class="topic-metadata">

**Author:** [@Gunter\_Grodotzki](https://forum.ansible.com/u/Gunter_Grodotzki)\
**Replies:** 0\
**Last updated:** [June 19, 2017, 6:05am UTC](https://forum.ansible.com/t/circleci-notifications/24757 "2017-06-19T06:05:13Z")

</div>

Hi all, I am trying to setup circleci to propagate new builds/releases to ansible-galaxy: notify: webhooks: url: https://galaxy.ansible.com/api/v1/notifications/ This works well with travis-ci, but with circleci I …

---

## [Issues with using a variable from another role](https://forum.ansible.com/t/issues-with-using-a-variable-from-another-role/24756)

<div class="topic-metadata">

**Author:** [@Rahul\_Mohandas](https://forum.ansible.com/u/Rahul_Mohandas)\
**Replies:** 0\
**Last updated:** [June 19, 2017, 12:08am UTC](https://forum.ansible.com/t/issues-with-using-a-variable-from-another-role/24756 "2017-06-19T00:08:23Z")

</div>

I have 2 roles, ansible-certbot and ansible-rutorrent. ansible-rutorrent depends on ansible-certbot: \` dependencies: role: “rahul0705.rtorrent” role: “rahul0705.apache” role: “rahul0705.ansible-certbot” certbot\_cer…

---

## [HOWTO edit HKEY\_CURRENT\_USER that's not the ansible user?](https://forum.ansible.com/t/howto-edit-hkey-current-user-thats-not-the-ansible-user/24751)

<div class="topic-metadata">

**Author:** [@bob](https://forum.ansible.com/u/bob)\
**Replies:** 3\
**Last updated:** [June 17, 2017, 6:42am UTC](https://forum.ansible.com/t/howto-edit-hkey-current-user-thats-not-the-ansible-user/24751 "2017-06-17T06:42:09Z")

</div>

I need to make edits to HKEY\_CURRENT\_USER of a different user then the ansible\_user. How do I do that? Any edits I make with win\_regmerge are made to the ansible\_user’s registry. I tried become\_method: runas with beco…

---

## [Pacman module breaks when encountering certain package names](https://forum.ansible.com/t/pacman-module-breaks-when-encountering-certain-package-names/24752)

<div class="topic-metadata">

**Author:** [@Bruce\_V\_Chiarelli](https://forum.ansible.com/u/Bruce_V_Chiarelli)\
**Replies:** 0\
**Last updated:** [June 17, 2017, 12:00am UTC](https://forum.ansible.com/t/pacman-module-breaks-when-encountering-certain-package-names/24752 "2017-06-17T00:00:23Z")

</div>

The Arch Linux package naming guidelines\[1\] specify that "package names should consist of \*alphanumeric characters only\*; all letters should be \*lowercase\*" (emphasis in original). In reality, this guideline is not ad…

---

## [Can one add items to a list within(!) the inventory?](https://forum.ansible.com/t/can-one-add-items-to-a-list-within-the-inventory/24745)

<div class="topic-metadata">

**Author:** [@Frank\_Thommen](https://forum.ansible.com/u/Frank_Thommen)\
**Replies:** 1\
**Last updated:** [June 16, 2017, 2:29pm UTC](https://forum.ansible.com/t/can-one-add-items-to-a-list-within-the-inventory/24745 "2017-06-16T14:29:10Z")

</div>

Hi, is it possible to expand a list variable within the inventory? E.g. I have a list of users which should be allowed on all hosts but on /some/ hosts, additional users should be allowed. I want to define this in the…

---

## [Using ansible\_winrm\_server\_cert\_validation](https://forum.ansible.com/t/using-ansible-winrm-server-cert-validation/24737)

<div class="topic-metadata">

**Author:** [@b-long](https://forum.ansible.com/u/b-long)\
**Replies:** 1\
**Last updated:** [June 16, 2017, 5:23am UTC](https://forum.ansible.com/t/using-ansible-winrm-server-cert-validation/24737 "2017-06-16T05:23:14Z")

</div>

Hi All, As I noted in a previously closed issue, it’s not clear to me where ansible\_winrm\_server\_cert\_validation will be respected in group\_vars and host\_vars. In addition, I’m unsure how to deal with the situation of d…

---

## [win\_command not working ?](https://forum.ansible.com/t/win-command-not-working/24711)

<div class="topic-metadata">

**Author:** [@Wenceslas\_des\_Desert](https://forum.ansible.com/u/Wenceslas_des_Desert)\
**Replies:** 1\
**Last updated:** [June 16, 2017, 5:10am UTC](https://forum.ansible.com/t/win-command-not-working/24711 "2017-06-16T05:10:16Z")

</div>

t.Hi, I’m currently trying to use the win\_command module of Ansible. Task (in a role, itself included in a playbook) looks like that : \` name: Test module win\_command: dir \` That’s quite simple, really. Connection…

---

## [Call a role from another role](https://forum.ansible.com/t/call-a-role-from-another-role/24742)

<div class="topic-metadata">

**Author:** [@boonhai\_ng](https://forum.ansible.com/u/boonhai_ng)\
**Replies:** 1\
**Last updated:** [June 16, 2017, 4:57am UTC](https://forum.ansible.com/t/call-a-role-from-another-role/24742 "2017-06-16T04:57:32Z")

</div>

Hi all, I had created a role A - name a “Role-A” and role B name as “Role-B”, but I would like to call role A from sub-task of Role B? is it possible? something like below syntax… Role-B - tasks’ main.yml

---

## [ansible block not running as expected](https://forum.ansible.com/t/ansible-block-not-running-as-expected/23736)

<div class="topic-metadata">

**Author:** [@Adrian\_Paraschiv](https://forum.ansible.com/u/Adrian_Paraschiv)\
**Replies:** 5\
**Last updated:** [June 16, 2017, 2:41am UTC](https://forum.ansible.com/t/ansible-block-not-running-as-expected/23736 "2017-06-16T02:41:04Z")

</div>

I have ansible 2.2.1.0 and I have this role: - block: - shell: echo 1 - shell: fail - shell: echo 2 rescue: - shell: echo 3 always: - shell: echo 4 - name: running something after the block sh…

---

## [Replace portion of host name](https://forum.ansible.com/t/replace-portion-of-host-name/24741)

<div class="topic-metadata">

**Author:** [@Bill\_L](https://forum.ansible.com/u/Bill_L)\
**Replies:** 0\
**Last updated:** [June 16, 2017, 12:38am UTC](https://forum.ansible.com/t/replace-portion-of-host-name/24741 "2017-06-16T00:38:02Z")

</div>

Hello, I am new to Ansible and have a question regarding modifying an EC2 host name during the EC2 creation process. I am using the ec2 module to create an EC2 instance as shown below. Is it possible to replace the ec2-…

---

## [Can i use .yml file like this?](https://forum.ansible.com/t/can-i-use-yml-file-like-this/24731)

<div class="topic-metadata">

**Author:** [@user45](https://forum.ansible.com/u/user45)\
**Replies:** 3\
**Last updated:** [June 16, 2017, 12:18am UTC](https://forum.ansible.com/t/can-i-use-yml-file-like-this/24731 "2017-06-16T00:18:52Z")

</div>

tasks: name: Variable set\_fact: os: “ubi” host: “192.168.0.137” username: “root” password: “premier” commands: “show version” module: “ios\_command” ############### Working ############ name: Cisco ios command …

---

## [win\_dsc using PolicyFileEditor DSC Module: failed to convert String to SINT32](https://forum.ansible.com/t/win-dsc-using-policyfileeditor-dsc-module-failed-to-convert-string-to-sint32/24735)

<div class="topic-metadata">

**Author:** [@Ricardo\_Gaspar](https://forum.ansible.com/u/Ricardo_Gaspar)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 11:27pm UTC](https://forum.ansible.com/t/win-dsc-using-policyfileeditor-dsc-module-failed-to-convert-string-to-sint32/24735 "2017-06-15T23:27:34Z")

</div>

Hi all, I was using the cAdministrativeTemplateSetting DSC Resource part of PolicyFileEditor module ( https://github.com/dlwyatt/PolicyFileEditor) in a DSC script and it works fine. Here are the resource’s properties: …

---

## [Roles list variable](https://forum.ansible.com/t/roles-list-variable/13919)

<div class="topic-metadata">

**Author:** [@Marc\_Trudel](https://forum.ansible.com/u/Marc_Trudel)\
**Replies:** 6\
**Last updated:** [June 15, 2017, 11:01pm UTC](https://forum.ansible.com/t/roles-list-variable/13919 "2017-06-15T23:01:14Z")

</div>

Hi, For one of the playbook I am trying to write, I am trying to allow the input of a dynamic role list. However, this does not seem to work: name: “Apply extra roles (see .myfile.yml)” hosts: all gather\_facts: tru…

---

## [Ansible check mode magic variable](https://forum.ansible.com/t/ansible-check-mode-magic-variable/24701)

<div class="topic-metadata">

**Author:** [@Maggie\_Pease](https://forum.ansible.com/u/Maggie_Pease)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 8:16pm UTC](https://forum.ansible.com/t/ansible-check-mode-magic-variable/24701 "2017-06-15T20:16:46Z")

</div>

Hi, When running in with the --check mode flag, Ansible sets a magic variable ansible\_check\_mode to true. Should it be possible to also set it to true using an extra var like: ansible-playbook -i inventories/Dev playb…

---

## [Jinja 2 template syntax error](https://forum.ansible.com/t/jinja-2-template-syntax-error/24738)

<div class="topic-metadata">

**Author:** [@Owen\_Corcoran](https://forum.ansible.com/u/Owen_Corcoran)\
**Replies:** 6\
**Last updated:** [June 15, 2017, 8:16pm UTC](https://forum.ansible.com/t/jinja-2-template-syntax-error/24738 "2017-06-15T20:16:02Z")

</div>

Hi, Im having an issue with the following Jinja2 template and I just cant figure out how to get it to display the ip4 addresses of the hosts from the hostvars for the hosts in the inventory file below {% for host\_syste…

---

## [What determines the value of inventory\_hostname](https://forum.ansible.com/t/what-determines-the-value-of-inventory-hostname/24736)

<div class="topic-metadata">

**Author:** [@Richard\_Stanfield](https://forum.ansible.com/u/Richard_Stanfield)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 7:58pm UTC](https://forum.ansible.com/t/what-determines-the-value-of-inventory-hostname/24736 "2017-06-15T19:58:54Z")

</div>

I’m very new to Ansible and I have inherited some Ansible playbooks that aren’t working that I need to get working. I’ve been searching for quite some time and haven’t found any answers for this. My current problem is t…

---

## [get content from URL header](https://forum.ansible.com/t/get-content-from-url-header/24740)

<div class="topic-metadata">

**Author:** [@Christian\_Hugel](https://forum.ansible.com/u/Christian_Hugel)\
**Replies:** 2\
**Last updated:** [June 15, 2017, 7:28pm UTC](https://forum.ansible.com/t/get-content-from-url-header/24740 "2017-06-15T19:28:41Z")

</div>

Hi, I need to get the content (md5 checksum) from the header of a url. This could be done with: \` name: Get md5sum from https://wordpress.org/latest.tar.gz header shell: curl --silent --head https://wordpress.org/l…

---

## [Can I use a pull-based model for the nodes?](https://forum.ansible.com/t/can-i-use-a-pull-based-model-for-the-nodes/24734)

<div class="topic-metadata">

**Author:** [@Sagi\_Smolarski](https://forum.ansible.com/u/Sagi_Smolarski)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 6:10pm UTC](https://forum.ansible.com/t/can-i-use-a-pull-based-model-for-the-nodes/24734 "2017-06-15T18:10:07Z")

</div>

Hi, I have a multi-tiered system where the end-stations are consumer devices (something like roomba), running ubuntu, in consumers’ home (with access to the next via wifi). I would like to use ansible to implement auto-…

---

## [LVM thin pool/poolmetadata](https://forum.ansible.com/t/lvm-thin-pool-poolmetadata/24697)

<div class="topic-metadata">

**Author:** [@Jeeva\_Chelladhurai](https://forum.ansible.com/u/Jeeva_Chelladhurai)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 5:50pm UTC](https://forum.ansible.com/t/lvm-thin-pool-poolmetadata/24697 "2017-06-15T17:50:51Z")

</div>

Hello All, I am attempt to automate the installation of docker on the production systems using Ansible. However my challenge is to convert the LVM thin pool (I am new to LVM as well). As per the docker installation docu…

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

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