Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ansible module (shell) to install/remove packages on Suse Linux
Branch: master
Pull request Compare This branch is 6 commits behind jpmens:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
zypp

README.md

zypp

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.
Something went wrong with that request. Please try again.