GitLab upgraded to 13.6.1-ee.0 - changelog: https://gitlab.com/gitlab-org/gitlab/blob/master/CHANGELOG-EE.md

README.md 5.1 KB
Newer Older
Tim Smith's avatar
Tim Smith committed
1
# yum Cookbook
Tim Smith's avatar
Tim Smith committed
2

Tim Smith's avatar
Tim Smith committed
3 4
![ci](https://github.com/chef-cookbooks/yum/workflows/ci/badge.svg?branch=master)
[![Cookbook Version](https://img.shields.io/cookbook/v/yum.svg)](https://supermarket.chef.io/cookbooks/yum)
Guilhem Lettron's avatar
Guilhem Lettron committed
5

Tim Smith's avatar
Tim Smith committed
6
The Yum cookbook exposes the `yum_globalconfig` resource which allows a user to control global yum behavior. This resources aims to allow the user to configure all options listed in the `yum.conf` man page, found at <http://man7.org/linux/man-pages/man5/yum.conf.5.html>
mattray's avatar
mattray committed
7

Tim Smith's avatar
Tim Smith committed
8
## Requirements
Tim Smith's avatar
Tim Smith committed
9

Tim Smith's avatar
Tim Smith committed
10
### Platforms
Tim Smith's avatar
Tim Smith committed
11

Tim Smith's avatar
Tim Smith committed
12 13
- RHEL/CentOS and derivatives
- Fedora
Tim Smith's avatar
Tim Smith committed
14

Tim Smith's avatar
Tim Smith committed
15
### Chef
Tim Smith's avatar
Tim Smith committed
16

Tim Smith's avatar
Tim Smith committed
17
- Chef 13+
Tim Smith's avatar
Tim Smith committed
18

Tim Smith's avatar
Tim Smith committed
19
### Cookbooks
Tim Smith's avatar
Tim Smith committed
20

Tim Smith's avatar
Tim Smith committed
21
- none
22

23
## Resources
mattray's avatar
mattray committed
24

Sean OMeara's avatar
Sean OMeara committed
25
### yum_globalconfig
Tim Smith's avatar
Tim Smith committed
26

Tim Smith's avatar
Tim Smith committed
27
This renders a template with global yum configuration parameters. The default recipe uses it to render `/etc/yum.conf`. It is flexible enough to be used in other scenarios, such as building RPMs in isolation by modifying `installroot`.
Sean OMeara's avatar
Sean OMeara committed
28

Sean OMeara's avatar
Sean OMeara committed
29
#### Example
Tim Smith's avatar
Tim Smith committed
30 31

```ruby
Sean OMeara's avatar
Sean OMeara committed
32 33 34 35 36 37 38 39 40
yum_globalconfig '/my/chroot/etc/yum.conf' do
  cachedir '/my/chroot/etc/yum.conf'
  keepcache 'yes'
  debuglevel '2'
  installroot '/my/chroot'
  action :create
end
```

41
#### Properties
Tim Smith's avatar
Tim Smith committed
42 43 44

`yum_globalconfig` can take most of the same parameters as a `yum_repository`, plus more, too numerous to describe here. Below are a few of the more commonly used ones. For a complete list, please consult the `yum.conf` man page, found here: <http://linux.die.net/man/5/yum.conf>

45 46
- `cachedir` - Directory where yum should store its cache and db files. The default is '/var/cache/yum'.
- `keepcache` - Either `true` or `false`. Determines whether or not yum keeps the cache of headers and packages after successful installation. Default is `false`
Tim Smith's avatar
Tim Smith committed
47
- `debuglevel` - Debug message output level. Practical range is 0-10\. Default is '2'.
48 49 50
- `exclude` - List of packages to exclude from updates or installs. This should be a space separated list. Shell globs using wildcards (eg. * and ?) are allowed.
- `installonlypkgs` = List of package provides that should only ever be installed, never updated. Kernels in particular fall into this category. Defaults to kernel, kernel-bigmem, kernel-enterprise, kernel-smp, kernel-debug, kernel-unsupported, kernel-source, kernel-devel, kernel-PAE, kernel-PAE-debug.
- `logfile` - Full directory and file name for where yum should write its log file.
Tim Smith's avatar
Tim Smith committed
51
- `exactarch` - Either `true` or `false`. Set to `true` to make 'yum update' only update the architectures of packages that you have installed. ie: with this enabled yum will not install an i686 package to update an x86_64 package. Default is `true`
52
- `gpgcheck` - Either `true` or `false`. This tells yum whether or not it should perform a GPG signature check on the packages gotten from this repository.
Tim Smith's avatar
Tim Smith committed
53

54 55 56 57
### yum_repository

This resource is now provided by chef-client 12.14 and later and has been removed from this cookbook. If you require this resource we highly recommend upgrading your chef-client, but if that is not an option you can pin the 4.X yum cookbook.

Tim Smith's avatar
Tim Smith committed
58
## Recipes (deprecated)
Tim Smith's avatar
Tim Smith committed
59

60
- `default` - Configures `yum_globalconfig[/etc/yum.conf]` with values found in node attributes at `node['yum']['main']`
Tim Smith's avatar
Tim Smith committed
61 62

## Attributes
Tim Smith's avatar
Tim Smith committed
63

Sean OMeara's avatar
Sean OMeara committed
64
The following attributes are set by default
mattray's avatar
mattray committed
65

Tim Smith's avatar
Tim Smith committed
66
```ruby
Sean OMeara's avatar
Sean OMeara committed
67 68 69 70 71 72 73 74 75 76 77
default['yum']['main']['cachedir'] = '/var/cache/yum/$basearch/$releasever'
default['yum']['main']['keepcache'] = false
default['yum']['main']['debuglevel'] = nil
default['yum']['main']['exclude'] = nil
default['yum']['main']['logfile'] = '/var/log/yum.log'
default['yum']['main']['exactarch'] = nil
default['yum']['main']['obsoletes'] = nil
default['yum']['main']['installonly_limit'] = nil
default['yum']['main']['installonlypkgs'] = nil
default['yum']['main']['installroot'] = nil
```
jtimberman's avatar
jtimberman committed
78

79
For Amazon platform nodes, the default is to receive a continuous flow of updates,
Jennifer Davis's avatar
Jennifer Davis committed
80 81 82 83 84

```ruby
default['yum']['main']['releasever'] = 'latest'
```

85 86 87 88 89 90
To lock existing instances to the current version of the Amazon AMI,

```ruby
default['yum']['main']['releasever'] = ''
```

Tim Smith's avatar
Tim Smith committed
91
## Related Cookbooks
Tim Smith's avatar
Tim Smith committed
92

Tim Smith's avatar
Tim Smith committed
93
Recipes from older versions of this cookbook have been moved individual cookbooks. Recipes for managing platform yum configurations and installing specific repositories can be found in one (or more!) of the following cookbook.
Tim Smith's avatar
Tim Smith committed
94

Tim Smith's avatar
Tim Smith committed
95 96 97 98 99 100 101 102 103 104 105
- yum-centos
- yum-fedora
- yum-amazon
- yum-epel
- yum-elrepo
- yum-repoforge
- yum-ius
- yum-percona
- yum-pgdg

## Usage
Tim Smith's avatar
Tim Smith committed
106

Tim Smith's avatar
Tim Smith committed
107 108 109
Put `depends 'yum'` in your metadata.rb to gain access to the yum_repository resource.

## License & Authors
Tim Smith's avatar
Tim Smith committed
110

111
- Author:: Eric G. Wolfe
Tim Smith's avatar
Tim Smith committed
112 113 114
- Author:: Matt Ray ([matt@chef.io](mailto:matt@chef.io))
- Author:: Joshua Timberman ([joshua@chef.io](mailto:joshua@chef.io))
- Author:: Sean OMeara ([someara@chef.io](mailto:someara@chef.io))
mattray's avatar
mattray committed
115

Seth Vargo's avatar
Seth Vargo committed
116 117
```text
Copyright:: 2011 Eric G. Wolfe
118
Copyright:: 2013-2017 Chef Software, Inc.
mattray's avatar
mattray committed
119 120 121 122 123 124 125 126 127 128 129 130

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Seth Vargo's avatar
Seth Vargo committed
131
```