Forge Home

resource

Tasks that lets you inspect resources on a system

42,720 downloads

15,093 latest version

4.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.1.0 (latest)
  • 1.0.0
  • 0.4.0
  • 0.3.1
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Dec 9th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.10 < 7.0.0
  • , , , , ,
This module has been deprecated by its author since May 11th 2021.
Tasks:
  • resource

Start using this module

Documentation

puppetlabs/resource — version 1.1.0 Dec 9th 2019

resource

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Development

Overview

Module provides the resource task.

Module Description

The provided task allows you to inspect the values of resources via the puppet resource command.

Setup

Requirements

This module is compatible with Puppet Enterprise and Puppet Bolt.

  • To run tasks with Puppet Enterprise, PE 2018.1 or later must be installed on the machine from which you are running task commands. Machines receiving task requests must be Puppet agents.
  • To run tasks with Puppet Bolt, Bolt 1.0 or later must be installed on the machine from which you are running task commands. Machines receiving task requests must have SSH or WinRM services enabled.

Usage

To run a resource task, use the task command, specifying the type and optionally the title of the resource.

  • With PE on the command line, run puppet task run resource type=<TYPE> title=<TITLE>.
  • With Bolt on the command line, run bolt task run resource type=<TYPE> title=<TITLE>.
  • To display help for the resource task, to view the available actions and parameters, run puppet task show resource
  • To show help for the task CLI, run puppet task run --help or bolt task run --help

For example, to get the state of the root user, run:

  • With PE, run puppet task run resource type=user title=root --nodes neptune.
  • With Bolt, run bolt task run resource type=user title=root --nodes neptune --modulepath ~/modules.

You can also run tasks in the PE console. See PE task documentation for complete information.

Reference

For information on the classes and types, see the REFERENCE.md. For a complete list of resource types that are supported, see the Puppet Types documentation.

Limitations

To run acceptance tests against Windows machines, ensure that the BEAKER_password environment variable has been set to the password of the Administrator user of the target machine.

For an extensive list of supported operating systems, see metadata.json

Development

Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. To contribute to Puppet projects, see our module contribution guide.