Created
April 30, 2023 13:01
-
-
Save SirPhemmiey/c0cfefc2fdcad605f34abeb70b30c4bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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