Skip to content

Exec resource examples and powershell facts

Notifications You must be signed in to change notification settings

tonyjuric/exec_examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

exec_examples

Exec resource examples and powershell facts

exec_eg1

This example is a basic exec resource utilizing best practices. The onlyif attribute allows this exec resource to have idempotency and prevent the exec resource from triggering every single time. The onlyif attribute also allows the resource to be run in noop mode for simulation or reporting purposes.

exec_eg2

This example utilises an exec resource in conjunction with a custom/external fact. The exec resource only runs based on the status of the spooler service fact.

spooler.ps1

This is a simple custom/external fact to return the status of the Print Spooler service. As it is placed in the facts.d directory, this fact will be distributed to every node via pluginsync. This saves you from having to add the fact in manually on the node.

About

Exec resource examples and powershell facts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Puppet 94.3%
  • PowerShell 5.7%