resource

pdk
tasks
Tasks that lets you inspect resources on a system

Puppet

puppetlabs

30,256 downloads

5,303 latest version

4.8 quality score

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
  • Debian
    ,
    CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Ubuntu
    ,
    windows
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.