File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 114114 # This workaround is needed because GCP-provisioned SLES images are unregistered BYOS
115115 # without any package repositories configured. Remove this once proper PAYG images are used.
116116 if ($facts [' os' ][' family' ] in [' SLES' , ' SUSE' ]) {
117- exec { 'Add openSUSE repo if no repos exist ' :
117+ exec { 'Configure zypper repo for SLES ' :
118118 path => ' /bin:/usr/bin:/sbin:/usr/sbin' ,
119- command => ' zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback' ,
120- unless => " zypper lr | grep -q '| '" ,
119+ command => ' zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback && zypper --non-interactive --gpg-auto-import-keys refresh ' ,
120+ unless => " zypper lr 2>/dev/null | grep -q 'opensuse-leap-fallback \\ |http '" ,
121121 logoutput => true ,
122- before => Package[' java' ],
123- }
124-
125- exec { 'Refresh zypper repos' :
126- path => ' /bin:/usr/bin:/sbin:/usr/sbin' ,
127- command => ' zypper --non-interactive --gpg-auto-import-keys refresh' ,
128- refreshonly => true ,
129- subscribe => Exec[' Add openSUSE repo if no repos exist' ],
130- before => Package[' java' ],
131122 }
123+ -> Package[' java' ]
132124 }
133125
134126 if $facts [' os' ][' family' ] == ' Debian' {
You can’t perform that action at this time.
0 commit comments