Resource Type: host

Defined in:
core_modules/host_core/lib/puppet/type/host.rb
Providers:
parsed

Summary

Installs and manages host entries.

Overview

For most systems, these entries will just be in `/etc/hosts`, but some systems (notably OS X) will have different solutions.

Properties

  • comment

    A comment that will be attached to the line with a # character.

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • host_aliases

    Any aliases the host might have. Multiple values must be specified as an array.

  • ip

    The host's IP address, IPv4 or IPv6.

  • target

    The file in which to store service information. Only used by those providers that write to disk. On most systems this defaults to `/etc/hosts`.

Parameters

  • name (namevar)

    The host name.

  • provider

    The specific backend to use for this `host` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.