Skip to content

Add whitespace surpression to redisdb.yaml.erb to ensure a valid yaml#533

Merged
albertvaka merged 1 commit intoDataDog:masterfrom
Aramack:aramack/redis_keys_tags
Jun 17, 2019
Merged

Add whitespace surpression to redisdb.yaml.erb to ensure a valid yaml#533
albertvaka merged 1 commit intoDataDog:masterfrom
Aramack:aramack/redis_keys_tags

Conversation

@Aramack
Copy link
Copy Markdown
Contributor

@Aramack Aramack commented Jun 12, 2019

Add white space suppression to redisdb.yaml.erb to ensure a valid yaml file is output.

Currently multiple keys or tags will break the indentation. EG:

class { 'datadog_agent::integrations::redis' :
  host => 'localhost',
  keys => ['foo','bar'],
  tags => ['foo:bar','spam:egg'],
}

Will output invalid yaml:

### MANAGED BY PUPPET

init_config:

instances:
  - host: localhost
    port: 6379
    warn_on_missing_keys: true
    command_stats: false
    keys:
      - foo
        - bar
      tags:
      - foo:bar
        - spam:egg

With this change applied, the output will be valid yaml:

### MANAGED BY PUPPET

init_config:

instances:
  - host: localhost
    port: 6379
    warn_on_missing_keys: true
    command_stats: false
    keys:
      - foo
      - bar
    tags:
      - foo:bar
      - spam:egg

@albertvaka
Copy link
Copy Markdown
Contributor

Hi Aramack! I just tested your fix and it works like a charm!

Thanks for a lot for spotting this and taking the time to fix it 😄

Merging!

@albertvaka albertvaka merged commit 9659c2e into DataDog:master Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants