??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @` s› d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z d d l
m Z d d l m
Z
d
„ Z e d k r— e ƒ n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont stableinterfacet statust coret supported_bys/
---
module: getent
short_description: A wrapper to the unix getent utility
description:
- Runs getent against one of it's various databases and returns information into
the host's facts, in a getent_ prefixed variable.
version_added: "1.8"
options:
database:
description:
- The name of a getent database supported by the target system (passwd, group,
hosts, etc).
required: True
key:
description:
- Key from which to return values from the specified database, otherwise the
full contents are returned.
default: ''
service:
description:
- Override all databases with the specified service
- The underlying system must support the service flag which is not always available.
version_added: "2.9"
split:
description:
- "Character used to split the database values into lists/arrays such as ':' or ' ', otherwise it will try to pick one depending on the database."
fail_key:
description:
- If a supplied key is missing this will make the task fail if C(yes).
type: bool
default: 'yes'
notes:
- Not all databases support enumeration, check system documentation for details.
author:
- Brian Coca (@bcoca)
s@
# get root user info
- getent:
database: passwd
key: root
- debug:
var: getent_passwd
# get all groups
- getent:
database: group
split: ':'
- debug:
var: getent_group
# get all hosts, split by tab
- getent:
database: hosts
- debug:
var: getent_hosts
# get http service info, no error if missing
- getent:
database: services
key: http
fail_key: False
- debug:
var: getent_services
# get user password hash (requires sudo/root)
- getent:
database: shadow
key: www-data
split: ':'
- debug:
var: getent_shadow
N( t
AnsibleModule( t to_nativec C` s¡ t d t d t d d d t ƒ d t d d ƒ d t d d ƒ d t d d ƒ d t d d
d t ƒ ƒ d t ƒ } d
d d d g } | j d } | j j d ƒ } | j j d ƒ } | j j d ƒ } | j j d ƒ } | j d t ƒ } | d k r| | | g } n | | g } | d k r4| j d | g ƒ n | d k rU| | k rUd } n y | j | ƒ \ } }
} Wn5 t k
r¨} | j
d t | ƒ d t j
ƒ ƒ n Xd }
d | } i i | 6} | d k r!x9 |
j ƒ D]+ } | j | ƒ } | d | | | d