Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass ConfigLoadError warnings option #130

Open
AlpineScrewdriver opened this issue Jul 1, 2019 · 0 comments
Open

Bypass ConfigLoadError warnings option #130

AlpineScrewdriver opened this issue Jul 1, 2019 · 0 comments

Comments

@AlpineScrewdriver
Copy link

AlpineScrewdriver commented Jul 1, 2019

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)"

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

No branches or pull requests

1 participant