generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c32a5d6
commit f4a224d
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
roles: | ||
# - packages | ||
- postgresql | ||
- redis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Restart Redis | ||
service: | ||
name: redis-server | ||
state: restarted |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
- name: Update apt-get repo and cache | ||
apt: | ||
update_cache: yes | ||
|
||
- name: Install redis | ||
apt: | ||
name: redis-server | ||
state: present | ||
|
||
- name: Update redis configuration | ||
lineinfile: | ||
path: /etc/redis/redis.conf | ||
regexp: "^protected-mode" | ||
line: "protected-mode no" | ||
state: present | ||
backup: yes | ||
|
||
- name: Bind default address | ||
lineinfile: | ||
path: /etc/redis/redis.conf | ||
regexp: "^bind" | ||
line: "bind 0.0.0.0 ::1" | ||
state: present | ||
backup: yes | ||
notify: Restart redis | ||
|
||
- name: Start redis | ||
service: | ||
name: redis-server | ||
state: started | ||
enabled: yes |