Skip to content

Commit

Permalink
Merge pull request sodafoundation#392 from joseph-v/fix_redis_restart
Browse files Browse the repository at this point in the history
After redis config change restart service
  • Loading branch information
skdwriting authored Sep 28, 2020
2 parents 8ec2b1e + 3d163f9 commit e89abe8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions ansible/roles/cleaner/scenarios/delfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- name: Kill running delfin processes
shell: "kill {{ item }}"
with_items: "{{ running_processes.stdout_lines }}"
ignore_errors: yes

- wait_for:
path: "/proc/{{ item }}/status"
Expand All @@ -40,6 +41,7 @@
- rabbitmq-server
- redis-server
become: yes
ignore_errors: yes

- name: clean up all delfin directories
file:
Expand Down
15 changes: 7 additions & 8 deletions ansible/roles/delfin-installer/scenarios/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
register: redisservice

- name: Ensure Redis is present
apt:
name: redis-server
state: latest
become: yes
shell: "{{ item }}"
with_items:
- ulimit -n 65536
- apt-get install -y redis-server
when:
- redisservice.stat.exists is undefined or redisservice.stat.exists == false

Expand All @@ -33,9 +33,8 @@
replace: "port {{ delfin_redis_port }}"
become: yes

- name: Ensure Redis is started
- name: Ensure Redis is restarted
service:
name: redis-server
state: started
enabled: yes
name: redis-server
state: restarted
become: yes
29 changes: 15 additions & 14 deletions ansible/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@
- deploy_project != "gelato"
tags: dock

- name: Install delfin
hosts: controllers
remote_user: root
vars_files:
- group_vars/common.yml
- group_vars/delfin.yml
gather_facts: false
become: True
tasks:
- import_role:
name: delfin-installer
when:
- enable_delfin == true
tags: delfin

- name: Install Gelato
hosts: controllers
remote_user: root
Expand Down Expand Up @@ -167,17 +182,3 @@
- enable_orchestration == true
tags: orchestration

- name: Install delfin
hosts: controllers
remote_user: root
vars_files:
- group_vars/common.yml
- group_vars/delfin.yml
gather_facts: false
become: True
tasks:
- import_role:
name: delfin-installer
when:
- enable_delfin == true
tags: delfin

0 comments on commit e89abe8

Please sign in to comment.