Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional DNS Records Support for Bloxone Ansible v2 #65

Merged
merged 47 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9fcc451
Modules for DNS data
Tejashree-RS Nov 13, 2024
413ab0d
DNS A Record Support for Bloxone Ansible
Tejashree-RS Dec 2, 2024
462f0d4
deleted main.yml.bckp file
Tejashree-RS Dec 2, 2024
6a57e23
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Dec 17, 2024
63a4aa6
Removed dns_record and dns_record_info, added dns_a_record and dns_a_…
Tejashree-RS Dec 18, 2024
f4e7180
added A record changelog and setup_auth_zone_rmz; updated dns_record…
Tejashree-RS Dec 18, 2024
6837162
Deleted unused file
Tejashree-RS Dec 18, 2024
367a0dc
Restore setup_view file
Tejashree-RS Dec 18, 2024
d27ab24
Restored setup_view
Tejashree-RS Dec 18, 2024
21f18ce
Modified tasks in dns_a_record and dns_a_record_info
Tejashree-RS Dec 18, 2024
5789ea1
Removed extra lines
Tejashree-RS Dec 23, 2024
5da4699
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Dec 23, 2024
4377b79
addressed review comments
Tejashree-RS Jan 6, 2025
b3d8bae
addressed review comments
Tejashree-RS Jan 6, 2025
f248c12
Merge branch 'dns_records' of github.com:Tejashree-RS/bloxone-ansible…
Tejashree-RS Jan 6, 2025
0dfb09a
fixed indentation
Tejashree-RS Jan 6, 2025
2cd46d0
Modified find and update functions
Tejashree-RS Jan 9, 2025
939e08d
Removed HTML tags
Tejashree-RS Jan 9, 2025
1476303
added cleanup.yml for setup_auth_zone_rmz
Tejashree-RS Jan 10, 2025
d557e8e
Resolved merge conflicts
Tejashree-RS Jan 10, 2025
9abeae8
Removed setup_view directory from PR
Tejashree-RS Jan 10, 2025
e1c8dda
Addressed PR comments
Tejashree-RS Jan 10, 2025
a00709a
addressed PR comments
Tejashree-RS Jan 13, 2025
02bd9b3
Addressed PR comments
Tejashree-RS Jan 16, 2025
fcc9b4b
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 16, 2025
6bde072
Fixed Documentation
Tejashree-RS Jan 20, 2025
05643e6
addressed PR comments
Tejashree-RS Jan 22, 2025
29ade6d
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 22, 2025
2bee3b3
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 23, 2025
d89ddbc
Addressed PR Comments
Tejashree-RS Jan 23, 2025
cef12e7
Initial commit for DNS resource records
Tejashree-RS Jan 25, 2025
bb9d016
Examples included in modules
Tejashree-RS Jan 26, 2025
27f3376
included setup file for IPv6 rmz
Tejashree-RS Jan 27, 2025
850449a
fixed lint issues
Tejashree-RS Jan 27, 2025
d80b2c5
resolved conflicts
Tejashree-RS Jan 29, 2025
68685a8
added deprecation notice
Tejashree-RS Jan 29, 2025
4fab4c9
Merge branch 'v2' into dns_resource_records
Tejashree-RS Jan 30, 2025
b0e41fc
addresses review comments
Tejashree-RS Jan 31, 2025
262e6cc
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 31, 2025
5b0a420
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 31, 2025
e2f86f0
Merge branch 'dns_resource_records' of github.com:Tejashree-RS/bloxon…
Tejashree-RS Jan 31, 2025
1eed831
minor changes
Tejashree-RS Jan 31, 2025
cf33628
switch from Bloxone-Python-Client to Universal-Python-Client
Tejashree-RS Jan 31, 2025
6b4ccdd
Merge branch 'v2' of github.com:infobloxopen/bloxone-ansible into dns…
Tejashree-RS Jan 31, 2025
e50480d
addressed review comments
Tejashree-RS Feb 3, 2025
ae8d09c
addressed review comments
Tejashree-RS Feb 3, 2025
6a5fb06
Merge branch 'v2' into dns_resource_records
mathewab Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,39 @@ plugin_routing:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.ipam_address_info instead.

b1_a_record:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record instead.
b1_a_record_gather:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record_info instead.

b1_cname_record:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record instead.
b1_cname_record_gather:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record_info instead.

b1_ns_record:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record instead.
b1_ns_record_gather:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record_info instead.

b1_ptr_record:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record instead.
b1_ptr_record_gather:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.dns_record_info instead.
4 changes: 4 additions & 0 deletions plugins/modules/b1_a_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "Amit Mishra [email protected]"
short_description: Configure DNS Authoritative Zone on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record) instead.
alternative: Use M(dns_record) instead.
description:
- Get, Create, Update and Delete DNS Authoritative Zone on Infoblox BloxOne DDI. This module manages the DNS Authoritative Zone object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_a_record_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "amishra2@infoblox"
short_description: Configure IP space on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record_info) instead.
alternative: Use M(dns_record_info) instead.
description:
- Get, Create, Update and Delete IP spaces on Infoblox BloxOne DDI. This module manages the IPAM IP space object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_cname_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "Amit Mishra [email protected]"
short_description: Configure DNS Authoritative Zone on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record) instead.
alternative: Use M(dns_record) instead.
description:
- Get, Create, Update and Delete DNS Authoritative Zone on Infoblox BloxOne DDI. This module manages the DNS Authoritative Zone object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_cname_record_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "amishra2@infoblox"
short_description: Configure IP space on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record_info) instead.
alternative: Use M(dns_record_info) instead.
description:
- Get, Create, Update and Delete IP spaces on Infoblox BloxOne DDI. This module manages the IPAM IP space object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_ns_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "Amit Mishra , [email protected]"
short_description: Configure DNS Authoritative Zone on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record) instead.
alternative: Use M(dns_record) instead.
description:
- Get, Create, Update and Delete DNS Authoritative Zone on Infoblox BloxOne DDI. This module manages the DNS Authoritative Zone object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_ns_record_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "amishra2@infoblox"
short_description: Configure IP space on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record_info) instead.
alternative: Use M(dns_record_info) instead.
description:
- Get, Create, Update and Delete IP spaces on Infoblox BloxOne DDI. This module manages the IPAM IP space object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_ptr_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "Vedant Sethia (@vedantsethia)"
short_description: Configure DNS Authoritative Zone on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record) instead.
alternative: Use M(dns_record) instead.
description:
- Get, Create, Update and Delete DNS Authoritative Zone on Infoblox BloxOne DDI. This module manages the DNS Authoritative Zone object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_ptr_record_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "amishra2@infoblox"
short_description: Configure IP space on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(dns_record_info) instead.
alternative: Use M(dns_record_info) instead.
description:
- Get, Create, Update and Delete IP spaces on Infoblox BloxOne DDI. This module manages the IPAM IP space object using BloxOne REST APIs.
requirements:
Expand Down
132 changes: 121 additions & 11 deletions plugins/modules/dns_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,45 +325,155 @@
state: present
register: _view

- name: Create an Auth Zone (required as parent)
- name: Create an Auth Zone in the View (required as parent)
infoblox.bloxone.dns_auth_zone:
fqdn: "example_zone"
primary_type: "cloud"
view: "{{ _view.id }}"
state: "present"
register: _auth_zone

- name: Create an A Record in an Auth Zone
- name: Create an A Record in the Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
comment: "Example A Record"
rdata:
address: "192.168.10.10"
type: "A"
state: "present"

- name: Create an A Record with Name in Zone and Zone
state: "present"
- name: Create an A Record with Additional Fields
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
name_in_zone: "example_a_record"
comment: "Example A Record"
ttl: 3600
disabled: true
rdata:
address: "192.168.10.10"
type: "A"
comment: "This is an example A Record"
ttl: 3600
disabled: true
inheritance_sources:
ttl:
action: "inherit"
tags:
location: "site-1"
state: "present"

- name: Create an AAAA Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
address: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
type: "AAAA"
state: "present"

- name: Create a CAA Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
tag: "issue"
value: "ca.example.com"
type: "CAA"
state: "present"

- name: Create a CNAME Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
name_in_zone: "example_cname_record"
rdata:
cname: "example.com"
type: "CNAME"
state: "present"

- name: Create a DNAME Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
target: "google.com."
type: "DNAME"
state: "present"

- name: Create a Generic Record in an Auth Zone (e.g, TYPE256)
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
subfields:
- type: "PRESENTATION"
value: "10 1 \"https://example.com\""
type: "TYPE256"
state: "present"

- name: Create a MX Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
preference: 10
exchange: "mail.example.com."
type: "MX"
state: "present"

- name: Create a NAPTR Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
order: 100
preference: 10
replacement: "."
services: "SIP+D2U"
type: "NAPTR"
state: "present"

- name: Create a NS Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
name_in_zone: "example_ns_record"
rdata:
dname: "ns.example.com."
type: "NS"
state: "present"

- name: Create a PTR Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ rmz.id }}"
name_in_zone: "1.0.0" # Note: 10.in-addr.arpa is the reverse mapping zone
rdata:
dname: "ptr.example.com."
type: "PTR"
state: "present"

- name: Create a SRV Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
priority: 10
port: 5060
target: "srv.example.com."
type: "SRV"
state: "present"

- name: Create a SVCB Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
target_name: "svc.example.com."
type: "SVCB"
state: "present"

- name: Create a TXT Record in an Auth Zone
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
rdata:
text: "sample text"
type: "TXT"
state: "present"

- name: Delete the A Record
infoblox.bloxone.dns_record:
zone: "{{ _auth_zone.id }}"
name_in_zone: "example_a_record"
rdata:
address: "192.168.10.10"
address: "192.168.10.10"
type: "A"
state: "absent"
state: "absent"
""" # noqa: E501

RETURN = r"""
Expand Down
29 changes: 10 additions & 19 deletions plugins/modules/dns_record_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,25 @@
""" # noqa: E501

EXAMPLES = r"""
- name: Get A Record information by ID
infoblox.bloxone.a_record_info:
- name: Get Record information by ID
infoblox.bloxone.dns_record_info:
id: "{{ a_record_id }}"

- name: Get A Record information by filters (e.g., name_in_zone)
infoblox.bloxone.a_record_info:
- name: Get Record information by filters
infoblox.bloxone.dns_record_info:
filters:
name_in_zone: "example_a_record"
type: "A"

- name: Get A Record information by raw filter query
infoblox.bloxone.a_record_info:
filter_query: "name_in_zone=='example_a_record' and type=='A'"

- name: Get A Record information by filters (zone)
infoblox.bloxone.a_record_info:
filters:
zone: "example_zone_id"
type: "A"

- name: Get A Record information by raw filter query
infoblox.bloxone.a_record_info:
filter_query: "zone=='example_zone_id' and type=='A'"
- name: Get Record information by raw filter query
infoblox.bloxone.dns_record_info:
filter_query: "name_in_zone=='example_a_record' and zone=='example_zone_id' and type=='A'"

- name: Get A Record information by tag filters
infoblox.bloxone.a_record_info:
- name: Get Record information by tag filters
infoblox.bloxone.dns_record_info:
tag_filters:
location: "site-1"
location: "site-1"
""" # noqa: E501

RETURN = r"""
Expand Down
Loading