Skip to content

Commit

Permalink
Add zypper install/remove to bash macros
Browse files Browse the repository at this point in the history
  • Loading branch information
abergmann committed Dec 9, 2020
1 parent 19fd9e5 commit d87a9e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/macros-bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ if ! rpm -q --quiet "{{{ package }}}" ; then
fi
{{%- elif pkg_manager == "apt_get" -%}}
apt-get install -y "{{{ package }}}"
{{%- elif pkg_manager == "zypper" -%}}
zypper install -y "{{{ package }}}"
{{%- else -%}}
{{{ die("Can't generate a remediation for " + pkg_manager) }}}
{{%- endif -%}}
Expand All @@ -139,6 +141,8 @@ if rpm -q --quiet "{{{ package }}}" ; then
fi
{{%- elif pkg_manager == "apt_get" -%}}
apt-get remove -y "{{{ package }}}"
{{%- elif pkg_manager == "zypper" -%}}
zypper remove -y "{{{ package }}}"
{{%- else -%}}
{{{ die("Can't generate a remediation for " + pkg_manager) }}}
{{%- endif -%}}
Expand Down

0 comments on commit d87a9e7

Please sign in to comment.