Skip to content

Instantly share code, notes, and snippets.

@SirPhemmiey
Created April 30, 2023 13:01
Show Gist options
  • Save SirPhemmiey/c0cfefc2fdcad605f34abeb70b30c4bc to your computer and use it in GitHub Desktop.
Save SirPhemmiey/c0cfefc2fdcad605f34abeb70b30c4bc to your computer and use it in GitHub Desktop.
---
- name: Redis Installation
hosts: redis
become: true
tasks:
- name: Update package repositories
yum:
update_cache: yes
- name: Install Redis
yum:
name: redis
state: present
- name: Start Redis service
systemd:
name: redis
state: started
enabled: yes
- name: Update Redis configuration
lineinfile:
path: /etc/redis.conf
regexp: '^bind 127.0.0.1'
line: 'bind 127.0.0.1'
- name: Restart Redis service
systemd:
name: redis
state: restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment