From bcf23bb81bf75d1f56d4fe0578ef2580fad3aeb9 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Thu, 27 Jun 2019 16:06:43 +0200 Subject: [PATCH] runners.git_pillar: Also match the repo parameter against the repo name --- salt/runners/git_pillar.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/salt/runners/git_pillar.py b/salt/runners/git_pillar.py index 436740b10c1c..97cce777584e 100644 --- a/salt/runners/git_pillar.py +++ b/salt/runners/git_pillar.py @@ -33,6 +33,9 @@ def update(branch=None, repo=None): changes were fetched. ``False`` now is reserved only for instances in which there were errors. + .. versionchanged:: 2020.2.0 + The repo parameter also matches against the repo name. + Fetch one or all configured git_pillar remotes. .. note:: @@ -55,6 +58,8 @@ def update(branch=None, repo=None): # Update specific branch and repo salt-run git_pillar.update branch='branch' repo='https://foo.com/bar.git' + # Update specific repo, by name + salt-run git_pillar.update repo=myrepo # Update all repos salt-run git_pillar.update # Run with debug logging @@ -78,7 +83,7 @@ def update(branch=None, repo=None): if branch != remote.branch: continue if repo is not None: - if repo != remote.url: + if repo != remote.url and repo != remote.name: continue try: result = remote.fetch()