mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
To resolve NIOS race condition when ip allocated via NIOS next available ip function (#49818)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * resolves bug 45218 Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * fixing review comments
This commit is contained in:
@@ -39,7 +39,9 @@ options:
|
||||
- dns_view
|
||||
ipv4addr:
|
||||
description:
|
||||
- Configures the IPv4 address for this A record.
|
||||
- Configures the IPv4 address for this A record. Users can dynamically
|
||||
allocate ipv4 address to A record by passing dictionary containing,
|
||||
I(nios_next_ip) and I(CIDR network range). See example
|
||||
required: true
|
||||
aliases:
|
||||
- ipv4
|
||||
@@ -113,6 +115,17 @@ EXAMPLES = '''
|
||||
username: admin
|
||||
password: admin
|
||||
connection: local
|
||||
|
||||
- name: dynamically add a record to next available ip
|
||||
nios_a_record:
|
||||
name: a.ansible.com
|
||||
ipv4: {nios_next_ip: 192.168.10.0/24}
|
||||
state: present
|
||||
provider:
|
||||
host: "{{ inventory_hostname_short }}"
|
||||
username: admin
|
||||
password: admin
|
||||
connection: local
|
||||
'''
|
||||
|
||||
RETURN = ''' # '''
|
||||
|
||||
@@ -58,7 +58,9 @@ options:
|
||||
suboptions:
|
||||
ipv4addr:
|
||||
description:
|
||||
- Configures the IPv4 address for the host record
|
||||
- Configures the IPv4 address for the host record. Users can dynamically
|
||||
allocate ipv4 address to host record by passing dictionary containing,
|
||||
I(nios_next_ip) and I(CIDR network range). See example
|
||||
required: true
|
||||
aliases:
|
||||
- address
|
||||
@@ -198,6 +200,18 @@ EXAMPLES = '''
|
||||
username: admin
|
||||
password: admin
|
||||
connection: local
|
||||
- name: dynamically add host record to next available ip
|
||||
nios_host_record:
|
||||
name: host.ansible.com
|
||||
ipv4:
|
||||
- address: {nios_next_ip: 192.168.10.0/24}
|
||||
comment: this is a test comment
|
||||
state: present
|
||||
provider:
|
||||
host: "{{ inventory_hostname_short }}"
|
||||
username: admin
|
||||
password: admin
|
||||
connection: local
|
||||
'''
|
||||
|
||||
RETURN = ''' # '''
|
||||
|
||||
Reference in New Issue
Block a user