Skip to content

Failed on installing redis in server mode #2

Description

@autumnw

If I install redis in server mode. The pillar config as the following:

salt-call pillar.get redis
local:
----------
conf_dir:
/etc
server:
----------
bind:
----------
address:
0.0.0.0
port:
6379
protocol:
tcp
enabled:
True

I will get the following error:

      ID: /etc/redis.conf
Function: file.managed
  Result: False
 Comment: Unable to manage file: Jinja variable 'None' has no attribute 'enabled'
 Started: 21:25:45.446509
Duration: 138.781 ms
 Changes: 

The proposal fix is adding "if cluster != None" in redis.conf everywhere likes the following

{%- if cluster != None and cluster.enabled %}

BTW, this is on centos 7.
Another issue is in map.jinja, we should make the default conf_dir work:
'RedHat': {
'version': '2.8',
'pkgs': ['redis'],
'service': 'redis',
'conf_dir': '/etc',
'enabled': True,
'bind': {
'address': '127.0.0.1',
'port': '6379'
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions