diff --git a/ansible/roles/maat-redis/tasks/main.yml b/ansible/roles/maat-redis/tasks/main.yml index 3cb229b8..18c5fdc7 100644 --- a/ansible/roles/maat-redis/tasks/main.yml +++ b/ansible/roles/maat-redis/tasks/main.yml @@ -12,18 +12,16 @@ - name: "Template the maat-redis.conf" template: - src: "{{ role_path }}/templates/maat-redis.conf.j2" - dest: /etc/maat-redis.conf + src: "{{ role_path }}/templates/maat-redis.conf.j2.j2" + dest: /opt/tsg/tsg-os-provision/templates/gdev.conf.j2 tags: template -- name: "start maat-redis" +- name: "enable maat-redis" systemd: name: maat-redis.service enabled: yes -#- name: "start maat-redis exporter" -# systemd: -# name: maat-redis-exporter.service -# state: started -# daemon_reload: yes -# enabled: yes +- name: "enable maat-redis exporter" + systemd: + name: maat-redis-exporter.service + enabled: yes diff --git a/ansible/roles/maat-redis/templates/maat-redis.conf.j2 b/ansible/roles/maat-redis/templates/maat-redis.conf.j2.j2 similarity index 99% rename from ansible/roles/maat-redis/templates/maat-redis.conf.j2 rename to ansible/roles/maat-redis/templates/maat-redis.conf.j2.j2 index 960ba101..5264b492 100644 --- a/ansible/roles/maat-redis/templates/maat-redis.conf.j2 +++ b/ansible/roles/maat-redis/templates/maat-redis.conf.j2.j2 @@ -89,8 +89,9 @@ protected-mode no # Accept connections on the specified port, default is 6379 (IANA #815344). # If port 0 is specified Redis will not listen on a TCP socket. +{% raw %} port {{ maat_redis_city_server.port }} - +{% endraw %} # TCP listen() backlog. # # In high requests-per-second environments you need an high backlog in order @@ -155,8 +156,9 @@ supervised no # # Creating a pid file is best effort: if Redis is not able to create it # nothing bad happens, the server will start and run normally. +{% raw %} pidfile /var/run/redis_{{ maat_redis_city_server.port }}.pid - +{% endraw %} # Specify the server verbosity level. # This can be one of: # debug (a lot of information, useful for development/testing) @@ -278,8 +280,9 @@ dir /var/lib/redis # network partition slaves automatically try to reconnect to masters # and resynchronize with them. # +{% raw %} slaveof {{ maat_redis_city_server.address }} {{ maat_redis_city_server.port }} - +{% endraw %} # If the master is password protected (using the "requirepass" configuration # directive below) it is possible to tell the slave to authenticate before # starting the replication synchronization process, otherwise the master will diff --git a/ansible/tsg_7400_deploy.yml b/ansible/tsg_7400_deploy.yml index 65288f18..643bc201 100644 --- a/ansible/tsg_7400_deploy.yml +++ b/ansible/tsg_7400_deploy.yml @@ -15,6 +15,7 @@ - {role: tsg_master, tags: tsg_master} - {role: tsg_app, tags: tsg_app} - {role: redis, tags: redis} + - {role: maat-redis, tags: maat-redis} - {role: certstore, tags: certstore} - {role: telegraf_statistic, tags: telegraf_statistic} - {role: exporter, tags: exporter}