# Using consul to lookup group vars

**URL:** <https://forum.ansible.com/t/using-consul-to-lookup-group-vars/18943>\
**Category:** Ansible Project\
**Created:** [August 4, 2015, 8:59pm UTC](https://forum.ansible.com/t/using-consul-to-lookup-group-vars/18943 "2015-08-04T20:59:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_S](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Post date:** [August 4, 2015, 8:59pm UTC](https://forum.ansible.com/t/using-consul-to-lookup-group-vars/18943/1 "2015-08-04T20:59:41Z")

</div>

We deploy RPMs by modifying a file within group\_vars as follows. Is there a way to store the list of RPMs in consul and do a lookup and perform the installation? I want to get away from having to modify the file manually.

# group\_vars/deploy\_list\_php

php:

- { module: api, svn\_tag: ‘20150731r1\_6.37\_justified’ }
- { module: ui, svn\_tag: ‘20150804r1\_6.37\_justified’ }
- { module: ui-sp, svn\_tag: ‘20150719r1\_6.37\_justified’ }

# task

- name: Install PHP modules  
command: sudo rpm -Uvh {{ rpm\_repository }}/aria-{{ item.module }}-{{ item.svn\_tag }}.rpm --force  
with\_items: php  
register: php\_command\_result  
ignore\_errors: True
