New in version 2.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
ddns | no | Enable dynamic DNS updates for this host. | ||
host | no | localhost | Sets OMAPI server host to interact with. | |
ip | no | None | Sets the lease host IP address. | |
key | yes | Sets the TSIG key content for authenticating against OMAPI server. | ||
key_name | yes | Sets the TSIG key name for authenticating against OMAPI server. | ||
macaddr | yes | Sets the lease host MAC address. | ||
name | no | None | Sets the host lease hostname (mandatory if state=present). | |
port | no | 7911 | Sets the OMAPI server port to interact with. | |
state | yes |
| Create or remove OMAPI host. | |
statements | no | Attach a list of OMAPI DHCP statements with host lease (without ending semicolon). |
- name: Remove a host using OMAPI omapi_host: key_name: "defomapi" key: "+bFQtBCta6j2vWkjPkNFtgA==" host: "10.1.1.1" macaddr: "00:66:ab:dd:11:44" state: absent - name: Add a host using OMAPI omapi_host: key_name: "defomapi" key: "+bFQtBCta6j2vWkjPkNFtgA==" host: "10.98.4.55" macaddr: "44:dd:ab:dd:11:44" name: "server01" ip: "192.168.88.99" ddns: yes statements: - 'filename "pxelinux.0"' - 'next-server 1.1.1.1' state: present
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
changed | If module has modified a host | success | string | ||||||||||||||||||||||||||
lease | dictionary containing host information | success | complex | ||||||||||||||||||||||||||
contains: |
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/omapi_host_module.html