corrected and made better docs for getent
This commit is contained in:
parent
8a4f07eecd
commit
b0d5733fd0
1 changed files with 7 additions and 7 deletions
|
@ -26,7 +26,7 @@ module: getent
|
||||||
short_description: a wrapper to the unix getent utility
|
short_description: a wrapper to the unix getent utility
|
||||||
description:
|
description:
|
||||||
- Runs getent against one of it's various databases and returns information into
|
- Runs getent against one of it's various databases and returns information into
|
||||||
the host's facts
|
the host's facts, in a getent_<database> prefixed variable
|
||||||
version_added: "1.8"
|
version_added: "1.8"
|
||||||
options:
|
options:
|
||||||
database:
|
database:
|
||||||
|
@ -60,23 +60,23 @@ author: Brian Coca
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# get root user info
|
# get root user info
|
||||||
- getent: database=passwd key=root
|
- getent: database=passwd key=root
|
||||||
register: root_info
|
- debug: var=getent_passwd
|
||||||
|
|
||||||
# get all groups
|
# get all groups
|
||||||
- getent: database=group split=':'
|
- getent: database=group split=':'
|
||||||
register: groups
|
- debug: var=getent_group
|
||||||
|
|
||||||
# get all hosts, split by tab
|
# get all hosts, split by tab
|
||||||
- getent: database=hosts
|
- getent: database=hosts
|
||||||
register: hosts
|
- debug: var=getent_hosts
|
||||||
|
|
||||||
# get http service info, no error if missing
|
# get http service info, no error if missing
|
||||||
- getent: database=services key=http fail_key=False
|
- getent: database=services key=http fail_key=False
|
||||||
register: http_info
|
- debug: var=getent_services
|
||||||
|
|
||||||
# get user password hash (requires sudo/root)
|
# get user password hash (requires sudo/root)
|
||||||
- getent: database=shadow key=www-data split=:
|
- getent: database=shadow key=www-data split=:
|
||||||
register: pw_hash
|
- debug: var=getent_shadow
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue