.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CDIST-TYPE__HOSTS" "7" "Sep 26, 2023" "7.0.0" "cdist" .SH NAME .sp cdist\-type__hosts \- manage entries in /etc/hosts .SH DESCRIPTION .sp Add or remove entries from \fI/etc/hosts\fP file. .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B state If state is \fBpresent\fP, make \fIobject_id\fP resolve to \fIip\fP\&. If state is \fBabsent\fP, \fIobject_id\fP will no longer resolve via \fI/etc/hosts\fP, if it was previously configured with this type. Manually inserted entries are unaffected. .TP .B ip IP address, to which hostname (=\fIobject_id\fP) must resolve. If state is \fBpresent\fP, this parameter is mandatory, if state is \fBabsent\fP, this parameter is silently ignored. .TP .B alias An alias for the hostname. This parameter can be specified multiple times (once per alias). .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX # Now \(gafunny\(aq resolves to 192.168.1.76, __hosts funny \-\-ip 192.168.1.76 # and \(gahappy\(aq no longer resolve via /etc/hosts if it was # previously configured via __hosts. __hosts happy \-\-state absent __hosts srv1.example.com \-\-ip 192.168.0.42 \-\-alias srv1 .EE .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBhosts\fP(5) .SH AUTHORS .nf Dmitry Bogatov <\fI\%KAction@gnu.org\fP> Dennis Camera <\fI\%dennis.camera\-\-@\-\-ssrq\-sds\-fds.ch\fP> .fi .sp .SH COPYING .sp Copyright (C) 2015\-2016 Dmitry Bogatov, 2019 Dennis Camera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .SH COPYRIGHT ungleich GmbH 2021 .\" Generated by docutils manpage writer. .