How to ensure the rpm version?

39 views
Skip to first unread message

Wei Chen

unread,
Oct 16, 2015, 4:50:19 AM10/16/15
to Puppet Users
Hi,

I try to use the puppet to configure the Jboss EAP 6.X. My first init.pp looks as follow:
...
        class jboss_rpm_install {
        # Required RPM package
        $jboss_core_rpm = [
        "jbossas-appclient",
        "jbossas-bundles",
        "jbossas-core",
        "jbossas-hornetq-native",
        "jbossas-jbossweb-native",
        "jbossas-modules-eap",
        "jbossas-product-eap",
        "jbossas-standalone",
        "jbossas-welcome-content-eap"
        ]

        package { $jboss_core_rpm: ensure => "installed" }
        }
...

But in this form I can't set the version of the many RPMs. So I change to the second form as follow:

...
        package {
        "jbossas-appclient": ensure => latest;
        "jbossas-bundles": ensure => latest;
        "jbossas-core": ensure => latest;
        "jbossas-hornetq-native": ensure => latest;
        "jbossas-jbossweb-native" : ensure => latest;
        "jbossas-modules-eap": ensure => latest;
        "jbossas-product-eap": ensure => latest;
        "jbossas-standalone": ensure => latest;
        "jbossas-welcome-content-eap": ensure => latest;
        }
...

This works. But I prefer the first form. How to do?




-- Wei

David Schmitt

unread,
Oct 16, 2015, 6:11:52 AM10/16/15
to puppet...@googlegroups.com
Hi Wei,
As long as you want to set all packages to the same version,

package { $jboss_core_rpm: ensure => latest }

should work as well.

Cheers, D.

Shoeb Lakdawala

unread,
Oct 18, 2015, 10:47:21 PM10/18/15
to Puppet Users
you can use ensure for a particular version as well.

ensure       => '11.14',

Wei Chen

unread,
Oct 19, 2015, 4:24:32 AM10/19/15
to Puppet Users
Many thanks!

Wei Chen

unread,
Oct 19, 2015, 4:24:47 AM10/19/15
to Puppet Users
Many thanks!
Reply all
Reply to author
Forward
0 new messages