# Archives

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

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

**Page:** 479

---

## [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…

---

## [Did I take this concept too far or is this a bug?](https://forum.ansible.com/t/did-i-take-this-concept-too-far-or-is-this-a-bug/24739)

<div class="topic-metadata">

**Author:** [@Ed\_Balduf](https://forum.ansible.com/u/Ed_Balduf)\
**Replies:** 0\
**Last updated:** [June 15, 2017, 5:42pm UTC](https://forum.ansible.com/t/did-i-take-this-concept-too-far-or-is-this-a-bug/24739 "2017-06-15T17:42:43Z")

</div>

I have a large playbook, which creates groups of VMs in a cloud and each VM needs some number of data volumes attached. I attempted to make it as modular as possible and started using roles and include\_roles in loops. To…

---

## [Prevent notify from restarting service if something else will](https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729)

<div class="topic-metadata">

**Author:** [@Gilberto\_Valentin](https://forum.ansible.com/u/Gilberto_Valentin)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 4:58pm UTC](https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729 "2017-06-15T16:58:56Z")

</div>

I have the following playbook: \`

---

## [Send SMS using Twilio in ansible , getting below error](https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723)

<div class="topic-metadata">

**Author:** [@nishant\_bawane](https://forum.ansible.com/u/nishant_bawane)\
**Replies:** 1\
**Last updated:** [June 15, 2017, 3:41pm UTC](https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723 "2017-06-15T15:41:53Z")

</div>

i have tried using the twilo still not able to get the output - hosts: localhost tasks: name: Send notification message via twilio twilio: msg: ‘Hello from Nishant via Ansible’ account\_sid: ACxxxxxxxxxxxxxxxxxxxxxx…

---

## [ansible assign variable from json array](https://forum.ansible.com/t/ansible-assign-variable-from-json-array/24733)

<div class="topic-metadata">

**Author:** [@omar\_sheriff](https://forum.ansible.com/u/omar_sheriff)\
**Replies:** 0\
**Last updated:** [June 15, 2017, 11:42am UTC](https://forum.ansible.com/t/ansible-assign-variable-from-json-array/24733 "2017-06-15T11:42:04Z")

</div>

my playbook and json file { “Tomcat”: { “Instance”: \[ { “name”: “devops”, “uid”: “jbosscfg”, “gid”: “staff”, “dept”: “tech”, “recipient”: “test@example.com”, “shutdown\_port”: 8005, “http\_port”: 8080, “https\_p…

---

## [Book recommendations?](https://forum.ansible.com/t/book-recommendations/24693)

<div class="topic-metadata">

**Author:** [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Replies:** 3\
**Last updated:** [June 15, 2017, 11:16am UTC](https://forum.ansible.com/t/book-recommendations/24693 "2017-06-15T11:16:38Z")

</div>

First post, woot! I’ve done Puppet before and have worked on Linux for a while. Am moving to Ansible and prefer paper books to e-books. What are good books to get if you know the very basics but don’t know the advanced …

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

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