##################################################################### # {{ ansible_managed }} # {{ item['port'] }} ##################################################################### [Unit] Description=Redis Server Port {{ item['port'] }} After=network.target [Service] WorkingDirectory=/redis/persistant/cpredis Type=simple LimitNOFILE=65535 User=redis ExecStart=/usr/bin/taskset -c 2-{{ ansible_processor_nproc }} /usr/local/bin/redis-server --save "" --appendonly no --port {{ item['port'] }} --protected-mode no --dbfilename {{ item['port'] }}-redis.rdb --loadmodule /home/redis/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