Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 75

Can't successfully build module

$
0
0
I've tried every tutorial I can find. I can't get puppet to successfully build a very basic module that calls a class and deploys a file from template. I'm running RHEL 7 with Puppet 3.6.2 from the EPEL repository. I can create and apply manifests all day. I can't make a module that works. Here's my steps: pwd /home/michael/.puppet/modules/ puppet module generate michael-simplemod mv michael-simplemod simplemod cd simplemod pwd /home/michael/.puppet/modules/simplemod Then I start editing files. My directory structure looks like this: ls -R .: manifests metadata.json Rakefile README.md spec templates tests ./manifests: init.pp ./spec: classes spec_helper.rb ./spec/classes: init_spec.rb ./templates: foo.erb ./tests: init.pp My init.pp contains: class simplemod::foo { file { '/etc/foo': ensure => file, content => template("simplemod/templates/foo.erb"), owner => root, group => root, mode => '0644', } } class simplemod { include simplemod::foo } include simplemod My foo.erb contains: This file is based on a Puppet template, foo.erb. It is deployed on <%= @hostname %> When I try a puppet apply manifests/init.pp --noop, it fails to find foo.erb. Here's my modulepath: puppet master --configprint modulepath /home/michael/.puppet/modules:/usr/share/puppet/modules Not one single help file or instruction guide answers my simple question, why does no guide I've found give me step by step a beginning to end working solution for building a simple module? They all either dive off into developer jargon without defining what they mean, or their answer is incomplete.

Viewing all articles
Browse latest Browse all 75

Trending Articles