On Monday, April 8, 2013 3:46:40 AM UTC-5, Francesco wrote:
>
> Hy I m a new user in world puppet
> I have installed a packge test on a node "screen" without problem
> Now i want to try to uninstall it but without success. This is the file
> configuration
> this is my file init.pp
> package {"screen-4.0.3-16.el6":
> ensure=> "absent"
> }
>
> #package and purge its config files
> package {"screen-4.0.3-16.el6":
> ensure => "purged"
> }
>
> this is the path of my manifest /etc/puppet/modules/screen/manifests
> this is the command that I execute to remove package screen
> puppet agent --server=puppet.xxxx.xxxxI
>
> this is the answer
>
> Info: Retrieving plugin
> Info: Caching catalog for node.xx.xx.x
> Info: Applying configuration version '1365406267'
> Notice: Finished catalog run in 0.08 seconds
> Effectively screen is already installed
>
> Thank you in advance
> I m going mad
>
>
Puppet is not parsing your module's manifest. It would fail with a parse
error if it tried to do.
I think you have a misconception: installing or creating a module in your
module path does not in itself cause any declarations in any of its
manifests to be applied to client nodes. At a typical site, there are
multiple kinds of nodes that must be configured differently, sometimes
including even special one-offs. Puppet therefore has mechanisms for
assigning specific resource declarations and collections of resource
declarations to clients. It assigns only those declarations.
Unless you configure it specially, the master starts with
<puppet-path>/manifests/site.pp (not init.pp -- that's for modules).
Declarations in that file apply to all nodes, and it is typical (at least
when starting with Puppet) to use node declarations to tell Puppet which
declarations to apply to each particular client. For the time being,
however you can define just a default node in which you declare the
appropriate class from your 'screen' module:
node default {
include 'screen'
}
Puppet determines where to look for the manifest containing class 'screen's
definition based on the class name. Class definitions are usually assumed
to be in files <classname>.pp in directories corresponding to their module
and any intermediate namespaces. Classes that have the same name as the
module in which they appear are special, however: they should be in files
named init.pp in their module's manifests directory. In your case that
would be /etc/puppet/modules/screen/manifests/init.pp. That file should
contain this:
class screen {
package { 'screen':
ensure => 'purged'
}
}
Note that the version and release codes are NOT part of the package name,
and if putting them in happens to work in any given context then that is a
happenstance on which you should not rely and from which you should not
draw any conclusions. To ensure that a specific version/release of the
package was installed, you would use the 'ensure' parameter: "ensure =>
'4.0.3-16.el6'". On the other hand, a lot of people don't care exactly
which version (ensure => 'installed') or want the latest available version,
whatever that happens to be (ensure => 'latest').
Note also that there can be only one declaration for package 'screen' for
any given node. Puppet does not allow multiple declarations for the same
resource; this helps you ensure internal consistency of your manifests.
John
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.