Skip to content

remote.conf not removed when remote-servers list becomes empty #154

Description

@bish0polis

Cookbook version

6.0.8 + #152

Chef-client version

chef-14.10.9-1.el7.x86_64

Platform Details

rpm -qf /etc/issue

centos-release-7-6.1810.2.el7.centos.x86_64

Scenario:

As rsyslog servers drop to 0 members in the list, the 49-remote.conf is not removed.

Steps to Reproduce:

  1. with the search confirmed empty, throw an IP in to invoke the template instantiation:
knife ssh testmonkey \
  -- \
  chef-client -W -o rsyslog::client \
  -j '<(echo {\"rsyslog\":{\"custom_remote\":\[{\"server\":\"10.10.4.4\"}\]}})'
  1. and then again without the forced value:
knife ssh testmonkey \
  -- \
  chef-client -W -o rsyslog::client

Expected Result:

Remote.conf file should be removed to reflect empty forward-server list.

Actual Result:

Nothing: file is not changed nor removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions