Misc fixes (#44649)
Correcting docs and adding a Parameters handler for description
This commit is contained in:
parent
639cfe3b6f
commit
e4af3e7b4d
2 changed files with 17 additions and 10 deletions
|
@ -101,8 +101,8 @@ EXAMPLES = r'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
allow:
|
allow:
|
||||||
description: >
|
description:
|
||||||
Specifies, if you have enabled SSH access, the IP address or address
|
- Specifies, if you have enabled SSH access, the IP address or address
|
||||||
range for other systems that can use SSH to communicate with this
|
range for other systems that can use SSH to communicate with this
|
||||||
system.
|
system.
|
||||||
returned: changed
|
returned: changed
|
||||||
|
@ -114,15 +114,15 @@ banner:
|
||||||
type: string
|
type: string
|
||||||
sample: true
|
sample: true
|
||||||
banner_text:
|
banner_text:
|
||||||
description: >
|
description:
|
||||||
Specifies the text included on the pre-login banner that
|
- Specifies the text included on the pre-login banner that
|
||||||
displays when a user attempts to login to the system using SSH.
|
displays when a user attempts to login to the system using SSH.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: string
|
type: string
|
||||||
sample: This is a corporate device. Connecting to it without...
|
sample: This is a corporate device. Connecting to it without...
|
||||||
inactivity_timeout:
|
inactivity_timeout:
|
||||||
description: >
|
description:
|
||||||
The number of seconds before inactivity causes an SSH
|
- The number of seconds before inactivity causes an SSH
|
||||||
session to log out.
|
session to log out.
|
||||||
returned: changed
|
returned: changed
|
||||||
type: int
|
type: int
|
||||||
|
|
|
@ -416,6 +416,13 @@ class Difference(object):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return attr1
|
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
|
@property
|
||||||
def enabled(self):
|
def enabled(self):
|
||||||
if self.want.state == 'enabled' and self.have.disabled:
|
if self.want.state == 'enabled' and self.have.disabled:
|
||||||
|
|
Loading…
Reference in a new issue