# Latest

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

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

**Page:** 964

---

## [Conditional variable assignments](https://forum.ansible.com/t/conditional-variable-assignments/15392)

<div class="topic-metadata">

**Author:** [@arnej](https://forum.ansible.com/u/arnej)\
**Replies:** 2\
**Last updated:** [June 6, 2014, 12:22pm UTC](https://forum.ansible.com/t/conditional-variable-assignments/15392 "2014-06-06T12:22:42Z")

</div>

Hi, this is probably easy but I cannot figure out how to do this with Ansible: some task that registers variable x some task that registers variable y some task that registers variable z register a variable …

---

## [lookup syntax (or client/server install)](https://forum.ansible.com/t/lookup-syntax-or-client-server-install/15374)

<div class="topic-metadata">

**Author:** [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Replies:** 4\
**Last updated:** [June 6, 2014, 12:18pm UTC](https://forum.ansible.com/t/lookup-syntax-or-client-server-install/15374 "2014-06-06T12:18:48Z")

</div>

Hi all Let’s say I’ve got a service that I need to install on a machine that we’ll call ‘client’ and for that to work it has to get some parameter from a box called ‘master’. For this to work under ansible it would nee…

---

## [How to replale replace specific character in line in Ansible](https://forum.ansible.com/t/how-to-replale-replace-specific-character-in-line-in-ansible/15386)

<div class="topic-metadata">

**Author:** [@Faisal\_Ali\_Rabbani](https://forum.ansible.com/u/Faisal_Ali_Rabbani)\
**Replies:** 1\
**Last updated:** [June 6, 2014, 12:16pm UTC](https://forum.ansible.com/t/how-to-replale-replace-specific-character-in-line-in-ansible/15386 "2014-06-06T12:16:53Z")

</div>

| I am creating a dynamic playbook via template if I give \> {{ it gives error. I decided to create playbook via template with single brace and later replace with double brace. \> { with \> {{ Kin…

---

## [Loading custom jinja2 filters use system python instead of ansible\_python\_interpreter in 1.6.2](https://forum.ansible.com/t/loading-custom-jinja2-filters-use-system-python-instead-of-ansible-python-interpreter-in-1-6-2/15380)

<div class="topic-metadata">

**Author:** [@Lars\_Vonk](https://forum.ansible.com/u/Lars_Vonk)\
**Replies:** 1\
**Last updated:** [June 6, 2014, 11:57am UTC](https://forum.ansible.com/t/loading-custom-jinja2-filters-use-system-python-instead-of-ansible-python-interpreter-in-1-6-2/15380 "2014-06-06T11:57:11Z")

</div>

Hi, I just upgraded Ansible from 1.4 → 1.6.2 and noticed that one of our custom jinja 2 plugins configured in filter\_plugins/custom\_plugins.py no longer works since a used module is not in the system python. The plugin …

---

## [Sendgrid module](https://forum.ansible.com/t/sendgrid-module/15376)

<div class="topic-metadata">

**Author:** [@Matthew\_Makai](https://forum.ansible.com/u/Matthew_Makai)\
**Replies:** 1\
**Last updated:** [June 6, 2014, 11:54am UTC](https://forum.ansible.com/t/sendgrid-module/15376 "2014-06-06T11:54:52Z")

</div>

Hey folks, while at AnsibleFest I mentioned a pull request for a Sendgrid module that sends email through their API. However, I realized I never started a discussion topic on this pull request. The API is used in this m…

---

## [remote\_user task override not working](https://forum.ansible.com/t/remote-user-task-override-not-working/14807)

<div class="topic-metadata">

**Author:** [@Bernat\_Rafales](https://forum.ansible.com/u/Bernat_Rafales)\
**Replies:** 5\
**Last updated:** [June 5, 2014, 9:33pm UTC](https://forum.ansible.com/t/remote-user-task-override-not-working/14807 "2014-06-05T21:33:58Z")

</div>

Hi, I have a playbook in which I need to run tasks with different remote users. This is what the main playlist looks like: \` #Configure and install all we need hosts: ec2hosts gather\_facts: true remote\_user: ec2-…

---

## [restart server + check if service is started](https://forum.ansible.com/t/restart-server-check-if-service-is-started/15405)

<div class="topic-metadata">

**Author:** [@Mark3](https://forum.ansible.com/u/Mark3)\
**Replies:** 3\
**Last updated:** [June 5, 2014, 9:00pm UTC](https://forum.ansible.com/t/restart-server-check-if-service-is-started/15405 "2014-06-05T21:00:13Z")

</div>

Hi, Kinda new to Ansible and I’m struggling with the following: I want to update a MYSQL server → httpd → varnish server. in that order. I want to check, after the server rebooted, if the service mysqld or httpd is st…

---

## [Issue with "insertafter"](https://forum.ansible.com/t/issue-with-insertafter/15415)

<div class="topic-metadata">

**Author:** [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Replies:** 0\
**Last updated:** [June 5, 2014, 8:28pm UTC](https://forum.ansible.com/t/issue-with-insertafter/15415 "2014-06-05T20:28:53Z")

</div>

I think that your problem is that you have both regexp and insertafter. I would get rid of the regexp and add state=present (just to make it clear that I want that file to be there). Adam

---

## [Using a file as input for lineinfule module](https://forum.ansible.com/t/using-a-file-as-input-for-lineinfule-module/15406)

<div class="topic-metadata">

**Author:** [@Felix\_Glaske](https://forum.ansible.com/u/Felix_Glaske)\
**Replies:** 3\
**Last updated:** [June 5, 2014, 8:21pm UTC](https://forum.ansible.com/t/using-a-file-as-input-for-lineinfule-module/15406 "2014-06-05T20:21:29Z")

</div>

Hey, is there a way to use a file from the machine where I run ansible to use as input for the module lineinfile?

---

## [mutually exclusive options](https://forum.ansible.com/t/mutually-exclusive-options/15411)

<div class="topic-metadata">

**Author:** [@Stanley\_Kamithi](https://forum.ansible.com/u/Stanley_Kamithi)\
**Replies:** 1\
**Last updated:** [June 5, 2014, 4:13pm UTC](https://forum.ansible.com/t/mutually-exclusive-options/15411 "2014-06-05T16:13:07Z")

</div>

Need some advice on module syntax I want to do this: cl\_interface name=br0 bridgemems=(list of bridge ports) ipv4=‘10.1.1.1/24’ cl\_interface name=bond0 bondmems=(list of bond members) ipv4=‘10.2.2.2/24’ the bondmems …

---

## [Problem with "ose-upgrade gears" command](https://forum.ansible.com/t/problem-with-ose-upgrade-gears-command/15404)

<div class="topic-metadata">

**Author:** [@Thomas\_ESCALLE](https://forum.ansible.com/u/Thomas_ESCALLE)\
**Replies:** 1\
**Last updated:** [June 5, 2014, 3:46pm UTC](https://forum.ansible.com/t/problem-with-ose-upgrade-gears-command/15404 "2014-06-05T15:46:54Z")

</div>

Hi, I’m trying to automize the migration of our Openshift Enterprise from 2.0 version to 2.1 version. I wrote a playbook and I have a problem with “ose-upgrade gears”. Here is my ansible plybook for this action : \` …

---

## [Problems provisioning a load balancer using the ec2\_elb\_lb module](https://forum.ansible.com/t/problems-provisioning-a-load-balancer-using-the-ec2-elb-lb-module/15372)

<div class="topic-metadata">

**Author:** [@iain\_wright](https://forum.ansible.com/u/iain_wright)\
**Replies:** 6\
**Last updated:** [June 5, 2014, 1:32am UTC](https://forum.ansible.com/t/problems-provisioning-a-load-balancer-using-the-ec2-elb-lb-module/15372 "2014-06-05T01:32:24Z")

</div>

Hi folks, I’m trying to provision an ELB in a VPC, this is the play im attempting, from the doc @ http://docs.ansible.com/ec2\_elb\_lb\_module.html \`

---

## [EC2 Auto-Scaling Group Enhancements](https://forum.ansible.com/t/ec2-auto-scaling-group-enhancements/15402)

<div class="topic-metadata">

**Author:** [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Replies:** 1\
**Last updated:** [June 5, 2014, 1:14am UTC](https://forum.ansible.com/t/ec2-auto-scaling-group-enhancements/15402 "2014-06-05T01:14:41Z")

</div>

Hello, I submitted a pull request for some enhancements to the ec2\_asg module https://github.com/ansible/ansible/pull/7612 This adds a few things: More verbose output than just changed:\[true | false\]. This is useful…

---

## [how to reference metadata in rax\_facts](https://forum.ansible.com/t/how-to-reference-metadata-in-rax-facts/15395)

<div class="topic-metadata">

**Author:** [@Jurgen\_Coetsiers2](https://forum.ansible.com/u/Jurgen_Coetsiers2)\
**Replies:** 7\
**Last updated:** [June 4, 2014, 8:20pm UTC](https://forum.ansible.com/t/how-to-reference-metadata-in-rax-facts/15395 "2014-06-04T20:20:45Z")

</div>

Hi All, My Rackspace cloud servers are under managed services and under RackConnect services. This means than when they are built, first 2 other scripts need to run before I can actually use the server to provision it. …

---

## [delegate\_to a list does not appear to work in a role](https://forum.ansible.com/t/delegate-to-a-list-does-not-appear-to-work-in-a-role/15370)

<div class="topic-metadata">

**Author:** [@Stewart\_M](https://forum.ansible.com/u/Stewart_M)\
**Replies:** 2\
**Last updated:** [June 4, 2014, 4:04pm UTC](https://forum.ansible.com/t/delegate-to-a-list-does-not-appear-to-work-in-a-role/15370 "2014-06-04T16:04:09Z")

</div>

I appear to be having a problem when trying to pass a list of hosts to delegate\_to, within a role. (Simplified examples to demonstrate the behavior I am seeing, using freshly cloned version from Github) This works as e…

---

## [problem with jinja2 template accessing hostvars fields](https://forum.ansible.com/t/problem-with-jinja2-template-accessing-hostvars-fields/13754)

<div class="topic-metadata">

**Author:** [@Kesten\_Broughton2](https://forum.ansible.com/u/Kesten_Broughton2)\
**Replies:** 2\
**Last updated:** [June 3, 2014, 11:12pm UTC](https://forum.ansible.com/t/problem-with-jinja2-template-accessing-hostvars-fields/13754 "2014-06-03T23:12:29Z")

</div>

Can anybody explain why I can access ansible\_default\_ipv4 in a task, but not in a jinja2 file? - debug: msg="{{ hostvars\[inventory\_hostname\]\['ansible\_default\_ipv4'\] }}" This gives an ipv4 address like 10.10.10.10 In …

---

## [Just Noticed](https://forum.ansible.com/t/just-noticed/15393)

<div class="topic-metadata">

**Author:** [@Vinit\_Khandagle](https://forum.ansible.com/u/Vinit_Khandagle)\
**Replies:** 1\
**Last updated:** [June 3, 2014, 3:52pm UTC](https://forum.ansible.com/t/just-noticed/15393 "2014-06-03T15:52:46Z")

</div>

Hi This is just bring to notice: I was setting up ec2 dynamic inventory and I followed the instruction on the Docs. I copied the ec2.py from the site and placed it as an inventory I did all the configuration right for…

---

## [Should I mix static and dynamic inventories (i.e. inventory dir)?](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389)

<div class="topic-metadata">

**Author:** [@Hagai\_Kariti](https://forum.ansible.com/u/Hagai_Kariti)\
**Replies:** 2\
**Last updated:** [June 3, 2014, 5:23am UTC](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389 "2014-06-03T05:23:49Z")

</div>

Hi all. We’re using a mix of dynamic and static inventories: the dynamic one for updated host and hostgroups and the static one for group relations and the occasional static host. Is this the “proper” way to handle thi…

---

## [Ansible template for loop any given number of iterations](https://forum.ansible.com/t/ansible-template-for-loop-any-given-number-of-iterations/15387)

<div class="topic-metadata">

**Author:** [@Faisal\_Ali\_Rabbani](https://forum.ansible.com/u/Faisal_Ali_Rabbani)\
**Replies:** 1\
**Last updated:** [June 3, 2014, 2:10am UTC](https://forum.ansible.com/t/ansible-template-for-loop-any-given-number-of-iterations/15387 "2014-06-03T02:10:58Z")

</div>

I am running a for lo0p in creating file via ansible template. If I hard code my loop count everything works fine. {% for x in range(0,3) %} Value of x is : {{x}} {% endfor %} But as I give dinamic value it gives …

---

## [theory filters troubles (with\_items expects a list)](https://forum.ansible.com/t/theory-filters-troubles-with-items-expects-a-list/15350)

<div class="topic-metadata">

**Author:** [@pjdeelman](https://forum.ansible.com/u/pjdeelman)\
**Replies:** 9\
**Last updated:** [June 3, 2014, 1:45am UTC](https://forum.ansible.com/t/theory-filters-troubles-with-items-expects-a-list/15350 "2014-06-03T01:45:05Z")

</div>

Trying to figure out theory filters, but no luck yet. I’m pulling a list of available tables from postgres and exclude the tables contained in the list supertables. Am i using this functionality in the correct way? Or d…

---

## [Error: ansible requires a json module, none found!](https://forum.ansible.com/t/error-ansible-requires-a-json-module-none-found/13037)

<div class="topic-metadata">

**Author:** [@Dimon](https://forum.ansible.com/u/Dimon)\
**Replies:** 7\
**Last updated:** [June 2, 2014, 2:55pm UTC](https://forum.ansible.com/t/error-ansible-requires-a-json-module-none-found/13037 "2014-06-02T14:55:07Z")

</div>

Hi I searched google and only found https://groups.google.com/forum/#!topic/ansible-project/VvsonX7QrMk that deals with the similar problem. My problem is: I’m using RHEL6 as my main ansible station (ansible-1.1 from E…

---

## [How to access an host variable defined in inventory](https://forum.ansible.com/t/how-to-access-an-host-variable-defined-in-inventory/15383)

<div class="topic-metadata">

**Author:** [@Servermanaged](https://forum.ansible.com/u/Servermanaged)\
**Replies:** 1\
**Last updated:** [June 1, 2014, 7:09pm UTC](https://forum.ansible.com/t/how-to-access-an-host-variable-defined-in-inventory/15383 "2014-06-01T19:09:19Z")

</div>

Hello friends maybe a noob question but I’m unable to get host variable work as expected. This is my question. Given this template: object Host “{{ hostvars\[item\]\[‘ansible\_fqdn’\] }}” { import “generic-host” address …

---

## [Inventory file - different groups with same  variables but not the same  value](https://forum.ansible.com/t/inventory-file-different-groups-with-same-variables-but-not-the-same-value/15289)

<div class="topic-metadata">

**Author:** [@Sacha\_Vukovic](https://forum.ansible.com/u/Sacha_Vukovic)\
**Replies:** 7\
**Last updated:** [June 1, 2014, 7:07pm UTC](https://forum.ansible.com/t/inventory-file-different-groups-with-same-variables-but-not-the-same-value/15289 "2014-06-01T19:07:29Z")

</div>

Hello, after reading this post : https://groups.google.com/forum/#!topic/ansible-project/XbVNoUED2cU http://docs.ansible.com/intro\_inventory.html I have a similar question with inventory file, I want to provisionnin…

---

## [lineinfile: backrefs and jinja2 variables](https://forum.ansible.com/t/lineinfile-backrefs-and-jinja2-variables/15373)

<div class="topic-metadata">

**Author:** [@Gregor\_Giesen](https://forum.ansible.com/u/Gregor_Giesen)\
**Replies:** 2\
**Last updated:** [May 31, 2014, 8:40pm UTC](https://forum.ansible.com/t/lineinfile-backrefs-and-jinja2-variables/15373 "2014-05-31T20:40:02Z")

</div>

Hi everybody, when I try the following in a playbook (ansible 1.6.2): lineinfile: dest: /etc/nagios/nrpe.cfg backrefs: yes regexp: ‘^(allowed\_hosts=).\*$’ line: ‘\\1{{ monitoring\_server }}’ where “monitoring\_server…

---

## [How to target one host from a list?](https://forum.ansible.com/t/how-to-target-one-host-from-a-list/15314)

<div class="topic-metadata">

**Author:** [@Steve\_Ims](https://forum.ansible.com/u/Steve_Ims)\
**Replies:** 10\
**Last updated:** [May 31, 2014, 4:40pm UTC](https://forum.ansible.com/t/how-to-target-one-host-from-a-list/15314 "2014-05-31T16:40:46Z")

</div>

We have multiple versions of a multi-tier application deployed on EC2. Each instance is tagged with version and role. Versions might be clustered (so could be multiple instances with same version and role tag). For exa…

---

## [with\_items x count](https://forum.ansible.com/t/with-items-x-count/15359)

<div class="topic-metadata">

**Author:** [@smajor](https://forum.ansible.com/u/smajor)\
**Replies:** 5\
**Last updated:** [May 31, 2014, 4:30pm UTC](https://forum.ansible.com/t/with-items-x-count/15359 "2014-05-31T16:30:23Z")

</div>

Hey just wondering if there is a more elegant way of doing this: droplets: name: consul count: \[1,2,3,4,5\] region: nyc2 region\_id: 4 name: influxdb count: \[1,2,3\] region: nyc2 region\_id: 4 name: elasticsearch …

---

## [Apache 2.4 failing to install from ports in FreeBSD](https://forum.ansible.com/t/apache-2-4-failing-to-install-from-ports-in-freebsd/15360)

<div class="topic-metadata">

**Author:** [@Francisco\_Reyes](https://forum.ansible.com/u/Francisco_Reyes)\
**Replies:** 6\
**Last updated:** [May 31, 2014, 4:27pm UTC](https://forum.ansible.com/t/apache-2-4-failing-to-install-from-ports-in-freebsd/15360 "2014-05-31T16:27:05Z")

</div>

I have tried name: Install apache from ports portinstall: name=apache24 and name: Install apache from ports portinstall: name=www/apache24 And every time it crashes with: -------------- error fatal: \[test1\] =\> …

---

## [RAX modules and delegate\_to directive.](https://forum.ansible.com/t/rax-modules-and-delegate-to-directive/15375)

<div class="topic-metadata">

**Author:** [@Marcin\_Praczko](https://forum.ansible.com/u/Marcin_Praczko)\
**Replies:** 1\
**Last updated:** [May 31, 2014, 4:18pm UTC](https://forum.ansible.com/t/rax-modules-and-delegate-to-directive/15375 "2014-05-31T16:18:41Z")

</div>

Hello. I would like to ask for hint related with following challange. Gather details about hosts (external IP for example) from RackSpace-Cloud with RAX\_modules Generate configuration for monitoring server related wit…

---

## [Restart only changed services when using with\_items](https://forum.ansible.com/t/restart-only-changed-services-when-using-with-items/15366)

<div class="topic-metadata">

**Author:** [@Darren\_Hobbs](https://forum.ansible.com/u/Darren_Hobbs)\
**Replies:** 1\
**Last updated:** [May 31, 2014, 4:15pm UTC](https://forum.ansible.com/t/restart-only-changed-services-when-using-with-items/15366 "2014-05-31T16:15:50Z")

</div>

Hi, We have a bunch of services, defined as a list of {{ app.name }} and {{ app.version }} variables. We template our upstart files so ansible knows if a new version is being deployed or not (the file only changes if th…

---

## [whitespace in stdout](https://forum.ansible.com/t/whitespace-in-stdout/15367)

<div class="topic-metadata">

**Author:** [@smajor](https://forum.ansible.com/u/smajor)\
**Replies:** 2\
**Last updated:** [May 31, 2014, 4:12pm UTC](https://forum.ansible.com/t/whitespace-in-stdout/15367 "2014-05-31T16:12:40Z")

</div>

hello, I am having a hard time finding anything in google on how to remove whitespace from the stdout results. Here is the play: tasks: name: get droplet IPs from inventory shell: ansible -i hosts testing --list-ho…

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

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