Skip to content

Bypass ConfigLoadError warnings option #130

@AlpineScrewdriver

Description

@AlpineScrewdriver

Description of Issue/Question

I want to use a configuration group to apply system configuration. At the same time I want to delete system configuration as it will be managed by the group configuration. This works only if there is existing system configuration applied. If there is no system configuration a warning is thrown which causes an exception. Is there a way to bypass the warning or another workaround to achieve this, other than separating into two states and accepting that the delete state can fail or not using config groups altogether.

I used system as an example and I realize it will have root-auth configured if not applied by another config group, this is just intended as an example.

Setup

example.xml:

<configuration>
	<groups>
			<name>salt</name>
			<system>
				<host-name>example</host-name>
			</system>
	</groups>
  <system delete="delete"/>
</configuration>

If it does not find system configuration, an exception is thrown due to a warning.

message:
Could not load configuration due to : "ConfigLoadError(severity: warning, bad_element: None, message: warning: statement not found: system)"

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