%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/thread-self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/pkgrepo.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l m Z m Z d d l m
Z d d l Z
d d l Z
d d l Z
d d l Z
d d l Z
d d l m Z d � Z e d � Z d � Z d S(
u�
Management of APT/DNF/YUM/Zypper package repos
==============================================
States for managing software package repositories on Linux distros. Supported
package managers are APT, DNF, YUM and Zypper. Here is some example SLS:
.. code-block:: yaml
base:
pkgrepo.managed:
- humanname: CentOS-$releasever - Base
- mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
- comments:
- 'http://mirror.centos.org/centos/$releasever/os/$basearch/'
- gpgcheck: 1
- gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
.. code-block:: yaml
base:
pkgrepo.managed:
- humanname: Logstash PPA
- name: deb http://ppa.launchpad.net/wolfnet/logstash/ubuntu precise main
- dist: precise
- file: /etc/apt/sources.list.d/logstash.list
- keyid: 28B04E4A
- keyserver: keyserver.ubuntu.com
- require_in:
- pkg: logstash
pkg.latest:
- name: logstash
- refresh: True
.. code-block:: yaml
base:
pkgrepo.managed:
- humanname: deb-multimedia
- name: deb http://www.deb-multimedia.org stable main
- file: /etc/apt/sources.list.d/deb-multimedia.list
- key_url: salt://deb-multimedia/files/marillat.pub
.. code-block:: yaml
base:
pkgrepo.managed:
- humanname: Google Chrome
- name: deb http://dl.google.com/linux/chrome/deb/ stable main
- dist: stable
- file: /etc/apt/sources.list.d/chrome-browser.list
- require_in:
- pkg: google-chrome-stable
- gpgcheck: 1
- key_url: https://dl-ssl.google.com/linux/linux_signing_key.pub
.. code-block:: yaml
base:
pkgrepo.managed:
- ppa: wolfnet/logstash
pkg.latest:
- name: logstash
- refresh: True
.. _bug: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1249080
.. note::
On Ubuntu systems, the ``python-software-properties`` package should be
installed for better support of PPA repositories. To check if this package
is installed, run ``dpkg -l python-software-properties``.
Also, some Ubuntu releases have a bug_ in their
``python-software-properties`` package, a missing dependency on pycurl, so
``python-pycurl`` will need to be manually installed if it is not present
once ``python-software-properties`` is installed.
On Ubuntu & Debian systems, the ``python-apt`` package is required to be
installed. To check if this package is installed, run ``dpkg -l python-apt``.
``python-apt`` will need to be manually installed if it is not present.
i ( t absolute_importt print_functiont unicode_literalsN( t CommandExecutionErrort SaltInvocationError( t STATE_INTERNAL_KEYWORDS( t sixc C@ s
d t k S( uI
Only load if modifying repos is available for this package type
u pkg.mod_repo( t __salt__( ( ( s7 /usr/lib/python2.7/site-packages/salt/states/pkgrepo.pyt __virtual__i s c K@ s| d | k r8 t j j j d d � | j d � | d <n i | d 6i d 6d8 d 6d d 6} d
t k r~ t | d <d | d <| Sd | k r� d
| k s� d | k r� t | d <d | d <n d | k r� d
| k s� d | k r� t | d <d | d <n d | k r#d | k r#t | d <d | d <n d | k rGt | d <d | d <| S| j d d8 � } | j d d8 � } | d8 k r�| d8 k r�t | d <d | d <| S| d8 k r�| d8 k r�t } n | } t d d@ k rj| d8 k r,y d j
d | f � } Wq,t k
r(d j
d t j
| � f � } q,Xn | d8 k rNt j j j | � n t j j j | � | d <n� t d dA k r�d | k r�| j d � | d <n d | k r�| | d <n | d8 k r�t j j j | � n t j j j | � | d <nN t d dB k rA| d8 k r%t j j j | � n t j j j | � | d <n x t D] } | j | d8 � qHWy&