Fix obsolete parameter.
Change-Id: Ic79a50793dfbff220244a410bdf36bcf8dfb21a1
diff --git a/linux/system/repo.sls b/linux/system/repo.sls
index 0c0b026..d000f50 100644
--- a/linux/system/repo.sls
+++ b/linux/system/repo.sls
@@ -1,5 +1,10 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %}
+{%- if grains['saltversioninfo'] < [2018, 3] %}
+{%- set refresh_cmd = 'refresh_db' %}
+{%- else %}
+{%- set refresh_cmd = 'refresh' %}
+{%- endif %}
{% if system.pkgs %}
linux_repo_prereq_pkgs:
@@ -113,7 +118,7 @@
{%- if repo.get('enabled', True) %}
linux_repo_{{ name }}:
pkgrepo.managed:
- - refresh_db: False
+ - {{ refresh_cmd }}: False
- require_in:
- refresh_db
{%- if repo.ppa is defined %}
@@ -146,7 +151,7 @@
{%- else %}
linux_repo_{{ name }}:
pkgrepo.absent:
- - refresh_db: False
+ - {{ refresh_cmd }}: False
- require:
- file: /etc/apt/apt.conf.d/99proxies-salt-{{ name }}
- require_in:
@@ -177,7 +182,7 @@
{%- if not repo.get('default', False) %}
linux_repo_{{ name }}:
pkgrepo.managed:
- - refresh_db: False
+ - {{ refresh_cmd }}: False
- require_in:
- refresh_db
- name: {{ name }}
@@ -194,7 +199,7 @@
{%- endif %}
{%- else %}
pkgrepo.absent:
- - refresh_db: False
+ - {{ refresh_cmd }}: False
- require_in:
- refresh_db
- name: {{ repo.source }}