Forge Home

rockstar

Run Rockstar code in Puppet

427 downloads

427 latest version

5.0 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

  • 0.1.0 (latest)
released Apr 1st 2022
This version is compatible with:
  • Puppet Enterprise 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'binford2k-rockstar', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add binford2k-rockstar
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install binford2k-rockstar --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

binford2k/rockstar โ€” version 0.1.0 Apr 1st 2022

Rockstar ๐Ÿค˜๐ŸŽธ

We all know you want to take it higher and rock on. This module gives you a function and an exec provider to do just that! Write your code as hair metal power ballads just like the gods of rock intended.

the source of it all

See the Code with Rockstar homepage for guidance on writing Rockstar code.

Setup Requirements

Any nodes running rockstar scripts will need the kaiser-ruby gem installed. You'll also need pry because the author did too many lines of coke and forgot to take debugging libraries out of the production release.

This is managed in the rockstar class, so you can just include that.

To clean up after, pass the ensure => absent parameter to that class and it will remove the gems and the dependent libraries it pulls in. Note that just because those were the dependencies resolved on my test machine doesn't mean that they'll be accurate for yours, so you might want to observe which gems get installed and remove them manually instead.

Usage

Just write some rockstar code, then evaluate it with the rockstar function or the exec provider. A fizzbuzz.rock example is included in the files directory, used by the example manifest provided.

Function example:

include rockstar

notify { 'testing':
  message => rockstar(file('rockstar/fizzbuzz.rock')),
}

Exec examples:

include rockstar

exec { 'inline':
  command   => file('rockstar/fizzbuzz.rock'),
  provider  => rockstar,
  logoutput => true,
}

file { '/tmp/fizzbuzz.rock':
  ensure => file,
  owner  => 'root',
  mode   => '0666',
  source => 'puppet:///modules/rockstar/fizzbuzz.rock',
}
-> exec { 'from file':
  command   => '/tmp/fizzbuzz.rock',
  provider  => rockstar,
  logoutput => true,
}

Limitations

Lol, you're not actually using this, are you?