-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy: Install Redis, listen only on Nexodus VPC
Signed-off-by: Russell Bryant <[email protected]>
- Loading branch information
Showing
5 changed files
with
50 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
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: Deploy Redis | ||
hosts: labNodes | ||
roles: | ||
- role: redis | ||
become: true |
Empty file.
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,35 @@ | ||
--- | ||
- name: Install redis | ||
ansible.builtin.dnf: | ||
name: redis | ||
state: present | ||
become: true | ||
|
||
- name: Update redis config to load redis.local.conf | ||
ansible.builtin.lineinfile: | ||
path: /etc/redis/redis.conf | ||
line: 'include /etc/redis/redis.local.conf' | ||
become: true | ||
|
||
- name: Get Nexodus Tunnel IP (v4) | ||
Check failure on line 14 in deploy/ansible/redis/tasks/main.yml GitHub Actions / ansiblecommand-instead-of-shell
|
||
ansible.builtin.shell: nexctl nexd get tunnelip | ||
register: nexodus_tunnelip_v4 | ||
become: true | ||
|
||
- name: Get Nexodus Tunnel IP (v6) | ||
Check failure on line 19 in deploy/ansible/redis/tasks/main.yml GitHub Actions / ansiblecommand-instead-of-shell
|
||
ansible.builtin.shell: nexctl nexd get tunnelip --ipv6 | ||
register: nexodus_tunnelip_v6 | ||
become: true | ||
|
||
- name: Generate redis.local.conf | ||
ansible.builtin.template: | ||
src: redis/templates/redis.local.conf.j2 | ||
dest: /etc/redis/redis.local.conf | ||
become: true | ||
|
||
- name: Start redis systemd service | ||
ansible.builtin.systemd: | ||
name: redis | ||
state: started | ||
enabled: true | ||
become: true |
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,2 @@ | ||
bind {{ nexodus_tunnelip_v4.stdout }} {{ nexodus_tunnelip_v6.stdout }} | ||
protected-mode no |