xlab_si.nuage_create_entity

Ansible角色:nuage_create_entity

该角色允许您在Nuage服务器上创建任何实体,并可选择将其分配给父实体。

要求

pip install vspk

角色变量

变量 默认值 描述
nuage_auth / Nuage认证对象,见下面的示例。
entity_type / 我们要创建的实体的CamelCase名称,例如 Enterprise、Domain、Subnet、FloatingIp 等。
attributes / 新实体的期望属性。
parent_type null 父实体的CamelCase类型(可选)
parent_id null 父实体的ID(可选)

输出

此角色在运行时设置以下自定义统计信息:

统计名称 描述
created_entity 创建的实体哈希

依赖关系

该角色不依赖于其他Galaxy角色。

示例剧本

示例:我们创建名称为 DEMO 的Enterprise:

- hosts: localhost
  connection: local
  gather_facts: False
  vars:
    nuage_auth:
      api_username: user
      api_password: pass
      api_enterprise: csp
      api_url: https://my.nuage.net
      api_version: v5_0
    entity_type: Enterprise
    attributes:
      name: DEMO
  roles:
    - xlab_si.nuage_create_entity

示例:我们创建名称为 DEMO 的子网,并将其连接到ID为 ebd14a5e-a2cd-4302-bb04-89e2f4a827fe 的父域:

- hosts: localhost
  connection: local
  gather_facts: False
  vars:
    nuage_auth:
      api_username: user
      api_password: pass
      api_enterprise: csp
      api_url: https://my.nuage.net
      api_version: v5_0
    entity_type: Subnet
    attributes:
      name: DEMO
    parent_type: Domain
    parent_id: ebd14a5e-a2cd-4302-bb04-89e2f4a827fe
  roles:
    - xlab_si.nuage_create_entity

许可证

BSD

关于项目

Ansible role to create any Nuage entity and optionally connect it to parent entity.

安装
ansible-galaxy install xlab_si.nuage_create_entity
许可证
Unknown
下载
38.6k
拥有者
Research and development company based in Ljubljana, Slovenia.