??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
Udac @` s= d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z d d
l
Z
d d l m Z
d d l m Z d d
l m Z d d l m Z d d d YZ d Z e d Z d Z e d
d Z d Z d Z d Z d Z d Z d Z! d Z" e# d k r9e" n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys
---
module: zypper
author:
- "Patrick Callahan (@dirtyharrycallahan)"
- "Alexander Gubin (@alxgu)"
- "Thomas O'Donnell (@andytom)"
- "Robin Roth (@robinro)"
- "Andrii Radyk (@AnderEnder)"
version_added: "1.2"
short_description: Manage packages on SUSE and openSUSE
description:
- Manage packages on SUSE and openSUSE using the zypper and rpm tools.
options:
name:
description:
- Package name C(name) or package specifier or a list of either.
- Can include a version like C(name=1.0), C(name>3.4) or C(name<=2.7). If a version is given, C(oldpackage) is implied and zypper is allowed to
update the package within the version range given.
- You can also pass a url or a local path to a rpm file.
- When using state=latest, this can be '*', which updates all installed packages.
required: true
aliases: [ 'pkg' ]
state:
description:
- C(present) will make sure the package is installed.
C(latest) will make sure the latest version of the package is installed.
C(absent) will make sure the specified package is not installed.
C(dist-upgrade) will make sure the latest version of all installed packages from all enabled repositories is installed.
- When using C(dist-upgrade), I(name) should be C('*').
required: false
choices: [ present, latest, absent, dist-upgrade ]
default: "present"
type:
description:
- The type of package to be operated on.
required: false
choices: [ package, patch, pattern, product, srcpackage, application ]
default: "package"
version_added: "2.0"
extra_args_precommand:
version_added: "2.6"
required: false
description:
- Add additional global target options to C(zypper).
- Options should be supplied in a single line as if given in the command line.
disable_gpg_check:
description:
- Whether to disable to GPG signature checking of the package
signature being installed. Has an effect only if state is
I(present) or I(latest).
required: false
default: "no"
type: bool
disable_recommends:
version_added: "1.8"
description:
- Corresponds to the C(--no-recommends) option for I(zypper). Default behavior (C(yes)) modifies zypper's default behavior; C(no) does
install recommended packages.
required: false
default: "yes"
type: bool
force:
version_added: "2.2"
description:
- Adds C(--force) option to I(zypper). Allows to downgrade packages and change vendor or architecture.
required: false
default: "no"
type: bool
update_cache:
version_added: "2.2"
description:
- Run the equivalent of C(zypper refresh) before the operation. Disabled in check mode.
required: false
default: "no"
type: bool
aliases: [ "refresh" ]
oldpackage:
version_added: "2.2"
description:
- Adds C(--oldpackage) option to I(zypper). Allows to downgrade packages with less side-effects than force. This is implied as soon as a
version is specified as part of the package name.
required: false
default: "no"
type: bool
extra_args:
version_added: "2.4"
required: false
description:
- Add additional options to C(zypper) command.
- Options should be supplied in a single line as if given in the command line.
notes:
- When used with a `loop:` each package will be processed individually,
it is much more efficient to pass the list directly to the `name` option.
# informational: requirements for nodes
requirements:
- "zypper >= 1.0 # included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0"
- python-xml
- rpm
s
# Install "nmap"
- zypper:
name: nmap
state: present
# Install apache2 with recommended packages
- zypper:
name: apache2
state: present
disable_recommends: no
# Apply a given patch
- zypper:
name: openSUSE-2016-128
state: present
type: patch
# Remove the "nmap" package
- zypper:
name: nmap
state: absent
# Install the nginx rpm from a remote repo
- zypper:
name: 'http://nginx.org/packages/sles/12/x86_64/RPMS/nginx-1.8.0-1.sles12.ngx.x86_64.rpm'
state: present
# Install local rpm file
- zypper:
name: /tmp/fancy-software.rpm
state: present
# Update all packages
- zypper:
name: '*'
state: latest
# Apply all available patches
- zypper:
name: '*'
state: latest
type: patch
# Perform a dist-upgrade with additional arguments
- zypper:
name: '*'
state: dist-upgrade
extra_args: '--no-allow-vendor-change --allow-arch-change'
# Refresh repositories and update package "openssl"
- zypper:
name: openssl
state: present
update_cache: yes
# Install specific version (possible comparisons: <, >, <=, >=, =)
- zypper:
name: 'docker>=1.10'
state: present
# Wait 20 seconds to acquire the lock before failing
- zypper:
name: mosh
state: present
environment:
ZYPP_LOCK_TIMEOUT: 20
N( t parseString( t iteritems( t to_native( t
AnsibleModulet Packagec B` s e Z d Z d Z RS( c C` s. | | _ | | _ | | _ | d k | _ d S( Nt +( t namet prefixt versiont
shouldinstall( t selfR R R ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyt __init__ s c C` s | j | j | j S( N( R R R ( R ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyt __str__ s ( t __name__t
__module__R R ( ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyR s c C` s d } | d d k r- | d } | d } n | d k rB d } n t j d } yG | j | } | j \ } } | d k r d } n | | | f SWn t k
r | | d f SXd S(
s splits of the package name and desired version
example formats:
- docker>=1.10
- apache=2.4
Allowed version specifiers: <, >, <=, >=, =
Allowed version format: [0-9.-]*
Also allows a prefix indicating remove "-", "~" or install "+"
t i t -t ~R
i s! ^(.*?)((?:<|>|<=|>=|=)[0-9.-]*)?$N( R R R
( t ret compilet matcht groupst Nonet Exception( R R t
version_checkt reresR ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyt split_name_version s
c C` s g } g } x | D] } d | k s4 | j d rD | j | q t | \ } } } | d k r} | rt d } q} d } n | j t | | | q W| | f S( Ns ://s .rpmR R
( R R
( t endswitht appendR" R ( t namest removet packagest urlsR R t pnameR ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyt get_want_state s
c C` s_ t | d } | j d d d g | j g | D] } | j ^ q2 t | | d t d S( s get installed state of packagest searchs
--match-exacts --detailss --installed-onlyt fail_not_foundi ( t get_cmdt extendR t parse_zypper_xmlt False( t mR' t cmdt p( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/zypper.pyt get_installed_state s #c C` s | j | d t \ } } } y t | } WnN t j j j k
r~ } | j d d t | d | d | d | d | n X| d k r | r | j d d
j
d j } | j d | d | d | d | d | qi | | | f Sn | d k r| d k rt
}
i } n | j d } x | D] } | j d }
i | |
<| j d | |
d <| j d | |
d <| j d } | d k | |
d <| j j | |
d