# Installing redis from RPM

**URL:** <https://forum.ansible.com/t/installing-redis-from-rpm/20155>\
**Category:** Ansible Project\
**Created:** [January 8, 2016, 3:33pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155 "2016-01-08T15:33:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Jelinek](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@James\_Jelinek](https://forum.ansible.com/u/James_Jelinek)\
**Post date:** [January 8, 2016, 3:33pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155/1 "2016-01-08T15:33:04Z")

</div>

I’m working on a simple playbook to install redis from the remi repo. When I do this manually on the target server I do the following:

- `wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm`

- `sudo rpm -Uvh remi-release-6.rpm`

- `sudo vim /etc/yum.repos.d/remi.repo #to mark the repo as enabled`

- `sudo yum install redis`

- `sudo chkconfig redis on`

- `sudo service redis start`  
I think I have most of the stuff figured out like starting the service and installing via yum once the repo is installed. Just wondering how I can automated installing the rpm from the URL and setting the repo to enabled.

I’ll continue playing with it but wanted to ask for a little guidance since it’s been a year + since I’ve worked with Ansible.

Thanks folks!

---

<div class="post-metadata">

**Author:** ![James\_Jelinek](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@James\_Jelinek](https://forum.ansible.com/u/James_Jelinek)\
**Post date:** [January 8, 2016, 3:44pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155/2 "2016-01-08T15:44:20Z")

</div>

Ok so I figured how how to get the RPM/repo installed. This is my playbook so far

---

<div class="post-metadata">

**Author:** ![cosbug](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@cosbug](https://forum.ansible.com/u/cosbug)\
**Post date:** [January 8, 2016, 4:06pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155/3 "2016-01-08T16:06:41Z")

</div>

Try to use “yumrepo” module to enable yum repository.

---

<div class="post-metadata">

**Author:** ![James\_Jelinek](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@James\_Jelinek](https://forum.ansible.com/u/James_Jelinek)\
**Post date:** [January 8, 2016, 5:06pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155/4 "2016-01-08T17:06:01Z")

</div>

Thanks, I did some digging and figured it out. This playbook takes care of everything now, just had to do a little digging on enabling the repo via yum.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 8, 2016, 5:48pm UTC](https://forum.ansible.com/t/installing-redis-from-rpm/20155/5 "2016-01-08T17:48:48Z")

</div>

with:

&nbsp;&nbsp;&nbsp;service: name=redis state=started enabled=yes

you don't need to call chkconfig
