# Latest

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

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

**Page:** 1029

---

## [Require variables to exist or fail](https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366)

<div class="topic-metadata">

**Author:** [@Kavin\_Kankeshwar](https://forum.ansible.com/u/Kavin_Kankeshwar)\
**Replies:** 1\
**Last updated:** [August 26, 2013, 7:46pm UTC](https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366 "2013-08-26T19:46:12Z")

</div>

I vaguely remember reading about conversation of requiring an input variable to exist , if it does not exist. Playbook should exit. Please can someone point me to the documentation . (or maybe i was just dreaming about …

---

## [amazon ec2 key pair](https://forum.ansible.com/t/amazon-ec2-key-pair/13362)

<div class="topic-metadata">

**Author:** [@carl](https://forum.ansible.com/u/carl)\
**Replies:** 4\
**Last updated:** [August 26, 2013, 6:38pm UTC](https://forum.ansible.com/t/amazon-ec2-key-pair/13362 "2013-08-26T18:38:06Z")

</div>

In the ansible works documentation, it says that you can reference an amazon ec2 key pair like this: ec2 keypair={{mykeypair}} However, I cannot seem to find what format {mykeypair} should take. I want to use .yml va…

---

## [Project updates](https://forum.ansible.com/t/project-updates/13361)

<div class="topic-metadata">

**Author:** [@James\_Cammarata1](https://forum.ansible.com/u/James_Cammarata1)\
**Replies:** 0\
**Last updated:** [August 26, 2013, 2:39pm UTC](https://forum.ansible.com/t/project-updates/13361 "2013-08-26T14:39:19Z")

</div>

Hi all, just wanted to give everyone a quick run down on some of the new features that have been added over the last week or two. First off, we merged in a new feature from @stoned which allows you to mark a task as “al…

---

## [mysql\_user throws an SQL error when the user already exists](https://forum.ansible.com/t/mysql-user-throws-an-sql-error-when-the-user-already-exists/13355)

<div class="topic-metadata">

**Author:** [@John\_Hamelink](https://forum.ansible.com/u/John_Hamelink)\
**Replies:** 4\
**Last updated:** [August 26, 2013, 1:30pm UTC](https://forum.ansible.com/t/mysql-user-throws-an-sql-error-when-the-user-already-exists/13355 "2013-08-26T13:30:22Z")

</div>

Hey guys, I have a task in my playbook that looks like this: name: Ensure the database user for database mysql\_user: name=‘{{database\_user}}’ password=‘{{database\_password}}’ priv=‘“{{database}}”.\*:ALL’ state=presen…

---

## [Help getting Ansible running](https://forum.ansible.com/t/help-getting-ansible-running/13359)

<div class="topic-metadata">

**Author:** [@Lee\_Cuevas](https://forum.ansible.com/u/Lee_Cuevas)\
**Replies:** 12\
**Last updated:** [August 25, 2013, 11:49pm UTC](https://forum.ansible.com/t/help-getting-ansible-running/13359 "2013-08-25T23:49:58Z")

</div>

I am new to Ansible and cannot seem to get it to work on Ubunto. I am trying a simple command: ansible all -m ping I get back: Cannot write to path /home/lee/.ansible/cp Traceback (most recent call last): File “/usr/…

---

## [How to force ansible to use bash instead of sh](https://forum.ansible.com/t/how-to-force-ansible-to-use-bash-instead-of-sh/13358)

<div class="topic-metadata">

**Author:** [@ryanchan404](https://forum.ansible.com/u/ryanchan404)\
**Replies:** 1\
**Last updated:** [August 24, 2013, 8:10pm UTC](https://forum.ansible.com/t/how-to-force-ansible-to-use-bash-instead-of-sh/13358 "2013-08-24T20:10:32Z")

</div>

I need to source the /root/.bash\_profile during shell module execution thru ssh, but currently ansible only use sh, so lead to the error. So anyway to tell ansible to load full user profile (bash)? Thanks.

---

## [gem module and option user\_install: yes](https://forum.ansible.com/t/gem-module-and-option-user-install-yes/13351)

<div class="topic-metadata">

**Author:** [@Jocelyn\_Jaubert](https://forum.ansible.com/u/Jocelyn_Jaubert)\
**Replies:** 6\
**Last updated:** [August 24, 2013, 5:30pm UTC](https://forum.ansible.com/t/gem-module-and-option-user-install-yes/13351 "2013-08-24T17:30:57Z")

</div>

Hi, According to the documentation, gem module accepts an option to install gems in home directory (user\_install: yes). It doesn’t seem to work as described, because this module launches “gem” commande without adding --…

---

## [How about creating a hostname module, which sets a system's hostname?](https://forum.ansible.com/t/how-about-creating-a-hostname-module-which-sets-a-systems-hostname/13357)

<div class="topic-metadata">

**Author:** [@Hiroaki\_Nakamura](https://forum.ansible.com/u/Hiroaki_Nakamura)\
**Replies:** 1\
**Last updated:** [August 24, 2013, 4:58pm UTC](https://forum.ansible.com/t/how-about-creating-a-hostname-module-which-sets-a-systems-hostname/13357 "2013-08-24T16:58:01Z")

</div>

Hi, all. How about creating a hostname module, which sets a system’s hostname? I implemented a prototype which works only on CentOS, RedHat, Debian and Ubuntu. https://github.com/hnakamur/ansible/blob/hostname\_module/…

---

## [bug in authorized\_keys module?](https://forum.ansible.com/t/bug-in-authorized-keys-module/13346)

<div class="topic-metadata">

**Author:** [@Michael\_Lucas](https://forum.ansible.com/u/Michael_Lucas)\
**Replies:** 7\
**Last updated:** [August 24, 2013, 2:15am UTC](https://forum.ansible.com/t/bug-in-authorized-keys-module/13346 "2013-08-24T02:15:46Z")

</div>

Hi, Wanted to verify that I'm not doing something dumb before opening a bug report. I pulled Ansible this morning. Using the authorized\_keys module to copy keys to hosts, I lose the quote marks around the key restric…

---

## [service: ... state=started always shows "changed"](https://forum.ansible.com/t/service-state-started-always-shows-changed/13354)

<div class="topic-metadata">

**Author:** [@Randy\_Syring](https://forum.ansible.com/u/Randy_Syring)\
**Replies:** 1\
**Last updated:** [August 23, 2013, 3:33pm UTC](https://forum.ansible.com/t/service-state-started-always-shows-changed/13354 "2013-08-23T15:33:59Z")

</div>

I have a couple Ubuntu 12.04 LTS machines. Both have been configured through ansible with the following: name: install ntp apt: pkg=ntp state=latest tags: ntp name: configure ntp file template: src=ntp.conf.j2 d…

---

## [Copy Directories](https://forum.ansible.com/t/copy-directories/13350)

<div class="topic-metadata">

**Author:** [@Furqan\_Hameed](https://forum.ansible.com/u/Furqan_Hameed)\
**Replies:** 7\
**Last updated:** [August 23, 2013, 2:43pm UTC](https://forum.ansible.com/t/copy-directories/13350 "2013-08-23T14:43:41Z")

</div>

I still don’t understand why exactly there is no directory copying functionality available in ansible. Such a buzzkill. Am i missing something here? The work arounds are just over heads.

---

## [Error when running ansible-playbook](https://forum.ansible.com/t/error-when-running-ansible-playbook/13352)

<div class="topic-metadata">

**Author:** [@Mathieu\_Levesque-Lav](https://forum.ansible.com/u/Mathieu_Levesque-Lav)\
**Replies:** 2\
**Last updated:** [August 23, 2013, 1:58pm UTC](https://forum.ansible.com/t/error-when-running-ansible-playbook/13352 "2013-08-23T13:58:56Z")

</div>

I’ve installed Ansible 1.2.3 on Ubuntu Precise 64. Running ansible-playbook -i ansible\_hosts playbook.yml give me this error: ERROR: problem running ansible\_hosts --list (\[Errno 8\] Exec format error) Here’s the conte…

---

## [iterating over lists nested within hash keys](https://forum.ansible.com/t/iterating-over-lists-nested-within-hash-keys/13349)

<div class="topic-metadata">

**Author:** [@Ali-Akber\_Saifee](https://forum.ansible.com/u/Ali-Akber_Saifee)\
**Replies:** 3\
**Last updated:** [August 22, 2013, 9:34pm UTC](https://forum.ansible.com/t/iterating-over-lists-nested-within-hash-keys/13349 "2013-08-22T21:34:39Z")

</div>

I have a use-case where a hash is populated with entries from combinations of host/groups variables resulting in something that (simplified) looks like : https://gist.github.com/alisaifee/343512d19714375c0fd8. I want to …

---

## [Sychronize module from Tim Appnel merged!](https://forum.ansible.com/t/sychronize-module-from-tim-appnel-merged/13279)

<div class="topic-metadata">

**Author:** [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Replies:** 5\
**Last updated:** [August 22, 2013, 9:31pm UTC](https://forum.ansible.com/t/sychronize-module-from-tim-appnel-merged/13279 "2013-08-22T21:31:52Z")

</div>

I know a lot of people were waiting for this one and wanted to pass along that this is now merged into 1.3 devel. My testing of it was not comprehensive, I’m sure, so please have at. Glad to see this one. I haven’t pu…

---

## [Duplicated handlers when notifying by name with var](https://forum.ansible.com/t/duplicated-handlers-when-notifying-by-name-with-var/13353)

<div class="topic-metadata">

**Author:** [@Dmitry\_Horbach](https://forum.ansible.com/u/Dmitry_Horbach)\
**Replies:** 1\
**Last updated:** [August 22, 2013, 9:30pm UTC](https://forum.ansible.com/t/duplicated-handlers-when-notifying-by-name-with-var/13353 "2013-08-22T21:30:48Z")

</div>

Hi, I’m trying to notify handlers using vars in its name. If same role is called twice with diffferent vars - handlers start duplicating. role1/handlers/main.yml name: restart var1 shell: echo restart var1 name: …

---

## [why do variables defined in roles vars take precedence over host/group values.](https://forum.ansible.com/t/why-do-variables-defined-in-roles-vars-take-precedence-over-host-group-values/13303)

<div class="topic-metadata">

**Author:** [@Ali-Akber\_Saifee](https://forum.ansible.com/u/Ali-Akber_Saifee)\
**Replies:** 6\
**Last updated:** [August 22, 2013, 3:09pm UTC](https://forum.ansible.com/t/why-do-variables-defined-in-roles-vars-take-precedence-over-host-group-values/13303 "2013-08-22T15:09:05Z")

</div>

This question has probably been asked before but I’m having trouble wrapping my head around it. It was recently asked again on freenode so I’m bring it up here. Lets say I have a role definition for an nginx setup and o…

---

## [Multiple line vars not being processed](https://forum.ansible.com/t/multiple-line-vars-not-being-processed/13348)

<div class="topic-metadata">

**Author:** [@howachen](https://forum.ansible.com/u/howachen)\
**Replies:** 2\
**Last updated:** [August 22, 2013, 2:41pm UTC](https://forum.ansible.com/t/multiple-line-vars-not-being-processed/13348 "2013-08-22T14:41:23Z")

</div>

Example:

---

## [How to append to existing /etc/hosts files on over 100 servers](https://forum.ansible.com/t/how-to-append-to-existing-etc-hosts-files-on-over-100-servers/13345)

<div class="topic-metadata">

**Author:** [@Josh\_E](https://forum.ansible.com/u/Josh_E)\
**Replies:** 1\
**Last updated:** [August 22, 2013, 3:57am UTC](https://forum.ansible.com/t/how-to-append-to-existing-etc-hosts-files-on-over-100-servers/13345 "2013-08-22T03:57:52Z")

</div>

Hi, I am new to Ansible and am looking for a way to push out changes to over 100 servers /etc/hosts file. We don’t want to overwrite the existing one because we lose the top 3 default lines like this on over 100 machine…

---

## [Enabling service runs script?](https://forum.ansible.com/t/enabling-service-runs-script/13347)

<div class="topic-metadata">

**Author:** [@John\_Oliver](https://forum.ansible.com/u/John_Oliver)\
**Replies:** 1\
**Last updated:** [August 22, 2013, 3:51am UTC](https://forum.ansible.com/t/enabling-service-runs-script/13347 "2013-08-22T03:51:48Z")

</div>

In my playbook, I have: name: Set OWF to start at boot service: name=owf enabled=yes The result: TASK: \[Set OWF to start at boot\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* … failed: \[demo\] =\> {“failed”: true} msg: Usage: {start|stop…

---

## [basic variable/list question](https://forum.ansible.com/t/basic-variable-list-question/13337)

<div class="topic-metadata">

**Author:** [@Michael\_Lucas](https://forum.ansible.com/u/Michael_Lucas)\
**Replies:** 4\
**Last updated:** [August 22, 2013, 2:26am UTC](https://forum.ansible.com/t/basic-variable-list-question/13337 "2013-08-22T02:26:12Z")

</div>

Hi, I'm trying to use the authorized\_keys module with a list of keys per group. Basically, servers in group A get one set of authorized keys, while group B gets another set of authorized keys. I clearly have some con…

---

## [php.ini template](https://forum.ansible.com/t/php-ini-template/13344)

<div class="topic-metadata">

**Author:** [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Replies:** 0\
**Last updated:** [August 21, 2013, 7:00pm UTC](https://forum.ansible.com/t/php-ini-template/13344 "2013-08-21T19:00:46Z")

</div>

Has anyone created a comprehensive php.ini template that they’d be willing to share?

---

## [Ansible Release 1.2.3](https://forum.ansible.com/t/ansible-release-1-2-3/13342)

<div class="topic-metadata">

**Author:** [@James\_Cammarata1](https://forum.ansible.com/u/James_Cammarata1)\
**Replies:** 0\
**Last updated:** [August 21, 2013, 5:31pm UTC](https://forum.ansible.com/t/ansible-release-1-2-3/13342 "2013-08-21T17:31:22Z")

</div>

We are releasing Ansible version v1.2.3 to address two CVEs that have been reported regarding the core Ansible package. Both of these involve potential local exploits on systems where access to the Ansible control machin…

---

## [Mak](https://forum.ansible.com/t/mak/13081)

<div class="topic-metadata">

**Author:** [@Joost\_Cassee](https://forum.ansible.com/u/Joost_Cassee)\
**Replies:** 19\
**Last updated:** [August 21, 2013, 12:30pm UTC](https://forum.ansible.com/t/mak/13081 "2013-08-21T12:30:30Z")

</div>

Hi, I am just learning Ansible, coming from Puppet and having looked into Salt a bit. The simplicity is refreshing, but I was surprised by the number of files and directories I needed to create in order to use roles. (M…

---

## [Running a simple playbook](https://forum.ansible.com/t/running-a-simple-playbook/11757)

<div class="topic-metadata">

**Author:** [@James8](https://forum.ansible.com/u/James8)\
**Replies:** 10\
**Last updated:** [August 21, 2013, 12:15pm UTC](https://forum.ansible.com/t/running-a-simple-playbook/11757 "2013-08-21T12:15:59Z")

</div>

I'm running my first playbook: - hosts: CL400 user: jmarcus sudo: True - name: no iptables action: service name=iptables state=stopped ERROR: action is not a legal parameter in an Ansible Playbook if the ser…

---

## [Nested rendering of variables considered desirable?](https://forum.ansible.com/t/nested-rendering-of-variables-considered-desirable/13333)

<div class="topic-metadata">

**Author:** [@Brian\_Harring](https://forum.ansible.com/u/Brian_Harring)\
**Replies:** 2\
**Last updated:** [August 20, 2013, 9:49pm UTC](https://forum.ansible.com/t/nested-rendering-of-variables-considered-desirable/13333 "2013-08-20T21:49:21Z")

</div>

Given the following variables in the context of a jinja2 render (whether at the task level or in a template): {‘my\_var’: {‘x’: ‘{{y}}’}, ‘y’:‘foon’} Ansible will automatically convert any {{my\_var.x}} reference into ‘f…

---

## [Conditional includes and registered variables](https://forum.ansible.com/t/conditional-includes-and-registered-variables/13336)

<div class="topic-metadata">

**Author:** [@Nicholas\_DeClario](https://forum.ansible.com/u/Nicholas_DeClario)\
**Replies:** 1\
**Last updated:** [August 20, 2013, 7:36pm UTC](https://forum.ansible.com/t/conditional-includes-and-registered-variables/13336 "2013-08-20T19:36:03Z")

</div>

I am having an issue where I include a playbook based on a variable. However, it seems that when the playbook is “skipped” it is still trying to evaluate my “when” statements for the tasks in that playbook. I have seen t…

---

## [Feature Request: pre\_tasks and post\_tasks for each role.](https://forum.ansible.com/t/feature-request-pre-tasks-and-post-tasks-for-each-role/13319)

<div class="topic-metadata">

**Author:** [@Smoothify](https://forum.ansible.com/u/Smoothify)\
**Replies:** 2\
**Last updated:** [August 20, 2013, 12:57pm UTC](https://forum.ansible.com/t/feature-request-pre-tasks-and-post-tasks-for-each-role/13319 "2013-08-20T12:57:31Z")

</div>

I want to have two or more task stages for roles, one for initialization and one for installation / configuration. My initial thoughts were to use the pre\_task and post\_tasks for each role, though I realise they were in…

---

## [fireball timer extension](https://forum.ansible.com/t/fireball-timer-extension/13335)

<div class="topic-metadata">

**Author:** [@Ali-Akber\_Saifee](https://forum.ansible.com/u/Ali-Akber_Saifee)\
**Replies:** 1\
**Last updated:** [August 20, 2013, 12:06pm UTC](https://forum.ansible.com/t/fireball-timer-extension/13335 "2013-08-20T12:06:19Z")

</div>

Since different plays may have different runtimes (and the same task might take longer on different hosts) the same fireball timer duration may not work for all cases. Having an extremely long duration isn’t too great si…

---

## [Playbook for terminating EC2 instances?](https://forum.ansible.com/t/playbook-for-terminating-ec2-instances/13330)

<div class="topic-metadata">

**Author:** [@Jharrod\_LaFon](https://forum.ansible.com/u/Jharrod_LaFon)\
**Replies:** 1\
**Last updated:** [August 20, 2013, 2:04am UTC](https://forum.ansible.com/t/playbook-for-terminating-ec2-instances/13330 "2013-08-20T02:04:21Z")

</div>

I am still learning Ansible, so maybe I have missed something. What I would like to do is be able to launch, configure, and terminate EC2 instances using Ansible. Starting from the documentation, launching and configuri…

---

## [Using ansible to create/manage user certs?](https://forum.ansible.com/t/using-ansible-to-create-manage-user-certs/13331)

<div class="topic-metadata">

**Author:** [@Jim\_Kleckner](https://forum.ansible.com/u/Jim_Kleckner)\
**Replies:** 0\
**Last updated:** [August 19, 2013, 9:29pm UTC](https://forum.ansible.com/t/using-ansible-to-create-manage-user-certs/13331 "2013-08-19T21:29:13Z")

</div>

Has anyone played with creating user certificates with Ansible and managing them?

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

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