damhau.infoblox

Infoblox

使用 Infoblox Rest API 的角色。

要求

访问 Infoblox Rest API。

角色变量

  • 在 defaults/main.yml 中配置了一些合理的默认值,涉及以下变量:

    • infoblox_url(Infoblox 设备的 URL)
    • infoblox_action(Rest API 动作可以是:create, delete, read, update)
    • infoblox_recordtype(Infoblox 记录类型可以是:a, ptr, host, cname)
    • infoblox_view(Infoblox 视图)
  • Infoblox 凭证的变量

    • infoblox_username
    • infoblox_password
  • API 请求中的字段变量,这些字段在以下文档中有说明: https://www.infoblox.com/wp-content/uploads/infoblox-deployment-infoblox-rest-api.pdf 字段名称以 infoblox_ 为前缀:

    • infoblox_ipv4addr
    • infoblox_comment
    • infoblox_canonical
    • infoblox_name

如何运行测试

进入 tests/roles 目录
ln -s ../../../infoblox/ damhau.infoblox
进入 tests 目录
ansible-playbook -i inventory test.yml -t a (您可以选择 a, cname, ptr, host)

示例剧本

- hosts: localhost
  connection: local
  gather_facts: false
  vars:
    infoblox_username: 'user'
    infoblox_password: 'pass'
    infoblox_hostname: 'infobloxfqdn'
    infoblox_view: 'default'
  tasks:
  - include_role:
       name: damhau.infoblox
    vars:
      infoblox_name: 'newhost.dhconsulting.ch'
      infoblox_ipv4addr: '1.1.1.1'
      infoblox_recordtype: 'host'
      infoblox_action: 'create'

  - include_role:
       name: damhau.infoblox
    vars:
      infoblox_name: 'newhost.dhconsulting.ch'
      infoblox_recordtype: 'host'
      infoblox_action: 'delete'

许可证

BSD

关于项目

Role to consume Infoblox Rest API

安装
ansible-galaxy install damhau.infoblox
许可证
Unknown
下载
88
拥有者