??????????????
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
Z d d l
Z
d d l m Z d
Z
d Z d d Z d Z d Z d Z d Z d Z d Z d Z e d k rį e n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bysx
---
module: pacman
short_description: Manage packages with I(pacman)
description:
- Manage packages with the I(pacman) package manager, which is used by Arch Linux and its variants.
version_added: "1.0"
author:
- Indrajit Raychaudhuri (@indrajitr)
- Aaron Bull Schaefer (@elasticdog)
- Maxime de Roucy (@tchernomax)
options:
name:
description:
- Name or list of names of the package(s) or file(s) to install, upgrade, or remove.
Can't be used in combination with C(upgrade).
aliases: [ package, pkg ]
state:
description:
- Desired state of the package.
default: present
choices: [ absent, latest, present ]
recurse:
description:
- When removing a package, also remove its dependencies, provided
that they are not required by other packages and were not
explicitly installed by a user.
This option is deprecated since 2.8 and will be removed in 2.10,
use `extra_args=--recursive`.
default: no
type: bool
version_added: "1.3"
force:
description:
- When removing package, force remove package, without any checks.
Same as `extra_args="--nodeps --nodeps"`.
When update_cache, force redownload repo databases.
Same as `update_cache_extra_args="--refresh --refresh"`.
default: no
type: bool
version_added: "2.0"
extra_args:
description:
- Additional option to pass to pacman when enforcing C(state).
default:
version_added: "2.8"
update_cache:
description:
- Whether or not to refresh the master package lists.
- This can be run as part of a package installation or as a separate step.
default: no
type: bool
aliases: [ update-cache ]
update_cache_extra_args:
description:
- Additional option to pass to pacman when enforcing C(update_cache).
default:
version_added: "2.8"
upgrade:
description:
- Whether or not to upgrade the whole system.
Can't be used in combination with C(name).
default: no
type: bool
version_added: "2.0"
upgrade_extra_args:
description:
- Additional option to pass to pacman when enforcing C(upgrade).
default:
version_added: "2.8"
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.
s„
packages:
description: a list of packages that have been changed
returned: when upgrade is set to yes
type: list
sample: [ package, other-package ]
s"
- name: Install package foo from repo
pacman:
name: foo
state: present
- name: Install package bar from file
pacman:
name: ~/bar-1.0-1-any.pkg.tar.xz
state: present
- name: Install package foo from repo and bar from file
pacman:
name:
- foo
- ~/bar-1.0-1-any.pkg.tar.xz
state: present
- name: Upgrade package foo
pacman:
name: foo
state: latest
update_cache: yes
- name: Remove packages foo and bar
pacman:
name:
- foo
- bar
state: absent
- name: Recursively remove package baz
pacman:
name: baz
state: absent
extra_args: --recursive
- name: Run the equivalent of "pacman -Sy" as a separate step
pacman:
update_cache: yes
- name: Run the equivalent of "pacman -Su" as a separate step
pacman:
upgrade: yes
- name: Run the equivalent of "pacman -Syu" as a separate step
pacman:
update_cache: yes
upgrade: yes
- name: Run the equivalent of "pacman -Rdd", force remove package baz
pacman:
name: baz
state: absent
force: yes
N( t
AnsibleModulec C` sJ | j d } x4 | D], } | j d r | j d d j Sq Wd S( s8 Take pacman -Qi or pacman -Si output and get the Versions
s Version t :i N( t splitt
startswitht stript None( t
pacman_outputt linest line( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/pacman.pyt get_versionŖ s
c C` sZ | j d } x4 | D], } | j d r | j d d j Sq W| j d d d S( s= Take pacman -Qi or pacman -Si output and get the package names
s Name R i t msgs: get_name: fail to retrieve package name from pacman outputN( R
R R t fail_json( t moduleR R R ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/pacman.pyt get_name³ s
t presentc C` sń | d k rķ d | | f } | j | d t \ } } } | d k rS t t t f St | | } | | k r{ t t t f St | } d | | f }
| j |
d t \ } } }
t | } | d k rą t | | k t f St t t f Sd S( s
Query the package status in both the local system and the repository. Returns a boolean to indicate if the package is installed, a second
boolean to indicate if the package is up-to-date and a third boolean to indicate whether online information were available
R s %s --query --info %st check_rci s %s --sync --info %sN( t run_commandt FalseR R t True( R t pacman_patht namet statet lcmdt lrct lstdoutt lstderrt installed_namet lversiont rcmdt rrct rstdoutt rstderrt rversion( ( sG /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/pacman.pyt
query_package¼ s
c C` s| | j d r# | j d c d 7