zoukankan      html  css  js  c++  java
  • Saltstack module freezer 详解

    freezer.restore

    Make sure that the system contains the packages and repos from a
    frozen state.
    
    Read the list of packages and repositories from the freeze file,
    and compare it with the current list of packages and repos. If
    there is any difference, all the missing packages are repos will
    be installed, and all the extra packages and repos will be
    removed.
    
    As this module is build on top of the pkg module, the user can
    send extra attributes to the underlying pkg module via kwargs.
    This function will call ``pkg.list_repos``, ``pkg.mod_repo``,
    ``pkg.list_pkgs``, ``pkg.install``, ``pkg.remove`` and
    ``pkg.del_repo``, and any additional arguments will be passed
    through to those functions.
    
    name
        Name of the frozen state. Optional.
    
    clean
        If True remove the frozen information YAML from the cache
    
        New in version 3000
    
    CLI Example:
    
        salt '*' freezer.restore
        salt '*' freezer.restore root=/chroot
    

    freezer.freeze

    Save the list of package and repos in a freeze file.
    
    As this module is build on top of the pkg module, the user can
    send extra attributes to the underlying pkg module via kwargs.
    This function will call ``pkg.list_pkgs`` and ``pkg.list_repos``,
    and any additional arguments will be passed through to those
    functions.
    
    name
        Name of the frozen state. Optional.
    
    force
        If true, overwrite the state. Optional.
    
    CLI Example:
    
        salt '*' freezer.freeze
        salt '*' freezer.freeze pre_install
        salt '*' freezer.freeze force=True root=/chroot
    

    freezer.fopen

    Wrapper around open() built-in to set CLOEXEC on the fd.
    
    This flag specifies that the file descriptor should be closed when an exec
    function is invoked;
    
    When a file descriptor is allocated (as with open or dup), this bit is
    initially cleared on the new file descriptor, meaning that descriptor will
    survive into the new program after exec.
    
    NB! We still have small race condition between open and fcntl.
    

    freezer.list

    Return the list of frozen states.
    
    CLI Example:
    
        salt '*' freezer.list
    

    freezer.status

    Return True if there is already a frozen state.
    
    A frozen state is merely a list of packages (including the
    version) in a specific time. This information can be used to
    compare with the current list of packages, and revert the
    installation of some extra packages that are in the system.
    
    name
        Name of the frozen state. Optional.
    
    CLI Example:
    
        salt '*' freezer.status
        salt '*' freezer.status pre_install
    

    freezer.clean_kwargs

    Return a dict without any of the __pub* keys (or any other keys starting
    with a dunder) from the kwargs dict passed into the execution module
    functions. These keys are useful for tracking what was used to invoke
    the function call, but they may not be desirable to have if passing the
    kwargs forward wholesale.
    
    Usage example:
    
        kwargs = __utils__['args.clean_kwargs'](**kwargs)
  • 相关阅读:
    除adsense外适合英文站的国外广告联盟(4/12/2011更新)
    盛大云和阿里云之云主机初体验
    【行文格式】
    在线PDF阅读&编辑网站一览
    做销售不得不看的20部电影
    VS中的Code Snippet来提高开发效率
    10个免费的javascript富文本编辑器(jQuery and nonjQuery)
    【操作命令】
    SQLServer常见查询问题
    代码検索
  • 原文地址:https://www.cnblogs.com/randomlee/p/Saltstack_module_freezer.html
Copyright © 2011-2022 走看看