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
テストの実行方法
テスト/rolesに移動
ln -s ../../../infoblox/ damhau.infoblox
テストに移動
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