Puppet Setup Local Yum Repos Task - Review has incomplete video

This task failed with error… I did install on all servers

  • package ‘wget’ is not installed from newly created repository ‘epel_local’ on App Server 1

I have asked for review, but looks like the complete video is not captured… @rahul456 @Inderpreet help?

@ramnamy, can you please share your puppet code ?

@rahul456

class local_yum_repo {

yumrepo { ‘epel_local’:
enabled => 1,
descr => ‘Local repo holding company application packages’,
baseurl => ‘file:///packages/downloaded_rpms’,
gpgcheck => 0,
}

}

include local_yum_repo

@rahul456 I think i know why it failed…I installed the wget manually not via puppet…I wasn’t thinking straight…Sorry…Now what happens in the review? Do i get a chance to re-attempt?

1 Like

@ramnamy

Please accept my review and you can re-attempt the task.

1 Like

@Lakshmi How to accept the review? Sorry this is my first time at this review phase

You will be seeing tick mark next to my comments if I am not wrong. Click and you can retry.

@Lakshmi ah, got it…accepted now…Thanks…

1 Like

Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y install wget’ returned 1: One of the configured repositories failed (Local repo holding nautilus application packages),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:
1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
   upstream. This is most often useful if you are using a newer
   distribution release than is supported by the repository (and the
   packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
       yum --disablerepo=local_yum ...

4. Disable the repository permanently, so yum won't use it by default. Yum
   will then just ignore the repository until you permanently enable it
   again or use --enablerepo for temporary usage:

       yum-config-manager --disable local_yum
   or
       subscription-manager repos --disable=local_yum

5. Configure the failing repository to be skipped, if it is unavailable.
   Note that yum will try to contact the repo. when it runs most commands,
   so will have to try and fail each time (and thus. yum will be be much
   slower). If it is a very temporary problem though, this is often a nice
   compromise:

       yum-config-manager --save --setopt=local_yum.skip_if_unavailable=true

failure: repodata/repomd.xml from local_yum: [Errno 256] No more mirrors to try.
file:///packages/downloaded_rpms/repodata/repomd.xml: [Errno 14] curl#37 - “Couldn’t open file /packages/downloaded_rpms/repodata/repomd.xml”
Error: /Stage[main]/Local_yum_repo/Package[wget]/ensure: change from ‘purged’ to ‘present’ failed: Executionof ‘/usr/bin/yum -d 0 -e 0 -y install wget’ returned 1: One of the configured repositories failed (Local repo holding nautilus application packages),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

Hello Kodekloud community whenever i do the task i’m getting this error the repo is getting created but the package is not getting installed.

Hello, @nilesh.b.jamale
Can you please share your puppet code?

Hi, nice day for everyone.

@Tej-Singh-Rana, @Ayman

I’ve made this task twice and twice I have been wrong, and I can’t understand Why

cd /etc/puppetlabs/code/environments/production/manifests/

cat <beta.pp
class local_yum_repo {
yumrepo { ‘localyum’:
enabled => 1,
descr => ‘Local repo for application packages’,
baseurl => ‘file:///packages/downloaded_rpms’,
gpgcheck => 0,
}

package { 'samba':
    ensure  => 'installed',
    require => Yumrepo['localyum'],        
}

}

node ‘stapp01.stratos.xfusioncorp.com’, ‘stapp02.stratos.xfusioncorp.com’, ‘stapp03.stratos.xfusioncorp.com’ {
include local_yum_repo

}

EOF

hi @juancgarciaco, seems like you have already completed your task.