12345678910111213141516171819202122 |
- #####################################################################
- # {{ ansible_managed }}
- # {{ item['port'] }}
- #####################################################################
- [Unit]
- Description=Redis Server Port {{ item['port'] }}
- After=network.target
- [Service]
- WorkingDirectory=/opt/cpredis
- Type=simple
- LimitNOFILE=65535
- User=redis
- ExecStart=/usr/local/bin/redis-server --port {{ item['port'] }} --protected-mode no --dbfilename {{ item['port'] }}-redis.rdb --loadmodule /usr/local/share/redisraft/redisraft.so addr={{ ansible_default_ipv4.address }}:{{ item['port'] }} raft-log-fsync=no follower-proxy=no raftize-all-commands=yes cluster-start-hslot={{ item['start-hslot'] }} cluster-end-hslot={{ item['end-hslot'] }} raft-log-filename={{ item['port'] }}-raftlog.db cluster-mode=yes
- StandardOutput=file:/var/log/cpredis/redis-{{ item['port'] }}.log
- StandardError=file:/var/log/cpredis/redis-{{ item['port'] }}-error.log
- [Install]
- WantedBy=multi-user.target
- Alias=redis-{{ item['port'] }}.service
|