From ffafd2a2f5c3db7a33a11df153180de59fdfc6f8 Mon Sep 17 00:00:00 2001 From: reschl Date: Mon, 3 Sep 2018 16:42:39 +0200 Subject: [PATCH] Support package versions (#134) added possibility to configure server version and client version with pillar example --- openssh/client.sls | 3 +++ openssh/init.sls | 3 +++ pillar.example | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/openssh/client.sls b/openssh/client.sls index 902e858..3ee0ce5 100644 --- a/openssh/client.sls +++ b/openssh/client.sls @@ -3,3 +3,6 @@ openssh_client: pkg.installed: - name: {{ openssh.client }} + {% if openssh.client_version is defined %} + - version: {{ openssh.client_version }} + {% endif %} diff --git a/openssh/init.sls b/openssh/init.sls index 73d1ba8..653ed07 100644 --- a/openssh/init.sls +++ b/openssh/init.sls @@ -4,6 +4,9 @@ openssh: {% if openssh.server is defined %} pkg.installed: - name: {{ openssh.server }} + {% if openssh.server_version is defined %} + - version: {{ openssh.server_version }} + {% endif %} {% endif %} {% if openssh.sshd_enable is sameas true %} service.running: diff --git a/pillar.example b/pillar.example index d62d191..ba191b3 100644 --- a/pillar.example +++ b/pillar.example @@ -202,6 +202,10 @@ openssh: banner_string: | Welcome to {{ grains['id'] }}! + # Set installed package version + server_version: latest + client_version: latest + # Controls if SSHD should be enabled/started sshd_enable: true auth: