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

Features: Remove all comments #44

Closed jk2l closed 7 years ago

jk2l commented 8 years ago

My base puppetfile have some comments to mention what part of system they require or maybe TODO to comments for remove after certain features drop. The output file now turn out to be a bit ugly. maybe remove the comments off source file? or don't move the module to upper section

# General overall comments

# Comment A
mod 'puppetlabs/activemq',              '0.4.0'
mod 'puppetlabs/apt',                   '2.2.2'
mod 'puppetlabs/catalog_preview',       '2.1.0'
mod 'puppetlabs/git',                   '0.5.0'
mod 'puppetlabs/haproxy',               '1.0.0'
mod 'puppetlabs/puppetdb',              '4.0.0'
mod 'puppetlabs/ruby',                  '0.4.0'
mod 'puppetlabs/stdlib',                '4.12.0'

# Comment B
mod 'elasticsearch-logstashforwarder',  '0.1.1'

# Comment C
mod 'puppet/mcollective',               '2.2.0'
mod 'puppet/puppetboard',               '2.8.2'

# Comment D
mod 'cwood/uwsgi',                      '0.2.2'
mod 'richardc/datacat',                 '0.6.2'
mod 'torrancew/cron',                   '0.2.1'
mod 'zack/r10k',                        '3.2.0'

mod 'openstack_infra-pip',
    :git => 'https://github.com/openstack-infra/puppet-pip.git',
    :ref => 'adf639e'
mod 'jk2l-zabbix',
    :git => 'https://github.com/voxpupuli/puppet-zabbix.git',
    :ref => '577cb892494ff61b5d3d4aee3646e7251cef84fa'
forge 'http://forge.puppetlabs.com'

# Modules discovered by generate-puppetfile
mod 'croddy/make', '0.0.5'
mod 'cwood/uwsgi', '0.2.2'
mod 'gentoo/portage', '2.3.0'
mod 'puppet/mcollective', '2.2.0'
mod 'puppet/puppetboard', '2.8.2'
mod 'puppetlabs/activemq', '0.4.0'
mod 'puppetlabs/apt', '2.2.2'
mod 'puppetlabs/catalog_preview', '2.1.0'
mod 'puppetlabs/concat', '2.2.0'
mod 'puppetlabs/firewall', '1.8.1'
mod 'puppetlabs/gcc', '0.3.0'
mod 'puppetlabs/git', '0.5.0'
mod 'puppetlabs/haproxy', '1.5.0'
mod 'puppetlabs/inifile', '1.5.0'
mod 'puppetlabs/java', '1.6.0'
mod 'puppetlabs/pe_gem', '0.2.0'
mod 'puppetlabs/postgresql', '4.8.0'
mod 'puppetlabs/puppetdb', '5.1.2'
mod 'puppetlabs/ruby', '0.5.0'
mod 'puppetlabs/stdlib', '4.12.0'
mod 'puppetlabs/vcsrepo', '1.3.2'
mod 'richardc/datacat', '0.6.2'
mod 'stahnma/epel', '1.2.2'
mod 'stankevich/python', '1.14.0'
mod 'torrancew/cron', '0.2.1'
mod 'zack/r10k', '3.2.0'
# Discovered elements from existing Puppetfile
# General overall comments
# Comment A
# Comment B
mod 'elasticsearch-logstashforwarder',  '0.1.1'
# Comment C
# Comment D
mod 'openstack_infra-pip',
    :git => 'https://github.com/openstack-infra/puppet-pip.git',
    :ref => 'adf639e'
mod 'jk2l-zabbix',
    :git => 'https://github.com/voxpupuli/puppet-zabbix.git',
    :ref => '577cb892494ff61b5d3d4aee3646e7251cef84fa'
rnelson0 commented 8 years ago

Yikes, that is a bit messy!

If comment preservation were a command line argument, would that address the issue sufficiently?

jk2l commented 8 years ago

as i only need comments on base files i guess remove comments from output is fine for me.