Misc fixes (#44649)

Correcting docs and adding a Parameters handler for description
pull/44652/head
Tim Rupp 6 years ago committed by GitHub
parent 639cfe3b6f
commit e4af3e7b4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,10 +101,10 @@ EXAMPLES = r'''
RETURN = r'''
allow:
description: >
Specifies, if you have enabled SSH access, the IP address or address
range for other systems that can use SSH to communicate with this
system.
description:
- Specifies, if you have enabled SSH access, the IP address or address
range for other systems that can use SSH to communicate with this
system.
returned: changed
type: string
sample: 192.0.2.*
@ -114,16 +114,16 @@ banner:
type: string
sample: true
banner_text:
description: >
Specifies the text included on the pre-login banner that
displays when a user attempts to login to the system using SSH.
description:
- Specifies the text included on the pre-login banner that
displays when a user attempts to login to the system using SSH.
returned: changed and success
type: string
sample: This is a corporate device. Connecting to it without...
inactivity_timeout:
description: >
The number of seconds before inactivity causes an SSH
session to log out.
description:
- The number of seconds before inactivity causes an SSH
session to log out.
returned: changed
type: int
sample: 10

@ -416,6 +416,13 @@ class Difference(object):
except AttributeError:
return attr1
@property
def description(self):
if self.want.description == '' and self.have.description is None:
return None
if self.want.description != self.have.description:
return self.want.description
@property
def enabled(self):
if self.want.state == 'enabled' and self.have.disabled:

Loading…
Cancel
Save