Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ansible module (shell) to install/remove packages on Suse Linux

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 zypp
README.md

zypp

Warning: deprectated

Ansible 1.2 now ships with a zypper module. Use that.

First stab at an Ansible module (bash, not Python) for installation/removal of packages on Suse's SLES and openSUSE.

There appears to be some Python zypper stuff floating around, but I have neither the time nor the inclination to use that, particularly not, as it's not installed by default on either platform (chicken/egg).

See also: Shell scripts as Ansible modules

Installation

Copy zypp to $ANSIBLE_LIBRARY on the management host. (There's no need to make it executable.)

install -m 444 zypp $ANSIBLE_LIBRARY/zypp

Usage

zypp
    pkg= package-name
    state= installed|removed (default: installed)

Do not, repeat: NOT, pass shell-metacharacters in any of the arguments.

Playbook

- name: Install editor
  action: zypp pkg=vim state=installed

Notes

  • zypper on openSUSE 12.1 always exits with 0 -- that's a BUG
  • Follow (tail -f) a node's /var/log/zypp/history to see operation.
  • Works on SLES11
  • 2012-08-31: fix zypper options for SLES10SP3
Something went wrong with that request. Please try again.