From 0db1bd480331e24afef04d1209e13ecc8eabf7b7 Mon Sep 17 00:00:00 2001 From: Adam Dyson Date: Thu, 9 Jun 2016 17:29:19 +1000 Subject: [PATCH] Fixed issues with boolean variables set as strings --- .travis.yml | 5 ----- defaults/main.yml | 16 ++++++++-------- docs/README.md | 16 ++++++++-------- tasks/configure.yml | 20 ++++++++++---------- 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60aa6ba..92e2068 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,11 +41,6 @@ script: && (echo "Idempotence test: Passed" && exit 0) || (echo "Idempotence test: Failed" && exit 1) - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm redis-server --version' - - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm cat /etc/redis/redis.conf' - - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm cat /etc/redis.conf' - - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ls /var/log/redis' - - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm cat /var/log/redis/redis-server.log' - - 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm cat /var/log/redis/redis.log' - 'sudo docker stop "$(cat ${container_id})"' notifications: diff --git a/defaults/main.yml b/defaults/main.yml index d2564d6..226f8d6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,19 +14,19 @@ redis_service_enabled: yes redis_conf_template: 'redis.conf.j2' redis_packages: redis_daemonize: 'yes' -redis_password: 'false' +redis_password: false redis_port: '6379' redis_bind: '127.0.0.1' redis_pidfile: '/var/run/redis/{{ redis_service_name }}.pid' -redis_logfile: '/var/log/redis/redis-server.log' +redis_logfile: '/var/log/redis/{{ redis_service_name }}.log' redis_loglevel: 'notice' redis_tcp_backlog: '511' -redis_unixsocket: 'false' +redis_unixsocket: false redis_timeout: '0' redis_tcp_keepalive: '0' redis_syslog_enabled: 'no' -redis_syslog_ident: 'redis_{{ redis_port }}' -redis_syslog_facility: 'USER' +redis_syslog_ident: 'redis' +redis_syslog_facility: 'local0' redis_databases: '16' redis_save: - '900 1' @@ -37,7 +37,7 @@ redis_rdbcompression: 'yes' redis_rdbchecksum: 'yes' redis_dbfilename: 'dump.rdb' redis_dir: '/var/lib/redis' -redis_slaveof: 'false' +redis_slaveof: false redis_slave_serve_stale_data: 'yes' redis_slave_read_only: 'yes' redis_repl_diskless_sync: 'no' @@ -45,8 +45,8 @@ redis_repl_diskless_sync_delay: '5' redis_repl_ping_slave_period: '10' redis_repl_timeout: '60' redis_repl_disable_tcp_nodelay: 'no' -redis_repl_backlog_size: 'false' -redis_repl_backlog_ttl: 'false' +redis_repl_backlog_size: false +redis_repl_backlog_ttl: false redis_slave_priority: '100' redis_min_slaves_to_write: '0' redis_min_slaves_max_lag: '10' diff --git a/docs/README.md b/docs/README.md index 59dccdc..a960e9a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -20,19 +20,19 @@ redis_service_enabled: yes redis_conf_template: 'redis.conf.j2' redis_packages: redis_daemonize: 'yes' -redis_password: 'false' +redis_password: false redis_port: '6379' redis_bind: '127.0.0.1' redis_pidfile: '/var/run/redis/{{ redis_service_name }}.pid' -redis_logfile: '/var/log/redis/redis-server.log' +redis_logfile: '/var/log/redis/{{ redis_service_name }}.log' redis_loglevel: 'notice' redis_tcp_backlog: '511' -redis_unixsocket: 'false' +redis_unixsocket: false redis_timeout: '0' redis_tcp_keepalive: '0' redis_syslog_enabled: 'no' -redis_syslog_ident: 'redis_{{ redis_port }}' -redis_syslog_facility: 'USER' +redis_syslog_ident: 'redis' +redis_syslog_facility: 'local0' redis_databases: '16' redis_save: - '900 1' @@ -43,7 +43,7 @@ redis_rdbcompression: 'yes' redis_rdbchecksum: 'yes' redis_dbfilename: 'dump.rdb' redis_dir: '/var/lib/redis' -redis_slaveof: 'false' +redis_slaveof: false redis_slave_serve_stale_data: 'yes' redis_slave_read_only: 'yes' redis_repl_diskless_sync: 'no' @@ -51,8 +51,8 @@ redis_repl_diskless_sync_delay: '5' redis_repl_ping_slave_period: '10' redis_repl_timeout: '60' redis_repl_disable_tcp_nodelay: 'no' -redis_repl_backlog_size: 'false' -redis_repl_backlog_ttl: 'false' +redis_repl_backlog_size: false +redis_repl_backlog_ttl: false redis_slave_priority: '100' redis_min_slaves_to_write: '0' redis_min_slaves_max_lag: '10' diff --git a/tasks/configure.yml b/tasks/configure.yml index db3c52b..0e2a98c 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -32,13 +32,13 @@ reload: yes ignoreerrors: yes -#- name: 'Redis | Configure Redis conf file.' -# become: yes -# template: -# src: '{{ redis_conf_template }}' -# dest: '{{ redis_conf_file }}' -# owner: 'root' -# group: 'root' -# mode: '0644' -# notify: 'restart redis' -# when: '{{ redis_conf_template | default(None) != None }}' \ No newline at end of file +- name: 'Redis | Configure Redis conf file.' + become: yes + template: + src: '{{ redis_conf_template }}' + dest: '{{ redis_conf_file }}' + owner: 'root' + group: 'root' + mode: '0644' + notify: 'restart redis' + when: '{{ redis_conf_template | default(None) != None }}' \ No newline at end of file