Exemple #1
0
def package(pkg_name, repos=None, yes=None, options=None):
    """
    Require a rpm package to be installed.

    Example::

        from fabtools import require

        require.rpm.package('emacs')
    """
    if not is_installed(pkg_name):
        install(pkg_name, repos, yes, options)
Exemple #2
0
def package(pkg_name, repos=None, yes=None, options=None):
    """
    Require an RPM package to be installed.

    Example::

        from fabtools import require

        require.rpm.package('emacs')
    """
    if not is_installed(pkg_name):
        install(pkg_name, repos, yes, options)
Exemple #3
0
def packages(pkg_list, repos=None, yes=None, options=None):
    """
    Require several rpm packages to be installed.

    Example::

        from fabtools import require

        require.rpm.packages([
            'nano',
            'unzip',
            'vim',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, repos, yes, options)
Exemple #4
0
def packages(pkg_list, repos=None, yes=None, options=None):
    """
    Require several RPM packages to be installed.

    Example::

        from fabtools import require

        require.rpm.packages([
            'nano',
            'unzip',
            'vim',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, repos, yes, options)