just start puppet. else knows, starting difficult. practice wanna following: assume put in init.pp. did google search before posting here. of them out there not apply if/else loop on version checking. ensure specific version or ensure => latest.
if 'openssl' version == '1.0.2b' or '1.0.2d' upgrade 1.1.1e else nothing currently code looks this
package { 'openssl': if 'openssl' version == '1.0.2b' or '1.0.2d' { ensure => '1.1.1e' } else { } i have several problems:
1) don't think syntax version of openssl written correctly. when simple google search see people ensuring version of openssl '1.0.1e-15.el6', it's '1.0.1e-16.el6_5.7' confused on determining what's after '-'
3) how check version of openssl? think syntax if 'openssl' version == "xxxx" not correct.
depending on os have find out full name of package install. on redhat system can use yum info openssl find out full package name. see this:
[root@puppet-vm ~]# yum info openssl loaded plugins: fastestmirror loading mirror speeds cached hostfile * base: mirror.informatik.hs-fulda.de * extras: mirror.informatik.hs-fulda.de * updates: mirror.maeh.org installed packages name : openssl arch : x86_64 epoch : 1 version : 1.0.1e release : 42.el7.9 size : 1.5 m repo : installed repo : updates summary : utilities general purpose cryptography library tls implementation url : http://www.openssl.org/ license : openssl description : openssl toolkit provides support secure communications between : machines. openssl includes certificate management tool , shared : libraries provide various cryptographic algorithms , : protocols.
where
version : 1.0.1e release : 42.el7.9
gives information need.
this how can tell puppet install specific version of openssl or other package.
package { 'openssl': ensure => '1.0.1e-42.el7.9', }
more detailed information package type can found here.
puppet not designed check existance of packages , upgrade / downgrade them if fullfill specific requirement. puppet meant used defining how server should configured finally.
there ways trying exec not how puppet should used.
Comments
Post a Comment