Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8698

puppet module generate broken w/o stdlib

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Environment:

      Puppet Version: 5.5.1
      OS Name/Version: Ubuntu 14.04 Trusty

    • Template:
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      SUMMARY

      Generated module does not work when using templates. Seems to be dependency now to puppet-stdlib.

      REPRODUCE

       

      $ puppet module generate foo/bar --skip-interview
      $ mkdir bar/templates
      $ cat <<-EOF > bar/templates/index.html.erb
      <html>
        <body>
          <h1>hello world</h1>
        </body>
      </html>
      EOF
      $ cat <<-EOF > bar/manifests/init.pp
      class bar {
        package { 'apache2':
          ensure => present,
        }
        service { 'apache2':
          ensure => running,
          enable => true,
        }
        file { '/var/www/html/index.html':
          content => template('bar/index.html.erb'),
        }
      }
      EOF
      $ sudo puppet apply --modulepath=. -e 'include ::bar'

       

      DESIRED BEHAVIOR

      Expected that I would have a functional module.

      ACTUAL BEHAVIOR

       

      Warning: ModuleLoader: module 'bar' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules\n (file & line not available) 
      Notice: Compiled catalog for controlrepo.test in environment production in 0.61 seconds 
      Notice: /Stage[main]/Bar/File[/var/www/html/index.html]/content: content changed '{md5}c32ad802df5abca941d784abf642e7fd' to '{md5}2d60ab375367b3e2996c7c1803009d55' 
      Notice: Applied catalog in 0.08 seconds
      

      NOTES

      When I run the module list command, I get this:

       

       

      $ sudo puppet module list --tree --modulepath=. 
      Warning: Missing dependency 'puppetlabs-stdlib': 'foo-bar' (v0.1.0) requires 'puppetlabs-stdlib' (>= 1.0.0) 
      /vagrant/scratch 
      └─┬ foo-bar (v0.1.0) 
        └── UNMET DEPENDENCY puppetlabs-stdlib (>= 1.0.0)
      

       

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  joaquin Joaquin Menchaca
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support