Henrik Lindberg <[email protected]> writes:

> On 28/09/16 14:30, Toni Schmidbauer wrote:
> I tried this on latest puppet:
>
> === test.pp
> class test::subclass {}
> class test inherits test::subclass {
>   notify { 'hello?': }
> }
> include test

did some more tests with puppet 4.7. so the above works but if i move
tests::subclass into a separate file (subclass.pp) in the manifests
folder puppet apply fails with duplicate resource.

my source code layout:

├── manifests
│   ├── init.pp
│   └── subclass.pp
└── tests
    └── init.pp

manifests/init.pp:

## code
class test inherits test::subclass {
  notify { 'hello world': }
}

include test
# end code

manifests/subclass.pp:

## code
class test::subclass {}
# end code

tests/init.pp:

## code
include test
# end code

i run the code with the following command

puppet apply --modulepath=/vagrant/modules manifests/init.pp

if i use

puppet apply --modulepath=/vagrant/modules tests/init.pp
                                           ^
                                           |- HEADS UP

puppet apply works.

thanks for your help

toni

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/874m4xus6a.fsf%40stderr.at.
For more options, visit https://groups.google.com/d/optout.

Reply via email to