diff --git a/tasks/sentinel.yml b/tasks/sentinel.yml index bc7eaeb3..03478426 100644 --- a/tasks/sentinel.yml +++ b/tasks/sentinel.yml @@ -36,13 +36,18 @@ when: redis_as_service and ansible_service_mgr|default() == 'systemd' notify: restart sentinel +- name: set sentinel to start at boot (systemd) + systemd: + name: sentinel_{{ redis_sentinel_port }} + enabled: yes + daemon_reload: yes + when: redis_as_service and ansible_service_mgr|default() == 'systemd' - name: set sentinel to start at boot service: name: sentinel_{{ redis_sentinel_port }} enabled: yes - daemon_reload: "{{ True if ansible_service_mgr|default() == 'systemd' else omit }}" - when: redis_as_service + when: redis_as_service and ansible_service_mgr|default() != 'systemd' # Check then create log dir to prevent aggressively overwriting permissions - name: check if sentinel log directory exists diff --git a/tasks/server.yml b/tasks/server.yml index 67c300c3..a01ff799 100644 --- a/tasks/server.yml +++ b/tasks/server.yml @@ -36,12 +36,18 @@ when: redis_as_service and ansible_service_mgr | default == 'systemd' notify: restart redis +- name: set redis to start at boot (systemd) + systemd: + name: "{{ redis_service_name }}" + enabled: yes + daemon_reload: yes + when: redis_as_service and ansible_service_mgr | default == 'systemd' + - name: set redis to start at boot service: name: "{{ redis_service_name }}" enabled: yes - daemon_reload: "{{ True if ansible_service_mgr | default == 'systemd' else omit }}" - when: redis_as_service + when: redis_as_service and ansible_service_mgr | default != 'systemd' # Check then create log dir to prevent aggressively overwriting permissions - name: check if log directory exists