systemd_redis.j2 806 B

12345678910111213141516171819202122
  1. #####################################################################
  2. # {{ ansible_managed }}
  3. # {{ item }}
  4. #####################################################################
  5. [Unit]
  6. Description=Redis Server Port {{ item }}
  7. After=network.target
  8. [Service]
  9. WorkingDirectory=/redis/persistant/cpredis
  10. Type=simple
  11. LimitNOFILE=65535
  12. User=redis
  13. ExecStart=/usr/local/bin/redis-server --port {{ item }} --protected-mode no --dbfilename {{ item }}-redis.rdb --loadmodule /usr/lib/redisraft.so addr={{ ansible_default_ipv4.address }}:{{ item }} raft-log-fsync=no follower-proxy=yes raft-log-filename={{ item }}-raftlog.db
  14. StandardOutput=file:/var/log/cpredis/redis-{{ item }}.log
  15. StandardError=file:/var/log/cpredis/redis-{{ item }}-error.log
  16. [Install]
  17. WantedBy=multi-user.target
  18. Alias=redis-{{ item }}.service