# Latest

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

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

**Page:** 986

---

## [Trigger restart of service only when certain files exist?](https://forum.ansible.com/t/trigger-restart-of-service-only-when-certain-files-exist/14732)

<div class="topic-metadata">

**Author:** [@Grayson\_Koonce](https://forum.ansible.com/u/Grayson_Koonce)\
**Replies:** 1\
**Last updated:** [March 10, 2014, 3:29am UTC](https://forum.ansible.com/t/trigger-restart-of-service-only-when-certain-files-exist/14732 "2014-03-10T03:29:56Z")

</div>

Hi there, I have a playbook that sets up an upstart script for a service that is not immediately deployed to the instance yet. There is a trigger on that call to restart the service, which of course fails because the ap…

---

## [Get remote\_user's home directory](https://forum.ansible.com/t/get-remote-users-home-directory/14736)

<div class="topic-metadata">

**Author:** [@Jordan1](https://forum.ansible.com/u/Jordan1)\
**Replies:** 2\
**Last updated:** [March 10, 2014, 2:39am UTC](https://forum.ansible.com/t/get-remote-users-home-directory/14736 "2014-03-10T02:39:23Z")

</div>

I have a playbook that installs oh-my-zsh: \`

---

## [inventory variable range](https://forum.ansible.com/t/inventory-variable-range/14734)

<div class="topic-metadata">

**Author:** [@senorsmile](https://forum.ansible.com/u/senorsmile)\
**Replies:** 1\
**Last updated:** [March 9, 2014, 3:57pm UTC](https://forum.ansible.com/t/inventory-variable-range/14734 "2014-03-09T15:57:09Z")

</div>

I am not quite sure how to do this. E.g. I have a group of hosts www\[100:150\] and I need to assign their hostnames: ansible\_ssh\_host = www\[100:150\].example.com obviously I can’t do the above (I did try though). …

---

## [How to test for an item in a list?](https://forum.ansible.com/t/how-to-test-for-an-item-in-a-list/14731)

<div class="topic-metadata">

**Author:** [@David\_Adams](https://forum.ansible.com/u/David_Adams)\
**Replies:** 3\
**Last updated:** [March 8, 2014, 3:03pm UTC](https://forum.ansible.com/t/how-to-test-for-an-item-in-a-list/14731 "2014-03-08T15:03:16Z")

</div>

My apologies if there’s an obvious solution to this, but I’ve been unable to find it. I have a list variable defined with some values, eg: mylist: aaa bbb ddd I need to execute a task conditionally based on whether …

---

## [Selecting hosts based on variable](https://forum.ansible.com/t/selecting-hosts-based-on-variable/14725)

<div class="topic-metadata">

**Author:** [@Francois\_Legrand](https://forum.ansible.com/u/Francois_Legrand)\
**Replies:** 4\
**Last updated:** [March 8, 2014, 1:50am UTC](https://forum.ansible.com/t/selecting-hosts-based-on-variable/14725 "2014-03-08T01:50:00Z")

</div>

Hi all, Is there a way to select hosts in inventory based on a variable ? More specifically, I have a host file like : \[webservers\] web1.example.com location=room1 web2.example.com location=room1 web3.example.com l…

---

## [CloudFormation & Ansible](https://forum.ansible.com/t/cloudformation-ansible/14721)

<div class="topic-metadata">

**Author:** [@NJChoo](https://forum.ansible.com/u/NJChoo)\
**Replies:** 1\
**Last updated:** [March 7, 2014, 4:31pm UTC](https://forum.ansible.com/t/cloudformation-ansible/14721 "2014-03-07T16:31:58Z")

</div>

Just a general questions when using ansible & cloudformation… do you just use cloudformation as stack deployment tool, and use ansible to keep the instance updated? basically skipping over using cloudformation to upda…

---

## [Unable to import MySQLdb in ansible module](https://forum.ansible.com/t/unable-to-import-mysqldb-in-ansible-module/14724)

<div class="topic-metadata">

**Author:** [@Roopendra\_Vishwakarm](https://forum.ansible.com/u/Roopendra_Vishwakarm)\
**Replies:** 0\
**Last updated:** [March 7, 2014, 2:24pm UTC](https://forum.ansible.com/t/unable-to-import-mysqldb-in-ansible-module/14724 "2014-03-07T14:24:25Z")

</div>

I am trying to write custom module in ansible. while using import MySQLdb it is giving me error failed: \[127.0.0.1\] =\> {“failed”: true, “parsed”: false} invalid output was: Traceback (most recent call last): File “/ro…

---

## [Recursive copy does not support --diff, right? (neither does synchronize; Ansible 1.5)](https://forum.ansible.com/t/recursive-copy-does-not-support-diff-right-neither-does-synchronize-ansible-1-5/14706)

<div class="topic-metadata">

**Author:** [@Jakub\_Holy](https://forum.ansible.com/u/Jakub_Holy)\
**Replies:** 2\
**Last updated:** [March 7, 2014, 8:56am UTC](https://forum.ansible.com/t/recursive-copy-does-not-support-diff-right-neither-does-synchronize-ansible-1-5/14706 "2014-03-07T08:56:09Z")

</div>

Hello, using Ansible 1.5 and recursively copying a directory, I expect to see detailed diff of the individual changed files when running with “-C --diff” but I only get informed that the top directory has changed. Is th…

---

## [Structuring inventory](https://forum.ansible.com/t/structuring-inventory/14713)

<div class="topic-metadata">

**Author:** [@Aleksey\_Maksimov](https://forum.ansible.com/u/Aleksey_Maksimov)\
**Replies:** 3\
**Last updated:** [March 7, 2014, 5:49am UTC](https://forum.ansible.com/t/structuring-inventory/14713 "2014-03-07T05:49:26Z")

</div>

Hi, I am just starting with Ansible and have questions on how to better structure my inventory file(s). Here is what I have: Multiple hosts, assigned to different environments. test1 → host1, host2, host3 test2 → ho…

---

## [problem with running TOWER (AWX) following the video tutorial](https://forum.ansible.com/t/problem-with-running-tower-awx-following-the-video-tutorial/14499)

<div class="topic-metadata">

**Author:** [@Wojciech\_Hajduczenia](https://forum.ansible.com/u/Wojciech_Hajduczenia)\
**Replies:** 3\
**Last updated:** [March 7, 2014, 2:40am UTC](https://forum.ansible.com/t/problem-with-running-tower-awx-following-the-video-tutorial/14499 "2014-03-07T02:40:54Z")

</div>

Good afternoon. I am a beginner user and been working with simple version of ansible and worked perfectly. I have tried to install latest version of TOWER available on yum repo to make my life easier and i was followin…

---

## [with\_items specific variables](https://forum.ansible.com/t/with-items-specific-variables/14719)

<div class="topic-metadata">

**Author:** [@Brad\_Egan](https://forum.ansible.com/u/Brad_Egan)\
**Replies:** 1\
**Last updated:** [March 6, 2014, 11:33pm UTC](https://forum.ansible.com/t/with-items-specific-variables/14719 "2014-03-06T23:33:49Z")

</div>

Hi, New to Ansible and probably not using it the way most are. I’m a network engineer and am trying to use it to generate config files using the template module. It’s working well for one file but I’d like to extend it …

---

## [How do you set the path variable?](https://forum.ansible.com/t/how-do-you-set-the-path-variable/14718)

<div class="topic-metadata">

**Author:** [@hindenburg](https://forum.ansible.com/u/hindenburg)\
**Replies:** 1\
**Last updated:** [March 6, 2014, 11:18pm UTC](https://forum.ansible.com/t/how-do-you-set-the-path-variable/14718 "2014-03-06T23:18:24Z")

</div>

I’m trying to set the path variable in ansible name: Export env variables shell: export PATH=“PATH=/b/local/bin:/b/bin:$PATH” shell: echo $PATH register: foo debug: msg=“the echo was {{ foo.stdout }}” But w…

---

## [Can't get git module to work -- permission denied](https://forum.ansible.com/t/cant-get-git-module-to-work-permission-denied/14720)

<div class="topic-metadata">

**Author:** [@Mike\_Titus](https://forum.ansible.com/u/Mike_Titus)\
**Replies:** 4\
**Last updated:** [March 6, 2014, 11:17pm UTC](https://forum.ansible.com/t/cant-get-git-module-to-work-permission-denied/14720 "2014-03-06T23:17:40Z")

</div>

I’ve created a GitHub user on the target server with a private key in ~/.ssh/id\_rsa (and added the public key to GitHub). If I “sudo su deploy” I can then clone my repo via the command line without error: $ git clone gi…

---

## ['common' role updates my app RPM and prevents a handler to execute later on](https://forum.ansible.com/t/common-role-updates-my-app-rpm-and-prevents-a-handler-to-execute-later-on/14685)

<div class="topic-metadata">

**Author:** [@Azul](https://forum.ansible.com/u/Azul)\
**Replies:** 7\
**Last updated:** [March 6, 2014, 9:41pm UTC](https://forum.ansible.com/t/common-role-updates-my-app-rpm-and-prevents-a-handler-to-execute-later-on/14685 "2014-03-06T21:41:14Z")

</div>

In my role “common” I have: name: yum install OS updates shell: yum update -y and then in my “application” role I have: name: install app1 yum: name=app1 state=present notify: restart app1 This app1 is built in …

---

## [regex to match name of include file](https://forum.ansible.com/t/regex-to-match-name-of-include-file/14715)

<div class="topic-metadata">

**Author:** [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Replies:** 2\
**Last updated:** [March 6, 2014, 9:31pm UTC](https://forum.ansible.com/t/regex-to-match-name-of-include-file/14715 "2014-03-06T21:31:59Z")

</div>

Initial posts to the list are moderated, so that would explain the delay (I see it now)… There are two solutions to your question, but I think the easiest one is actually the best… In your case rename your files to (fo…

---

## [Staging/Production/Local Inventory Files](https://forum.ansible.com/t/staging-production-local-inventory-files/14716)

<div class="topic-metadata">

**Author:** [@James\_Goodhouse](https://forum.ansible.com/u/James_Goodhouse)\
**Replies:** 3\
**Last updated:** [March 6, 2014, 9:25pm UTC](https://forum.ansible.com/t/staging-production-local-inventory-files/14716 "2014-03-06T21:25:22Z")

</div>

Hey All, I currently have three separate inventory files to handle staging, production, and local installs for my project. I’m having difficulty figuring out the best way to configure variables while doing this. One exa…

---

## [Ansible provisioning docker containers to build a Galera cluster](https://forum.ansible.com/t/ansible-provisioning-docker-containers-to-build-a-galera-cluster/14717)

<div class="topic-metadata">

**Author:** [@Patrick\_Galbraith](https://forum.ansible.com/u/Patrick_Galbraith)\
**Replies:** 0\
**Last updated:** [March 6, 2014, 8:42pm UTC](https://forum.ansible.com/t/ansible-provisioning-docker-containers-to-build-a-galera-cluster/14717 "2014-03-06T20:42:54Z")

</div>

Hi all! Just a quick post to let those interested know about my blog post on building a Galera cluster using Ansible and Docker: http://patg.net/docker/2014/03/03/ansible.html Regards, Patrick

---

## [Commenting out lines](https://forum.ansible.com/t/commenting-out-lines/14714)

<div class="topic-metadata">

**Author:** [@Christoph\_Haas](https://forum.ansible.com/u/Christoph_Haas)\
**Replies:** 1\
**Last updated:** [March 6, 2014, 6:26pm UTC](https://forum.ansible.com/t/commenting-out-lines/14714 "2014-03-06T18:26:11Z")

</div>

Dear list, what do you consider best practice when you want to comment out (or in) a certain line in a configuration file? The "lineinfile" module does not seem flexible enough for my taste. Example: I want to change m…

---

## [bashrc or bash\_profile not being sourced](https://forum.ansible.com/t/bashrc-or-bash-profile-not-being-sourced/14707)

<div class="topic-metadata">

**Author:** [@jepper](https://forum.ansible.com/u/jepper)\
**Replies:** 1\
**Last updated:** [March 6, 2014, 4:00pm UTC](https://forum.ansible.com/t/bashrc-or-bash-profile-not-being-sourced/14707 "2014-03-06T16:00:07Z")

</div>

I think this has been discussed before. The documentations says: “If you want to run a command through the shell (say you are using \<, \>, |, etc), you actually want the shell module instead. The command module is much m…

---

## [unable to specify volumes for new instance](https://forum.ansible.com/t/unable-to-specify-volumes-for-new-instance/14690)

<div class="topic-metadata">

**Author:** [@i\_iordanov](https://forum.ansible.com/u/i_iordanov)\
**Replies:** 2\
**Last updated:** [March 6, 2014, 1:38pm UTC](https://forum.ansible.com/t/unable-to-specify-volumes-for-new-instance/14690 "2014-03-06T13:38:38Z")

</div>

Hi guys, I’m stuck with an issue and hoping somebody can spot my mistake. I have a task like the following where I’m trying to specify a volume for the ec2 instance. tasks: name: Start instance ec2: image=ami-xxxx …

---

## [inventory broken on old PowerPC Mac](https://forum.ansible.com/t/inventory-broken-on-old-powerpc-mac/14655)

<div class="topic-metadata">

**Author:** [@fabrice.gaillard](https://forum.ansible.com/u/fabrice.gaillard)\
**Replies:** 3\
**Last updated:** [March 6, 2014, 11:44am UTC](https://forum.ansible.com/t/inventory-broken-on-old-powerpc-mac/14655 "2014-03-06T11:44:02Z")

</div>

Hello, I’v found a small bug in inventory when running the inventory on old power PC machintosh : GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: \[ns2.p2pweb.net\] =\> failed to pa…

---

## [ad-hoc works, playbook fails. same task](https://forum.ansible.com/t/ad-hoc-works-playbook-fails-same-task/14708)

<div class="topic-metadata">

**Author:** [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Replies:** 5\
**Last updated:** [March 6, 2014, 9:06am UTC](https://forum.ansible.com/t/ad-hoc-works-playbook-fails-same-task/14708 "2014-03-06T09:06:37Z")

</div>

Hi I’m having an issue I can’t even begin to understand: I’m trying to replace some files and I can do that without any issue if I do that from an ad-hoc command. But if I try to do the SAME command from a playbook, it …

---

## [issue for enabling/disabling ping with sysctl](https://forum.ansible.com/t/issue-for-enabling-disabling-ping-with-sysctl/14704)

<div class="topic-metadata">

**Author:** [@rella.guo](https://forum.ansible.com/u/rella.guo)\
**Replies:** 5\
**Last updated:** [March 6, 2014, 5:57am UTC](https://forum.ansible.com/t/issue-for-enabling-disabling-ping-with-sysctl/14704 "2014-03-06T05:57:55Z")

</div>

Hello all, I want to use sysctl module to enable / disable ping. When I wrote a action as "sysctl: name=net.ipv4.icmp\_echo\_ignore\_all value=0 reload=yes state=present", indeed it cannot enable ping. I don’t know why? …

---

## [New Ansible integration tests! (long)](https://forum.ansible.com/t/new-ansible-integration-tests-long/14615)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Replies:** 3\
**Last updated:** [March 6, 2014, 3:09am UTC](https://forum.ansible.com/t/new-ansible-integration-tests-long/14615 "2014-03-06T03:09:33Z")

</div>

One of the most important aspects of software development is a commitment to quality testing. It’s for this reason we (as a company) invest a lot in automated QA. However, it’s a dirty secret that systems management so…

---

## [ansible daemon anyone?](https://forum.ansible.com/t/ansible-daemon-anyone/14712)

<div class="topic-metadata">

**Author:** [@Arie\_Skliarouk](https://forum.ansible.com/u/Arie_Skliarouk)\
**Replies:** 4\
**Last updated:** [March 6, 2014, 2:09am UTC](https://forum.ansible.com/t/ansible-daemon-anyone/14712 "2014-03-06T02:09:37Z")

</div>

Hi, We would like to use ansible as the services orchestration tool - so that it would stop and start services according to a dynamically changing configuration or playbooks. Something like puppet on steroids …

---

## [Ansible mysql module does not work with enterprise version mysql](https://forum.ansible.com/t/ansible-mysql-module-does-not-work-with-enterprise-version-mysql/14710)

<div class="topic-metadata">

**Author:** [@jack1](https://forum.ansible.com/u/jack1)\
**Replies:** 5\
**Last updated:** [March 5, 2014, 9:45pm UTC](https://forum.ansible.com/t/ansible-mysql-module-does-not-work-with-enterprise-version-mysql/14710 "2014-03-05T21:45:50Z")

</div>

Hi All: Does anyone have any experience for the mysql module to work enterprise verison mysql? Thanks Jack

---

## [Provisioning a Vagrant box: is Ansible installed on the guest or the host machine?](https://forum.ansible.com/t/provisioning-a-vagrant-box-is-ansible-installed-on-the-guest-or-the-host-machine/14684)

<div class="topic-metadata">

**Author:** [@Julien\_Martin](https://forum.ansible.com/u/Julien_Martin)\
**Replies:** 6\
**Last updated:** [March 5, 2014, 1:56pm UTC](https://forum.ansible.com/t/provisioning-a-vagrant-box-is-ansible-installed-on-the-guest-or-the-host-machine/14684 "2014-03-05T13:56:07Z")

</div>

Hello, I have a basic interrogation about Vagrant and Ansible. Is Ansible installed on the guest machine or on the host machine? In other words, is there a requirement for Ansible to be installed on the host machine ?…

---

## [Remote lookup with remote(...)](https://forum.ansible.com/t/remote-lookup-with-remote/14703)

<div class="topic-metadata">

**Author:** [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Replies:** 4\
**Last updated:** [March 5, 2014, 1:23pm UTC](https://forum.ansible.com/t/remote-lookup-with-remote/14703 "2014-03-05T13:23:11Z")

</div>

Is it possible to implement remote lookup plugins? Something like: \` name: create .hgrc if necessary file: path={{ hgrc }} owner={{ user }} state=touch when: remote(‘file\_exists’, ‘{{ hgrc }}’) == False \`

---

## [Looping through a group's IP numbers](https://forum.ansible.com/t/looping-through-a-groups-ip-numbers/14700)

<div class="topic-metadata">

**Author:** [@Michael\_Mahemoff](https://forum.ansible.com/u/Michael_Mahemoff)\
**Replies:** 3\
**Last updated:** [March 5, 2014, 1:22pm UTC](https://forum.ansible.com/t/looping-through-a-groups-ip-numbers/14700 "2014-03-05T13:22:26Z")

</div>

I have a rule like this: name: Create user mysql\_user: name=app host=={{ item }} … with\_items: localhost 127.0.0.1 “{{ groups\[‘webservers’\] }}” - How can I make the list include IP numbers of each webserver hos…

---

## [Assign dictionnary variable to another variable in Yaml file](https://forum.ansible.com/t/assign-dictionnary-variable-to-another-variable-in-yaml-file/14705)

<div class="topic-metadata">

**Author:** [@judauphant](https://forum.ansible.com/u/judauphant)\
**Replies:** 1\
**Last updated:** [March 5, 2014, 11:50am UTC](https://forum.ansible.com/t/assign-dictionnary-variable-to-another-variable-in-yaml-file/14705 "2014-03-05T11:50:14Z")

</div>

Hi, I would like to assign dictionnary variable to a another variable like that : \`

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

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