Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/network-automation/dynamic-infoblox
A collection of Ansible Roles to automate Infoblox Core Network Services
https://github.com/network-automation/dynamic-infoblox
ansible dns grid infoblox wapi
Last synced: 27 days ago
JSON representation
A collection of Ansible Roles to automate Infoblox Core Network Services
- Host: GitHub
- URL: https://github.com/network-automation/dynamic-infoblox
- Owner: network-automation
- Created: 2018-08-07T13:03:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T02:47:42.000Z (over 6 years ago)
- Last Synced: 2023-03-06T14:48:48.089Z (almost 2 years ago)
- Topics: ansible, dns, grid, infoblox, wapi
- Language: Shell
- Homepage:
- Size: 37.1 KB
- Stars: 7
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Dynamically create host records in Infoblox using Ansible!
A collection of roles featuring some of Infoblox's new integration in Core v2.5 to:
1. Create zones and add host records at the next available ip addresses using a Name Server Group
2. Start the DNS service on the Grid Master
3. Predefine a Grid Master Candidate
4. Predefine a Grid Member
5. Join a Grid Master Candidate or Grid Member to a Grid
6. Update a Name Server Group to account for new Infoblox Grid appliances
7. Take a configuration snapshotRequirements
------------The infoblox-client installed on the targeted localhost machine. Ansible Core >= v2.5 for the infoblox modules and lookup plugin.
Role Variables
--------------
Example nios_provider supplied below. This should be vaulted in group_vars/localhost/main.yml for production use.```yaml
nios_provider:
#Out-of-the-box defaults specified here
host: 192.168.1.2
username: admin
password: infobloxwapi_version: 'v2.7'
```Example Playbooks
-----------------
Most automation functionality in this repository is better demonstrated by calling of roles (see below), but each role has a corresponding playbook that can be called for the same effect.Here are some of the common overrides at the playbook level of this repository's core role, dynamicInfoblox:
```
ansible-playbook create_dynamic_records.yml
ansible-playbook create_dynamic_records.yml -e "host_count=10"
ansible-playbook create_dynamic_records.yml -e "ansible_zone=redhat.com"
ansible-playbook create_dynamic_records.yml -e "ansible_subnet=10.10.10.0/24"
```Another example playbook creates a snapshot of the gridmaster configuration at any time:
```
ansible-playbook take_snapshot.yml
```
_Note: Restoring the snapshot is currently a manual step but I hope to have automation here soon too._This calls a master playbook to demo the invocation of several roles in succession:
```
ansible-playbook master-demo-playbook.yml
```Role Calls
-----------------
Overrides at the role level allow single playbooks to call the same roles in succession with new network information.The default invocation creates a forward/reverse zone, subnet, and gateway address using out-of-the-box configurations, but does not generate additional hosts:
```yaml
- hosts: localhost
connection: local
roles:
- { role: dynamicInfoblox }
```
Specify a host_count to create (several) new host records at a time:
```yaml
- { role: dynamicInfoblox, host_count: 10 }
```
Override the default zone:
```yaml
- { role: dynamicInfoblox, ansible_zone: redhat.com }
```
Override the default subnet. The default gateway_address is automated to reflect changes overriden here:
```yaml
- { role: dynamicInfoblox, ansible_subnet: 10.10.10.0/24 }
```
Start the dns service on an Infoblox appliance:
```yaml
- { role: updateService, grid_fqdn: gm.ansible.local, state: started }
```
Predefine a new Grid Master Candidate:
```yaml
- { role: predefineGridmasterCandidate, master_candidate_name: gmc.ansible.local, master_candidate_address: 192.168.2.2, master_candidate_gateway: 192.168.2.254, master_candidate_subnet_mask:255.255.255.0 }
```
Predefine a new Grid Member:
```yaml
- { role: predefineGridmember, member_name: gmc.ansible.local, member_address: 192.168.2.2, member_gateway: 192.168.2.254, member_subnet_mask:255.255.255.0 }
```
Join a Grid Master Candidate or Grid Member to the Grid:
```yaml
- { role: joinGrid, join_grid_host: 192.168.2.3 }
```
Take a snapshot of Infoblox configuration:
```yaml
- { role: snapshotConfiguration }
```Author Information
------------------
```
Branden Pleines
Bret Pleines
```