Report abuse

/etc/puppet/modules/ztest/manifests/init.pp

1
2
3
4
5
class ztest {
  include ztest::myres
  include ztest::tmp_file
}

/etc/puppet/modules/ztest/manifests/myres.pp

1
2
3
4
5
6
class ztest::myres{
  define res1(){
       #$name
  }
}

/etc/puppet/modules/ztest/manifests/tmp_file.pp

1
2
3
4
5
6
7
8
9
10
class ztest::tmp_file {
    res1{ "newres": }
    file{ "/tmp/ztest":
       ensure => present,
       mode   => 644,
       owner  => root,
       group  => root
    }
}

Console Output :: Error

1
2
3
4
5
6
7
debug: Using cached certificate_revocation_list for ca
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type res1 at /etc/puppet/modules/ztest/manifests/tmp_file.pp:2 on node mypuppet.local
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, using default (yaml)
debug: report supports formats: b64_zlib_yaml marshal raw yaml; using yaml