How to add a new rpm package repo via saltstack?

I checked the docs, and only see method to list, modify or delete repos:


I would like to do this:

root@server# zypper ar https://myserver/my-funny-repo-url.repo

sls file:

    - mirrorlist: https://myserver/my-funny-repo-url.repo
    - failhard: True


CommandExecutionError: Zypper command failure: Repository 'zypper_repo' is invalid.


Valid metadata not found at specified URL Please check if the URIs defined for this repository are pointing to a valid repository. Skipping repository 'zypper_repo' because of the above error. Some of the repositories have not been refreshed because of an error.

1 Answer 1


Quote from the documentation you linked:

Modify one or more values for a repo. If the repo does not exist, it will be created, so long as the following values are specified:

  • And how to use this module in a sls-file?
    – guettli
    Feb 14, 2019 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.