Giter Club home page Giter Club logo

puppetlabs-exec's Introduction

exec

Table of Contents

  1. Description
  2. Requirements
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. License
  7. Getting help - Some Helpful commands

Description

This module provides the exec task. This task allows you to run an arbitary command with arguments.

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 an exec task, use the task command, specifying the command to be executed.

  • With PE on the command line, run puppet task run exec command=<COMMAND>.
  • With Bolt on the command line, run bolt task run exec command=<COMMAND>.

For example, to view the free disk space of a host, run:

  • With PE, run puppet task run exec command="df -h" --nodes neptune.
  • With Bolt, run bolt task run exec command="df -h" --nodes neptune --modulepath ~/modules.

This example is specifically for Windows using Powershell and returns a list of features installed on the server: puppet task run exec command='powershell -command "Get-WindowsFeature | Where Installed | Format-List -Property Name"' --nodes neptune

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

Reference

For detailed reference information, see the REFERENCE.md

Limitations

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

License

This codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of AGPL, BSD-2, BSD-3, GPL2.0, LGPL, MIT and MPL Licensing.

Getting Help

To display help for the package task, run puppet task show package

To show help for the task CLI, run puppet task run --help or bolt task run --help

Development

Acceptance tests are ran usingpuppet_litmus. To run the acceptance tests follow the instructions here. You can also find a tutorial and walkthrough of using Litmus and the PDK on YouTube.

If you run into an issue with this module, or if you would like to request a feature, please file an issue on the repo.

If you have problems getting this module up and running, please contact Support.

If you submit a change to this module, be sure to regenerate the reference documentation as follows:

puppet strings generate --format markdown --out REFERENCE.md

puppetlabs-exec's People

Contributors

actions-user avatar adreyer avatar adrianiurca avatar amitkarsale avatar chelnak avatar conormurray95 avatar daianamezdrea avatar david22swan avatar davidmalloncares avatar davids avatar disha-maker avatar eimlav avatar eputnam avatar florindragos avatar glennsarti avatar gregohardy avatar gspatton avatar hunner avatar jordanbreen28 avatar lavinia-dan avatar lionce avatar lukasaud avatar malikparvez avatar michaeltlombardi avatar pmcmaw avatar rajat-puppet avatar ramesh7 avatar sanfrancrisko avatar sheenaajay avatar tphoney avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppetlabs-exec's Issues

failonfail option not function

Hi there,

I try to run the command like:
puppet task run exec command='ifconfig' failonfail='false' --query 'nodes { certname ~ "infra" }'

It returned an error:
Failed to submit job: puppetlabs.validators/validation-error: The failonfail parameter expected a value of type Optional[Boolean] but got "false"

Why?

Remove testing on Appveyor

Appveyor testing is enabled however there are no actual spec unit tests, and the rubucop linting etc. is doubling up from Travis. So there appears to be no value in testing on Appveyor.

At the very least, the spec testing should be removed as it's wasting time and Appveyor resources.

Windows examples

The examples shown are only for linux/mac. It would be nice to have some windows examples e.g. how to run PowerShell commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.