Advertisement

定制化 ansible 模块(Python 版本)

阅读量:

基于实际业务需求,有必要自行开发部分定制化的ansible模块,然而目前网络上相关参考资料较为匮乏。以下展示了一个用于操作rancher的模块示例。

复制代码
    ANSIBLE_METADATA={
    'metadata_version': '1.1',
    'status': ['preview'],
    'supported_by': 'community'
    }
    
    DOCUMENTATION = '''
    ---
    module: rancher
    
    short_description: .
    
    version_added: "2.4"
    
    description:
    - ""
    
    options:
    type:
        description:
            - project workspace 
        required: true
    json:
        description:
            - The variable WORKSPACE passed by Jenkins
        required: true
    
    author:
    - Shuaibo (@shuaib

全部评论 (0)

还没有任何评论哟~