16.57. cdist-type__hosts(7)¶
16.57.1. NAME¶
cdist-type__hosts - manage entries in /etc/hosts
16.57.2. DESCRIPTION¶
Add or remove entries from /etc/hosts file.
16.57.3. OPTIONAL PARAMETERS¶
- state
- If state is
present
, make object_id resolve to ip. If state isabsent
, object_id will no longer resolve via /etc/hosts, if it was previously configured with this type. Manually inserted entries are unaffected. - ip
- IP address, to which hostname (=object_id) must resolve. If
state is
present
, this parameter is mandatory, if state isabsent
, this parameter is silently ignored.
16.57.4. EXAMPLES¶
# Now `funny' resolves to 192.168.1.76,
__hosts funny --ip 192.168.1.76
# and `happy' no longer resolve via /etc/hosts if it was
# previously configured via __hosts.
__hosts happy --state absent
16.57.5. SEE ALSO¶
hosts(5)
16.57.6. AUTHORS¶
Dmitry Bogatov <KAction@gnu.org>
16.57.7. COPYING¶
Copyright (C) 2015,2016 Dmitry Bogatov. Free use of this software is granted under the terms of the GNU General Public License version 3 or later (GPLv3+).