automountlocation: Use IPAAnsibleModule class

Use IPAAnsibleModule methods and ipamodule_base_docs ducument fragment.
This commit is contained in:
Rafael Guterres Jeffman
2021-08-31 19:07:42 -03:00
committed by Thomas Woerner
parent 21a48d5968
commit 706e1f5be3

View File

@@ -33,13 +33,9 @@ author: chris procter
short_description: Manage FreeIPA autommount locations short_description: Manage FreeIPA autommount locations
description: description:
- Add and delete an IPA automount location - Add and delete an IPA automount location
extends_documentation_fragment:
- ipamodule_base_docs
options: options:
ipaadmin_principal:
description: The admin principal
default: admin
ipaadmin_password:
description: The admin password
required: false
name: name:
description: The automount location to be managed description: The automount location to be managed
required: true required: true
@@ -79,9 +75,9 @@ class AutomountLocation(FreeIPABaseModule):
def get_location(self, location): def get_location(self, location):
try: try:
response = self.api_command("automountlocation_show", response = self.ipa_command(
location, "automountlocation_show", location, {}
{}) )
except ipalib_errors.NotFound: except ipalib_errors.NotFound:
return None return None
else: else: