*titleistfour*,
    please copy/paste the content of both modules.  You said in your first
sentence that you have 2 modules.

Did you actually mean you had 1 module with 1 class with 2 puppet
resources?  Specifically the code snippet you provided only shows 2 puppet
resources: 1 for package and 1 for service.

So, please provide the manifest name (the .pp file), and then immediately
below it the entire class (starting from the *class *line down to the
closing curly brace '}' ).

Also, for real-time help, are you aware of the site slack.puppet.com?  It
is awesome and there are tons of puppet experts that can help you on many
levels with your code and design for that matter.



--------------------------
Warron French


On Mon, Nov 6, 2017 at 11:11 AM, <[email protected]> wrote:

> Hello,
>
> I'm very new to Puppet and trying to implement 2 very simple modules.
> Both of these modules should work independent of each other, but both will
> be run on the same host.  They both require that openssh-server be
> installed and the sshd service is started and enabled.  I'm unable to
> figure out how to deal with this as I keep getting a Duplicate declaration
> for Package['openssh-server'].
>
>
>     package { 'openssh-server':
>         ensure => installed,
>     }
>     service {'sshd':
>         ensure  => running,
>         enable  => true,
>         require => Package["openssh-server"],
>     }
>
>
> What is the best way to deal with this?  Please keep in mind that I'm not
> very proficient with Puppet, still have a lot to learn.  I read through
> some of the documentation that discusses uniqueness for resource titles and
> names, but I don't follow how to get around that.  Should I have a "common"
> module of sorts where duplicate things exist?  That seems to add complexity
> and the modules will then have a dependency on that.  I would like to avoid
> that and have each module be self contained.
>
> Thank you for any pointers or help.
>
> -J
>
> --
> 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/45e66272-be57-4b7a-8176-554edb05badc%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/45e66272-be57-4b7a-8176-554edb05badc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJdJdQkwqX_J9_QBrMzt7JgbwufkTDh60JrW8mqBQsjJCzHn%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to