rnelson0 / puppet-generate-puppetfile

Generate or update a Puppetfile for use with r10k or librarian-puppet. Optionally, create a fixtures file for rspec-puppet.
92 stars 22 forks source link

Add support for git repos in .fixture.yml #54

Closed bastelfreak closed 6 years ago

bastelfreak commented 7 years ago

Hi!

my usecase: I've a long Puppetfile in my control repo and would like to create a suitable .fixture.yml file based on that. I'm not sure if this is a suitable usecase for this gem. Parts of the functionality are already present so it may fit? I'm using git modules only and nothing from the forge. No changes on the puppetfile are needed, I only want to create my fixtures based on that.

rnelson0 commented 7 years ago

Can you attach or link to a sample Puppetfile, and if possible, the fixtures you expect it to generate?

guimaluf commented 7 years ago

@rnelson0 I think the above example is quite sufficient!

Puppetfile:

mod 'horizon',
  :git => 'https://github.com/openstack/puppet-horizon',
  :ref => '8.2.0'

mod 'puppetlabs/ntp', '6.0.0'

.fixtures.yml:

fixtures:
  repositories:
    horizon:
      repo: 'https://github.com/openstack/puppet-horizon'
      ref: '8.2.0'
  forge_modules:
    ntp:
      repo: 'puppetlabs/ntp'
      ref: '6.0.0'