Skip to content

Commit

Permalink
Added playbooks for NSGroup, Network logic filters & PXE config (#261)
Browse files Browse the repository at this point in the history
* Added playbooks for NSGroup, Network logic filters & PXE config

* fix sanity test
  • Loading branch information
nitish-ks authored Sep 17, 2024
1 parent a6ef4e7 commit 844c264
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playbooks/create_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
infoblox.nios_modules.nios_network:
network: 10.0.0.0/24
network_view: ansibleCollectionsView
use_logic_filter_rules: true
logic_filter_rules:
- filter: PXE-UEFI
type: Option
options:
- name: domain-name
value: infoblox-ansible.com
Expand Down
24 changes: 24 additions & 0 deletions playbooks/create_nsgroup_delegation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- name: Infoblox Nameserver Configuration
hosts: localhost
vars:
nios_provider:
host: 10.36.118.2
username: cloudadmin
password: admin

connection: local
tasks:
- name: create infoblox nameserver delegation group
infoblox.nios_modules.nios_nsgroup_delegation:
name: my-delegation-group
delegate_to:
- name: first
address: 192.168.0.10
- name: second
address: 192.168.0.20
comment: "this is a delegation nameserver group"
extattrs:
Site: Test Site
state: present
provider: "{{ nios_provider }}"
34 changes: 34 additions & 0 deletions playbooks/create_nsgroup_forwardingmember.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
- name: Infoblox Nameserver Configuration
hosts: localhost
vars:
nios_provider:
host: 10.36.118.2
username: cloudadmin
password: admin

connection: local
tasks:
- name: create infoblox nameserver forwarding member group with external forwarders
infoblox.nios_modules.nios_nsgroup_forwardingmember:
name: my-forwardingmember-group
comment: "this is a forwarding member nameserver group with external forwarders"
extattrs:
Site: Test Site
forwarding_servers:
- name: infoblox.cloud-ansible-client-nios-gm
use_override_forwarders: true
forwarders_only: true
forward_to:
- name: ns1
address: 192.168.10.1
- name: ns2
address: 192.168.10.2
- name: infoblox.cloud-ansible-client-nios-mem1
use_override_forwarders: true
forwarders_only: false
forward_to:
- name: ns3
address: 192.168.10.3
state: present
provider: "{{ nios_provider }}"
24 changes: 24 additions & 0 deletions playbooks/create_nsgroup_forwardstubserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- name: Infoblox Nameserver Configuration
hosts: localhost
vars:
nios_provider:
host: 10.36.118.2
username: cloudadmin
password: admin

connection: local
tasks:
- name: create infoblox nameserver forward/stub group
infoblox.nios_modules.nios_nsgroup_forwardstubserver:
name: new-forwardstub-group
comment: "this is a forward/stub nameserver group"
extattrs:
Site: Test Site
external_servers:
- name: first
address: 192.168.0.10
- name: second
address: 192.168.0.20
state: present
provider: "{{ nios_provider }}"
22 changes: 22 additions & 0 deletions playbooks/create_nsgroup_stubmember.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
- name: Infoblox Nameserver Configuration
hosts: localhost
vars:
nios_provider:
host: 10.36.118.2
username: cloudadmin
password: admin

connection: local
tasks:
- name: create infoblox nameserver stub member group
infoblox.nios_modules.nios_nsgroup_stubmember:
name: my-stubmember-group
comment: "this is a stub member nameserver group"
extattrs:
Site: Test Site
stub_members:
- name: infoblox.cloud-ansible-client-nios-gm
- name: infoblox.cloud-ansible-client-nios-mem1
state: present
provider: "{{ nios_provider }}"
18 changes: 18 additions & 0 deletions plugins/modules/nios_host_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,24 @@
password: admin
connection: local
- name: Create an ipv4 host record over DHCP with PXE server
infoblox.nios_modules.nios_host_record:
name: host.ansible.com
ipv4:
- address: 192.168.10.1
dhcp: true
mac: 00-80-C8-E3-4C-BD
use_nextserver: true
nextserver: pxe-server.com
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Dynamically add host record to next available ip
infoblox.nios_modules.nios_host_record:
name: host.ansible.com
Expand Down

0 comments on commit 844c264

Please sign in to comment.