- Description
- Requirements
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- License
- Getting help - Some Helpful commands
This module provides the exec task. This task allows you to run an arbitary command with arguments.
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.
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.
For detailed reference information, see the REFERENCE.md
For an extensive list of supported operating systems, see metadata.json
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.
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
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