salt.modules.infoblox

Module for managing Infoblox

Will look for pillar data infoblox:server, infoblox:user, infoblox:password if not passed to functions

2016.3.0 新版功能.

depends:
  • requests
salt.modules.infoblox.add_record(name, value, record_type, dns_view, infoblox_server=None, infoblox_user=None, infoblox_password=None, infoblox_api_version='v1.4.2', sslVerify=True)

add a record to an infoblox dns view

name
the record name
value
the value for the entry
can make use of infoblox functions for next available IP, like 'func:nextavailableip:10.1.0.0/24'
record_type
the record type (cname, a, host, etc)
dns_view
the DNS view to add the record to
infoblox_server
the infoblox server hostname (can also use the infoblox:server pillar)
infoblox_user
the infoblox user to connect with (can also use the infoblox:user pillar)
infoblox_password
the infoblox user's password (can also use the infolblox:password pillar)
infoblox_api_version
the infoblox api verison to use
sslVerify
should ssl verification be done on the connection to the Infoblox REST API

CLI Example:

salt 'myminion' infoblox.add_record alias.network.name canonical.network.name MyView
salt.modules.infoblox.delete_record(name, dns_view, record_type, infoblox_server=None, infoblox_user=None, infoblox_password=None, infoblox_api_version='v1.4.2', sslVerify=True)

delete a record

name
name of the record
dns_view
the DNS view to remove the record from
record_type
the record type (a, cname, host, etc)
infoblox_server
the infoblox server hostname (can also use the infoblox:server pillar)
infoblox_user
the infoblox user to connect with (can also use the infoblox:user pillar)
infoblox_password
the infoblox user's password (can also use the infolblox:password pillar)
infoblox_api_version
the infoblox api verison to use
sslVerify
should ssl verification be done on the connection to the Infoblox REST API

CLI Example:

salt my-minion infoblox.delete_record some.dns.record MyInfobloxView A sslVerify=False
salt.modules.infoblox.get_network(network_name, network_view=None, infoblox_server=None, infoblox_user=None, infoblox_password=None, infoblox_api_version='v1.4.2', sslVerify=True)

get a network from infoblox

network_name
The name of the network in IPAM
network_view
The name of the network view the network belongs to
infoblox_server
the infoblox server hostname (can also use the infoblox:server pillar)
infoblox_user
the infoblox user to connect with (can also use the infoblox:user pillar)
infoblox_password
the infoblox user's password (can also use the infolblox:password pillar)
infoblox_api_version
the infoblox api verison to use
sslVerify
should ssl verification be done on the connection to the Infoblox REST API

CLI Example:

salt myminion infoblox.get_network '10.0.0.0/8'
salt.modules.infoblox.get_record(record_name, record_type='host', infoblox_server=None, infoblox_user=None, infoblox_password=None, dns_view=None, infoblox_api_version='v1.4.2', sslVerify=True)

get a record from infoblox

record_name
name of the record to search for
record_type
type of reacord to search for (host, cname, a, etc...defaults to host)
infoblox_server
the infoblox server hostname (can also use the infoblox:server pillar)
infoblox_user
the infoblox user to connect with (can also use the infoblox:user pillar)
infoblox_password
the infoblox user's password (can also use the infolblox:password pillar)
dns_view
the infoblox DNS view to search, if not specified all views are searched
infoblox_api_version
the infoblox api verison to use
sslVerify
should ssl verification be done on the connection to the Infoblox REST API

CLI Example:

salt myminion infoblox.get_record some.host.com A sslVerify=False
salt.modules.infoblox.update_record(name, value, dns_view, record_type, infoblox_server=None, infoblox_user=None, infoblox_password=None, infoblox_api_version='v1.4.2', sslVerify=True)

update an entry to an infoblox dns view

name
the dns name
value
the value for the record
record_type
the record type (a, cname, etc)
dns_view
the DNS view to add the record to
infoblox_server
the infoblox server hostname (can also use the infoblox:server pillar)
infoblox_user
the infoblox user to connect with (can also use the infoblox:user pillar)
infoblox_password
the infoblox user's password (can also use the infolblox:password pillar)
infoblox_api_version
the infoblox api verison to use
sslVerify
should ssl verification be done on the connection to the Infoblox REST API

CLI Example:

salt '*' infoblox.update_record alias.network.name canonical.network.name MyInfobloxView cname sslVerify=False