from-scratch 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Berksfile +2 -1
- data/Berksfile.lock +20 -1
- data/cookbooks/bluepill/CHANGELOG.md +93 -0
- data/cookbooks/bluepill/README.md +91 -0
- data/cookbooks/bluepill/attributes/default.rb +44 -0
- data/cookbooks/bluepill/metadata.json +1 -0
- data/cookbooks/bluepill/providers/service.rb +172 -0
- data/cookbooks/bluepill/recipes/default.rb +48 -0
- data/cookbooks/bluepill/recipes/rsyslog.rb +28 -0
- data/cookbooks/bluepill/resources/service.rb +27 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.fedora.erb +34 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.freebsd.erb +32 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.lsb.erb +37 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.rhel.erb +34 -0
- data/cookbooks/bluepill/templates/default/bluepill_rsyslog.conf.erb +1 -0
- data/cookbooks/nginx/CHANGELOG.md +435 -0
- data/cookbooks/nginx/README.md +521 -0
- data/cookbooks/nginx/attributes/auth_request.rb +23 -0
- data/cookbooks/nginx/attributes/default.rb +131 -0
- data/cookbooks/nginx/attributes/devel.rb +24 -0
- data/cookbooks/nginx/attributes/echo.rb +24 -0
- data/cookbooks/nginx/attributes/geoip.rb +31 -0
- data/cookbooks/nginx/attributes/headers_more.rb +24 -0
- data/cookbooks/nginx/attributes/lua.rb +28 -0
- data/cookbooks/nginx/attributes/naxsi.rb +24 -0
- data/cookbooks/nginx/attributes/openssl_source.rb +23 -0
- data/cookbooks/nginx/attributes/pagespeed.rb +9 -0
- data/cookbooks/nginx/attributes/passenger.rb +58 -0
- data/cookbooks/nginx/attributes/rate_limiting.rb +23 -0
- data/cookbooks/nginx/attributes/repo.rb +35 -0
- data/cookbooks/nginx/attributes/set_misc.rb +8 -0
- data/cookbooks/nginx/attributes/socketproxy.rb +13 -0
- data/cookbooks/nginx/attributes/source.rb +42 -0
- data/cookbooks/nginx/attributes/status.rb +22 -0
- data/cookbooks/nginx/attributes/syslog.rb +24 -0
- data/cookbooks/nginx/attributes/upload_progress.rb +26 -0
- data/cookbooks/nginx/definitions/nginx_site.rb +50 -0
- data/cookbooks/nginx/files/default/mime.types +78 -0
- data/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
- data/cookbooks/nginx/libraries/matchers.rb +20 -0
- data/cookbooks/nginx/metadata.json +351 -0
- data/cookbooks/nginx/recipes/authorized_ips.rb +32 -0
- data/cookbooks/nginx/recipes/commons.rb +24 -0
- data/cookbooks/nginx/recipes/commons_conf.rb +42 -0
- data/cookbooks/nginx/recipes/commons_dir.rb +57 -0
- data/cookbooks/nginx/recipes/commons_script.rb +29 -0
- data/cookbooks/nginx/recipes/default.rb +31 -0
- data/cookbooks/nginx/recipes/headers_more_module.rb +50 -0
- data/cookbooks/nginx/recipes/http_auth_request_module.rb +52 -0
- data/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
- data/cookbooks/nginx/recipes/http_geoip_module.rb +113 -0
- data/cookbooks/nginx/recipes/http_gzip_static_module.rb +30 -0
- data/cookbooks/nginx/recipes/http_mp4_module.rb +2 -0
- data/cookbooks/nginx/recipes/http_perl_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_realip_module.rb +38 -0
- data/cookbooks/nginx/recipes/http_spdy_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
- data/cookbooks/nginx/recipes/ipv6.rb +23 -0
- data/cookbooks/nginx/recipes/lua.rb +47 -0
- data/cookbooks/nginx/recipes/naxsi_module.rb +52 -0
- data/cookbooks/nginx/recipes/ngx_devel_module.rb +44 -0
- data/cookbooks/nginx/recipes/ngx_lua_module.rb +47 -0
- data/cookbooks/nginx/recipes/ohai_plugin.rb +35 -0
- data/cookbooks/nginx/recipes/openssl_source.rb +45 -0
- data/cookbooks/nginx/recipes/package.rb +52 -0
- data/cookbooks/nginx/recipes/pagespeed_module.rb +62 -0
- data/cookbooks/nginx/recipes/passenger.rb +56 -0
- data/cookbooks/nginx/recipes/repo.rb +41 -0
- data/cookbooks/nginx/recipes/repo_passenger.rb +39 -0
- data/cookbooks/nginx/recipes/set_misc.rb +30 -0
- data/cookbooks/nginx/recipes/socketproxy.rb +26 -0
- data/cookbooks/nginx/recipes/source.rb +205 -0
- data/cookbooks/nginx/recipes/syslog_module.rb +69 -0
- data/cookbooks/nginx/recipes/upload_progress_module.rb +53 -0
- data/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
- data/cookbooks/nginx/templates/default/default-site.erb +11 -0
- data/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
- data/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
- data/cookbooks/nginx/templates/default/modules/http_gzip_static.conf.erb +1 -0
- data/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +7 -0
- data/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
- data/cookbooks/nginx/templates/default/modules/passenger.conf.erb +13 -0
- data/cookbooks/nginx/templates/default/modules/socketproxy.conf.erb +89 -0
- data/cookbooks/nginx/templates/default/modules/upload_progress.erb +4 -0
- data/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +39 -0
- data/cookbooks/nginx/templates/default/nginx.conf.erb +103 -0
- data/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
- data/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
- data/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
- data/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
- data/cookbooks/nginx/templates/default/nxensite.erb +38 -0
- data/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
- data/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
- data/cookbooks/nginx/templates/default/sv-nginx-run.erb +4 -0
- data/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
- data/cookbooks/nginx/templates/suse/nginx.init.erb +115 -0
- data/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
- data/cookbooks/ohai/CHANGELOG.md +69 -0
- data/cookbooks/ohai/README.md +89 -0
- data/cookbooks/ohai/attributes/default.rb +31 -0
- data/cookbooks/ohai/files/default/plugins/README +1 -0
- data/cookbooks/ohai/libraries/matchers.rb +14 -0
- data/cookbooks/ohai/metadata.json +1 -0
- data/cookbooks/ohai/providers/hint.rb +38 -0
- data/cookbooks/ohai/recipes/default.rb +52 -0
- data/cookbooks/ohai/resources/hint.rb +5 -0
- data/cookbooks/packagecloud/CHANGELOG.md +12 -0
- data/cookbooks/packagecloud/README.md +80 -0
- data/cookbooks/packagecloud/attributes/default.rb +8 -0
- data/cookbooks/packagecloud/libraries/helper.rb +43 -0
- data/cookbooks/packagecloud/libraries/matcher.rb +7 -0
- data/cookbooks/packagecloud/metadata.json +1 -0
- data/cookbooks/packagecloud/providers/repo.rb +212 -0
- data/cookbooks/packagecloud/resources/repo.rb +10 -0
- data/cookbooks/packagecloud/templates/.kitchen/logs/kitchen.log +29 -0
- data/cookbooks/packagecloud/templates/default/apt.erb +2 -0
- data/cookbooks/packagecloud/templates/default/yum.erb +15 -0
- data/cookbooks/rsyslog/CHANGELOG.md +193 -0
- data/cookbooks/rsyslog/README.md +276 -0
- data/cookbooks/rsyslog/attributes/default.rb +131 -0
- data/cookbooks/rsyslog/libraries/helpers.rb +25 -0
- data/cookbooks/rsyslog/metadata.json +1 -0
- data/cookbooks/rsyslog/providers/file_input.rb +44 -0
- data/cookbooks/rsyslog/recipes/client.rb +87 -0
- data/cookbooks/rsyslog/recipes/default.rb +89 -0
- data/cookbooks/rsyslog/recipes/server.rb +44 -0
- data/cookbooks/rsyslog/resources/file_input.rb +28 -0
- data/cookbooks/rsyslog/templates/default/35-server-per-host.conf.erb +62 -0
- data/cookbooks/rsyslog/templates/default/49-relp.conf.erb +10 -0
- data/cookbooks/rsyslog/templates/default/49-remote.conf.erb +30 -0
- data/cookbooks/rsyslog/templates/default/50-default.conf.erb +6 -0
- data/cookbooks/rsyslog/templates/default/file-input.conf.erb +15 -0
- data/cookbooks/rsyslog/templates/default/omnios-manifest.xml.erb +30 -0
- data/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +117 -0
- data/cookbooks/rsyslog/templates/smartos/50-default.conf.erb +18 -0
- data/cookbooks/runit/.kitchen.cloud.yml +103 -0
- data/cookbooks/runit/.kitchen.yml +38 -0
- data/cookbooks/runit/.rspec +3 -0
- data/cookbooks/runit/.rubocop.yml +45 -0
- data/cookbooks/runit/Berksfile.disabled +11 -0
- data/cookbooks/runit/CHANGELOG.md +226 -0
- data/cookbooks/runit/CONTRIBUTING.md +266 -0
- data/cookbooks/runit/Cheffile +11 -0
- data/cookbooks/runit/Gemfile +17 -0
- data/cookbooks/runit/LICENSE +201 -0
- data/cookbooks/runit/README.md +435 -0
- data/cookbooks/runit/Rakefile +23 -0
- data/cookbooks/runit/TESTING.md +26 -0
- data/cookbooks/runit/attributes/default.rb +62 -0
- data/cookbooks/runit/files/default/runit.seed +1 -0
- data/cookbooks/runit/files/default/runsvdir +0 -0
- data/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/cookbooks/runit/libraries/default.rb +0 -0
- data/cookbooks/runit/libraries/helpers.rb +190 -0
- data/cookbooks/runit/libraries/matchers.rb +69 -0
- data/cookbooks/runit/libraries/provider_runit_service.rb +326 -0
- data/cookbooks/runit/libraries/resource_runit_service.rb +267 -0
- data/cookbooks/runit/metadata.json +50 -0
- data/cookbooks/runit/recipes/default.rb +91 -0
- data/cookbooks/runit/templates/debian/init.d.erb +66 -0
- data/cookbooks/runit/templates/default/log-config.erb +24 -0
- data/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/cookbooks/scratchify/Berksfile +2 -1
- data/cookbooks/scratchify/Berksfile.lock +20 -1
- data/cookbooks/scratchify/lib/from-scratch.rb +1 -4
- data/cookbooks/scratchify/lib/from-scratch/version.rb +1 -1
- data/cookbooks/scratchify/metadata.json +5 -2
- data/cookbooks/scratchify/recipes/default.rb +15 -1
- data/cookbooks/scratchify/recipes/nginx_site.rb +4 -0
- data/cookbooks/scratchify/recipes/pre_rvm.rb +5 -0
- data/cookbooks/scratchify/templates/nginx.erb +31 -0
- data/cookbooks/scratchify/templates/node.json.erb +21 -6
- data/cookbooks/yum-epel/CHANGELOG.md +84 -0
- data/cookbooks/yum-epel/README.md +172 -0
- data/cookbooks/yum-epel/attributes/default.rb +1 -0
- data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-source.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing-source.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel.rb +28 -0
- data/cookbooks/yum-epel/metadata.json +1 -0
- data/cookbooks/yum-epel/recipes/default.rb +61 -0
- data/cookbooks/yum/CHANGELOG.md +294 -0
- data/cookbooks/yum/README.md +285 -0
- data/cookbooks/yum/attributes/main.rb +100 -0
- data/cookbooks/yum/libraries/matchers.rb +27 -0
- data/cookbooks/yum/metadata.json +1 -0
- data/cookbooks/yum/providers/globalconfig.rb +41 -0
- data/cookbooks/yum/providers/repository.rb +106 -0
- data/cookbooks/yum/recipes/default.rb +26 -0
- data/cookbooks/yum/resources/globalconfig.rb +109 -0
- data/cookbooks/yum/resources/repository.rb +69 -0
- data/cookbooks/yum/templates/default/main.erb +276 -0
- data/cookbooks/yum/templates/default/repo.erb +125 -0
- data/lib/from-scratch.rb +1 -0
- data/lib/from-scratch/version.rb +1 -1
- data/metadata.rb +5 -1
- data/recipes/default.rb +15 -1
- data/recipes/nginx_site.rb +4 -0
- data/recipes/pre_rvm.rb +5 -0
- data/templates/nginx.erb +31 -0
- data/templates/node.json.erb +21 -6
- metadata +194 -1
@@ -0,0 +1,285 @@
|
|
1
|
+
yum Cookbook
|
2
|
+
============
|
3
|
+
[![Build Status](https://travis-ci.org/chef-cookbooks/yum.svg?branch=master)](http://travis-ci.org/chef-cookbooks/yum)
|
4
|
+
[![Cookbook Version](https://img.shields.io/cookbook/v/yum.svg)](https://supermarket.chef.io/cookbooks/yum)
|
5
|
+
|
6
|
+
The Yum cookbook exposes the `yum_globalconfig` and `yum_repository`
|
7
|
+
resources that allows a user to both control global behavior and make
|
8
|
+
individual Yum repositories available for use. These resources aim to
|
9
|
+
allow the user to configure all options listed in the `yum.conf` man
|
10
|
+
page, found at http://linux.die.net/man/5/yum.conf
|
11
|
+
|
12
|
+
NOTES
|
13
|
+
-----
|
14
|
+
WARNING: Yum cookbook version 3.0.0 and above contain non-backwards
|
15
|
+
compatible breaking changes and will not work with cookbooks written
|
16
|
+
against the 2.x and 1.x series. Changes have been made to the
|
17
|
+
yum_repository resource, and the yum_key resource has been eliminated
|
18
|
+
entirely. Recipes have been eliminated and moved into their own
|
19
|
+
cookbooks. Please lock yum to the 2.x series in your Chef environments
|
20
|
+
until all dependent cookbooks have been ported.
|
21
|
+
|
22
|
+
Requirements
|
23
|
+
------------
|
24
|
+
#### Platforms
|
25
|
+
* RHEL/CentOS and derivatives
|
26
|
+
* Fedora
|
27
|
+
|
28
|
+
#### Chef
|
29
|
+
* Chef 11+
|
30
|
+
|
31
|
+
#### Cookbooks
|
32
|
+
* none
|
33
|
+
|
34
|
+
Resources/Providers
|
35
|
+
-------------------
|
36
|
+
### yum_repository
|
37
|
+
This resource manages a yum repository configuration file at
|
38
|
+
/etc/yum.repos.d/`repositoryid`.repo. When the file needs to be
|
39
|
+
repaired, it calls yum-makecache so packages in the repo become
|
40
|
+
available to the next resource.
|
41
|
+
|
42
|
+
#### Example
|
43
|
+
``` ruby
|
44
|
+
# add the Zenoss repository
|
45
|
+
yum_repository 'zenoss' do
|
46
|
+
description "Zenoss Stable repo"
|
47
|
+
baseurl "http://dev.zenoss.com/yum/stable/"
|
48
|
+
gpgkey 'http://dev.zenoss.com/yum/RPM-GPG-KEY-zenoss'
|
49
|
+
action :create
|
50
|
+
end
|
51
|
+
|
52
|
+
# add the EPEL repo
|
53
|
+
yum_repository 'epel' do
|
54
|
+
description 'Extra Packages for Enterprise Linux'
|
55
|
+
mirrorlist 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
56
|
+
gpgkey 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
57
|
+
action :create
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
``` ruby
|
62
|
+
# delete CentOS-Media repo
|
63
|
+
yum_repository 'CentOS-Media' do
|
64
|
+
action :delete
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
#### Actions
|
69
|
+
- `:create` - creates a repository file and builds the repository listing
|
70
|
+
- `:delete` - deletes the repository file
|
71
|
+
- `:makecache` - update yum cache
|
72
|
+
|
73
|
+
#### Parameters
|
74
|
+
* `baseurl` - Must be a URL to the directory where the yum repository's
|
75
|
+
'repodata' directory lives. Can be an http://, ftp:// or file://
|
76
|
+
URL. You can specify multiple URLs in one baseurl statement.
|
77
|
+
* `cost` - relative cost of accessing this repository. Useful for
|
78
|
+
weighing one repo's packages as greater/less than any other.
|
79
|
+
defaults to 1000
|
80
|
+
* `clean_headers` - Run "yum clean headers <reponame>" during
|
81
|
+
repository creation. defaults to true.
|
82
|
+
* `description` - Maps to the 'name' parameter in a repository .conf.
|
83
|
+
Descriptive name for the repository channel. This directive must be
|
84
|
+
specified.
|
85
|
+
* `enabled` - Either `true` or `false`. This tells yum whether or not use this repository.
|
86
|
+
* `enablegroups` - Either `true` or `false`. Determines whether yum
|
87
|
+
will allow the use of package groups for this repository. Default is
|
88
|
+
`true` (package groups are allowed).
|
89
|
+
* `exclude` - List of packages to exclude from updates or installs. This
|
90
|
+
should be a space separated list in a single string. Shell globs using wildcards (eg. *
|
91
|
+
and ?) are allowed.
|
92
|
+
* `failovermethod` - Either 'roundrobin' or 'priority'.
|
93
|
+
* `fastestmirror_enabled` - Either `true` or `false`
|
94
|
+
* `gpgcheck` - Either `true` or `false`. This tells yum whether or not
|
95
|
+
it should perform a GPG signature check on packages. When this is
|
96
|
+
set in the [main] section it sets the default for all repositories.
|
97
|
+
The default is `true`.
|
98
|
+
* `gpgkey` - A URL pointing to the ASCII-armored GPG key file for the
|
99
|
+
repository. This option is used if yum needs a public key to verify
|
100
|
+
a package and the required key hasn't been imported into the RPM
|
101
|
+
database. If this option is set, yum will automatically import the
|
102
|
+
key from the specified URL.
|
103
|
+
* `http_caching` - Either 'all', 'packages', or 'none'. Determines how
|
104
|
+
upstream HTTP caches are instructed to handle any HTTP downloads
|
105
|
+
that Yum does. Defaults to 'all'
|
106
|
+
* `includepkgs` - Inverse of exclude. This is a list of packages you
|
107
|
+
want to use from a repository. If this option lists only one package
|
108
|
+
then that is all yum will ever see from the repository. Defaults to
|
109
|
+
an empty list.
|
110
|
+
* `keepalive` - Either `true` or `false`. This tells yum whether or not
|
111
|
+
HTTP/1.1 keepalive should be used with this repository.
|
112
|
+
* `make_cache` - Optional, Default is `true`, if `false` then `yum -q makecache` will not
|
113
|
+
be ran
|
114
|
+
* `max_retries` - Set the number of times any attempt to retrieve a file
|
115
|
+
should retry before returning an error. Setting this to '0' makes
|
116
|
+
yum try forever. Default is '10'.
|
117
|
+
* `metadata_expire` - Time (in seconds) after which the metadata will
|
118
|
+
expire. So that if the current metadata downloaded is less than this
|
119
|
+
many seconds old then yum will not update the metadata against the
|
120
|
+
repository. If you find that yum is not downloading information on
|
121
|
+
updates as often as you would like lower the value of this option.
|
122
|
+
You can also change from the default of using seconds to using days,
|
123
|
+
hours or minutes by appending a d, h or m respectively. The default
|
124
|
+
is 6 hours, to compliment yum-updatesd running once an hour. It's
|
125
|
+
also possible to use the word "never", meaning that the metadata
|
126
|
+
will never expire. Note that when using a metalink file the metalink
|
127
|
+
must always be newer than the metadata for the repository, due to
|
128
|
+
the validation, so this timeout also applies to the metalink file.
|
129
|
+
* `mirrorlist` - Specifies a URL to a file containing a list of
|
130
|
+
baseurls. This can be used instead of or with the baseurl option.
|
131
|
+
Substitution variables, described below, can be used with this
|
132
|
+
option. As a special hack is the mirrorlist URL contains the word
|
133
|
+
"metalink" then the value of mirrorlist is copied to metalink (if
|
134
|
+
metalink is not set)
|
135
|
+
* `mirror_expire` - Time (in seconds) after which the mirrorlist locally
|
136
|
+
cached will expire. If the current mirrorlist is less than this many
|
137
|
+
seconds old then yum will not download another copy of the
|
138
|
+
mirrorlist, it has the same extra format as metadata_expire. If you
|
139
|
+
find that yum is not downloading the mirrorlists as often as you
|
140
|
+
would like lower the value of this option.
|
141
|
+
* `mirrorlist_expire` - alias for mirror_expire
|
142
|
+
* `mode` - Permissions mode of .repo file on disk. Useful for
|
143
|
+
scenarios where secrets are in the repo file. If set to '600',
|
144
|
+
normal users will not be able to use yum search, yum info, etc.
|
145
|
+
Defaults to '0644'
|
146
|
+
* `priority` - When the yum-priorities plug-in is enabled, you set
|
147
|
+
priorities on repository entries, where N is an integer from 1 to 99. The
|
148
|
+
default priority for repositories is 99.
|
149
|
+
* `proxy` - URL to the proxy server that yum should use.
|
150
|
+
* `proxy_username` - username to use for proxy
|
151
|
+
* `proxy_password` - password for this proxy
|
152
|
+
* `report_instanceid` - Report instance ID when using Amazon Linux AMIs
|
153
|
+
and repositories
|
154
|
+
* `repositoryid` - Must be a unique name for each repository, one word.
|
155
|
+
Defaults to name attribute.
|
156
|
+
* `source` - Use a custom template source instead of the default one
|
157
|
+
in the yum cookbook
|
158
|
+
* `sslcacert` - Path to the directory containing the databases of the
|
159
|
+
certificate authorities yum should use to verify SSL certificates.
|
160
|
+
Defaults to none - uses system default
|
161
|
+
* `sslclientcert` - Path to the SSL client certificate yum should use to
|
162
|
+
connect to repos/remote sites Defaults to none.
|
163
|
+
* `sslclientkey` - Path to the SSL client key yum should use to connect
|
164
|
+
to repos/remote sites Defaults to none.
|
165
|
+
* `sslverify` - Either `true` or `false`. Determines if yum will verify SSL certificates/hosts. Defaults to `true`
|
166
|
+
* `timeout` - Number of seconds to wait for a connection before timing
|
167
|
+
out. Defaults to 30 seconds. This may be too short of a time for
|
168
|
+
extremely overloaded sites.
|
169
|
+
|
170
|
+
### yum_globalconfig
|
171
|
+
This renders a template with global yum configuration parameters. The
|
172
|
+
default recipe uses it to render `/etc/yum.conf`. It is flexible
|
173
|
+
enough to be used in other scenarios, such as building RPMs in
|
174
|
+
isolation by modifying `installroot`.
|
175
|
+
|
176
|
+
#### Example
|
177
|
+
``` ruby
|
178
|
+
yum_globalconfig '/my/chroot/etc/yum.conf' do
|
179
|
+
cachedir '/my/chroot/etc/yum.conf'
|
180
|
+
keepcache 'yes'
|
181
|
+
debuglevel '2'
|
182
|
+
installroot '/my/chroot'
|
183
|
+
action :create
|
184
|
+
end
|
185
|
+
```
|
186
|
+
|
187
|
+
#### Parameters
|
188
|
+
`yum_globalconfig` can take most of the same parameters as a
|
189
|
+
`yum_repository`, plus more, too numerous to describe here. Below are
|
190
|
+
a few of the more commonly used ones. For a complete list, please
|
191
|
+
consult the `yum.conf` man page, found here:
|
192
|
+
http://linux.die.net/man/5/yum.conf
|
193
|
+
|
194
|
+
* `cachedir` - Directory where yum should store its cache and db
|
195
|
+
files. The default is '/var/cache/yum'.
|
196
|
+
* `keepcache` - Either `true` or `false`. Determines whether or not
|
197
|
+
yum keeps the cache of headers and packages after successful
|
198
|
+
installation. Default is `false`
|
199
|
+
* `debuglevel` - Debug message output level. Practical range is 0-10.
|
200
|
+
Default is '2'.
|
201
|
+
* `exclude` - List of packages to exclude from updates or installs.
|
202
|
+
This should be a space separated list. Shell globs using wildcards
|
203
|
+
(eg. * and ?) are allowed.
|
204
|
+
* `installonlypkgs` = List of package provides that should only ever
|
205
|
+
be installed, never updated. Kernels in particular fall into this
|
206
|
+
category. Defaults to kernel, kernel-bigmem, kernel-enterprise,
|
207
|
+
kernel-smp, kernel-debug, kernel-unsupported, kernel-source,
|
208
|
+
kernel-devel, kernel-PAE, kernel-PAE-debug.
|
209
|
+
* `logfile` - Full directory and file name for where yum should write
|
210
|
+
its log file.
|
211
|
+
* `exactarch` - Either `true` or `false`. Set to `true` to make 'yum update' only
|
212
|
+
update the architectures of packages that you have installed. ie:
|
213
|
+
with this enabled yum will not install an i686 package to update an
|
214
|
+
x86_64 package. Default is `true`
|
215
|
+
* `gpgcheck` - Either `true` or `false`. This tells yum whether or not
|
216
|
+
it should perform a GPG signature check on the packages gotten from
|
217
|
+
this repository.
|
218
|
+
|
219
|
+
Recipes
|
220
|
+
-------
|
221
|
+
* `default` - Configures `yum_globalconfig[/etc/yum.conf]` with values
|
222
|
+
found in node attributes at `node['yum']['main']`
|
223
|
+
|
224
|
+
Attributes
|
225
|
+
----------
|
226
|
+
The following attributes are set by default
|
227
|
+
|
228
|
+
``` ruby
|
229
|
+
default['yum']['main']['cachedir'] = '/var/cache/yum/$basearch/$releasever'
|
230
|
+
default['yum']['main']['keepcache'] = false
|
231
|
+
default['yum']['main']['debuglevel'] = nil
|
232
|
+
default['yum']['main']['exclude'] = nil
|
233
|
+
default['yum']['main']['logfile'] = '/var/log/yum.log'
|
234
|
+
default['yum']['main']['exactarch'] = nil
|
235
|
+
default['yum']['main']['obsoletes'] = nil
|
236
|
+
default['yum']['main']['installonly_limit'] = nil
|
237
|
+
default['yum']['main']['installonlypkgs'] = nil
|
238
|
+
default['yum']['main']['installroot'] = nil
|
239
|
+
```
|
240
|
+
|
241
|
+
Related Cookbooks
|
242
|
+
-----------------
|
243
|
+
Recipes from older versions of this cookbook have been moved
|
244
|
+
individual cookbooks. Recipes for managing platform yum configurations
|
245
|
+
and installing specific repositories can be found in one (or more!) of
|
246
|
+
the following cookbook.
|
247
|
+
|
248
|
+
* yum-centos
|
249
|
+
* yum-fedora
|
250
|
+
* yum-amazon
|
251
|
+
* yum-epel
|
252
|
+
* yum-elrepo
|
253
|
+
* yum-repoforge
|
254
|
+
* yum-ius
|
255
|
+
* yum-percona
|
256
|
+
* yum-pgdg
|
257
|
+
|
258
|
+
Usage
|
259
|
+
-----
|
260
|
+
Put `depends 'yum'` in your metadata.rb to gain access to the
|
261
|
+
yum_repository resource.
|
262
|
+
|
263
|
+
License & Authors
|
264
|
+
-----------------
|
265
|
+
- Author:: Eric G. Wolfe
|
266
|
+
- Author:: Matt Ray (<matt@chef.io>)
|
267
|
+
- Author:: Joshua Timberman (<joshua@chef.io>)
|
268
|
+
- Author:: Sean OMeara (<someara@chef.io>)
|
269
|
+
|
270
|
+
```text
|
271
|
+
Copyright:: 2011 Eric G. Wolfe
|
272
|
+
Copyright:: 2013-2014 Chef Software, Inc.
|
273
|
+
|
274
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
275
|
+
you may not use this file except in compliance with the License.
|
276
|
+
You may obtain a copy of the License at
|
277
|
+
|
278
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
279
|
+
|
280
|
+
Unless required by applicable law or agreed to in writing, software
|
281
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
282
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
283
|
+
See the License for the specific language governing permissions and
|
284
|
+
limitations under the License.
|
285
|
+
```
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# http://linux.die.net/man/5/yum.conf
|
2
|
+
case node['platform_version'].to_i
|
3
|
+
when 5
|
4
|
+
default['yum']['main']['cachedir'] = '/var/cache/yum'
|
5
|
+
else
|
6
|
+
default['yum']['main']['cachedir'] = '/var/cache/yum/$basearch/$releasever'
|
7
|
+
end
|
8
|
+
|
9
|
+
case node['platform']
|
10
|
+
when 'amazon'
|
11
|
+
default['yum']['main']['distroverpkg'] = 'system-release'
|
12
|
+
when 'scientific'
|
13
|
+
default['yum']['main']['distroverpkg'] = 'sl-release'
|
14
|
+
when 'redhat'
|
15
|
+
default['yum']['main']['distroverpkg'] = nil
|
16
|
+
else
|
17
|
+
default['yum']['main']['distroverpkg'] = "#{node['platform']}-release"
|
18
|
+
end
|
19
|
+
|
20
|
+
default['yum']['main']['alwaysprompt'] = nil # [TrueClass, FalseClass]
|
21
|
+
default['yum']['main']['assumeyes'] = nil # [TrueClass, FalseClass]
|
22
|
+
default['yum']['main']['bandwidth'] = nil # /^\d+$/
|
23
|
+
default['yum']['main']['bugtracker_url'] = nil # /.*/
|
24
|
+
default['yum']['main']['clean_requirements_on_remove'] = nil # [TrueClass, FalseClass]
|
25
|
+
default['yum']['main']['color'] = nil # %w{ always never }
|
26
|
+
default['yum']['main']['color_list_available_downgrade'] = nil # /.*/
|
27
|
+
default['yum']['main']['color_list_available_install'] = nil # /.*/
|
28
|
+
default['yum']['main']['color_list_available_reinstall'] = nil # /.*/
|
29
|
+
default['yum']['main']['color_list_available_upgrade'] = nil # /.*/
|
30
|
+
default['yum']['main']['color_list_installed_extra'] = nil # /.*/
|
31
|
+
default['yum']['main']['color_list_installed_newer'] = nil # /.*/
|
32
|
+
default['yum']['main']['color_list_installed_older'] = nil # /.*/
|
33
|
+
default['yum']['main']['color_list_installed_reinstall'] = nil # /.*/
|
34
|
+
default['yum']['main']['color_search_match'] = nil # /.*/
|
35
|
+
default['yum']['main']['color_update_installed'] = nil # /.*/
|
36
|
+
default['yum']['main']['color_update_local'] = nil # /.*/
|
37
|
+
default['yum']['main']['color_update_remote'] = nil # /.*/
|
38
|
+
default['yum']['main']['commands'] = nil # /.*/
|
39
|
+
default['yum']['main']['deltarpm'] = nil # [TrueClass, FalseClass]
|
40
|
+
default['yum']['main']['debuglevel'] = nil # /^\d+$/
|
41
|
+
default['yum']['main']['diskspacecheck'] = nil # [TrueClass, FalseClass]
|
42
|
+
default['yum']['main']['enable_group_conditionals'] = nil # [TrueClass, FalseClass]
|
43
|
+
default['yum']['main']['errorlevel'] = nil # /^\d+$/
|
44
|
+
default['yum']['main']['exactarch'] = nil # [TrueClass, FalseClass]
|
45
|
+
default['yum']['main']['exclude'] = nil # /.*/
|
46
|
+
default['yum']['main']['gpgcheck'] = true # [TrueClass, FalseClass]
|
47
|
+
default['yum']['main']['group_package_types'] = nil # /.*/
|
48
|
+
default['yum']['main']['groupremove_leaf_only'] = nil # [TrueClass, FalseClass]
|
49
|
+
default['yum']['main']['history_list_view'] = nil # /.*/
|
50
|
+
default['yum']['main']['history_record'] = nil # [TrueClass, FalseClass]
|
51
|
+
default['yum']['main']['history_record_packages'] = nil # /.*/
|
52
|
+
default['yum']['main']['http_caching'] = nil # %w{ packages all none }
|
53
|
+
default['yum']['main']['installonly_limit'] = nil # /\d+/, /keep/
|
54
|
+
default['yum']['main']['installonlypkgs'] = nil # /.*/
|
55
|
+
default['yum']['main']['installroot'] = nil # /.*/
|
56
|
+
default['yum']['main']['keepalive'] = nil # [TrueClass, FalseClass]
|
57
|
+
default['yum']['main']['keepcache'] = false # [TrueClass, FalseClass]
|
58
|
+
default['yum']['main']['kernelpkgnames'] = nil # /.*/
|
59
|
+
default['yum']['main']['localpkg_gpgcheck'] = false # [TrueClass,# FalseClass]
|
60
|
+
default['yum']['main']['logfile'] = '/var/log/yum.log' # /.*/
|
61
|
+
default['yum']['main']['max_retries'] = nil # /^\d+$/
|
62
|
+
default['yum']['main']['mdpolicy'] = nil # %w{ packages all none }
|
63
|
+
default['yum']['main']['metadata_expire'] = nil # /^\d+$/
|
64
|
+
default['yum']['main']['mirrorlist_expire'] = nil # /^\d+$/
|
65
|
+
default['yum']['main']['multilib_policy'] = nil # %w{ all best }
|
66
|
+
default['yum']['main']['obsoletes'] = nil # [TrueClass, FalseClass]
|
67
|
+
default['yum']['main']['overwrite_groups'] = nil # [TrueClass, FalseClass]
|
68
|
+
default['yum']['main']['password'] = nil # /.*/
|
69
|
+
default['yum']['main']['path'] = '/etc/yum.conf' # /.*/
|
70
|
+
default['yum']['main']['persistdir'] = nil # /.*/
|
71
|
+
default['yum']['main']['pluginconfpath'] = nil # /.*/
|
72
|
+
default['yum']['main']['pluginpath'] = nil # /.*/
|
73
|
+
default['yum']['main']['plugins'] = nil # [TrueClass, FalseClass]
|
74
|
+
default['yum']['main']['protected_multilib'] = nil # /.*/
|
75
|
+
default['yum']['main']['protected_packages'] = nil # /.*/
|
76
|
+
default['yum']['main']['proxy'] = nil # /.*/
|
77
|
+
default['yum']['main']['proxy_password'] = nil # /.*/
|
78
|
+
default['yum']['main']['proxy_username'] = nil # /.*/
|
79
|
+
default['yum']['main']['password'] = nil # /.*/
|
80
|
+
default['yum']['main']['recent'] = nil # /^\d+$/
|
81
|
+
default['yum']['main']['releasever'] = nil # /.*/
|
82
|
+
default['yum']['main']['repo_gpgcheck'] = nil # [TrueClass, FalseClass]
|
83
|
+
default['yum']['main']['reposdir'] = nil # /.*/
|
84
|
+
default['yum']['main']['reset_nice'] = nil # [TrueClass, FalseClass]
|
85
|
+
default['yum']['main']['rpmverbosity'] = nil # %w{ info critical# emergency error warn debug }
|
86
|
+
default['yum']['main']['showdupesfromrepos'] = nil # [TrueClass, FalseClass]
|
87
|
+
default['yum']['main']['skip_broken'] = nil # [TrueClass, FalseClass]
|
88
|
+
default['yum']['main']['ssl_check_cert_permissions'] = nil # [TrueClass, FalseClass]
|
89
|
+
default['yum']['main']['sslcacert'] = nil # /.*/
|
90
|
+
default['yum']['main']['sslclientcert'] = nil # /.*/
|
91
|
+
default['yum']['main']['sslclientkey'] = nil # /.*/
|
92
|
+
default['yum']['main']['sslverify'] = nil # [TrueClass, FalseClass]
|
93
|
+
default['yum']['main']['syslog_device'] = nil # /.*/
|
94
|
+
default['yum']['main']['syslog_facility'] = nil # /.*/
|
95
|
+
default['yum']['main']['syslog_ident'] = nil # /.*/
|
96
|
+
default['yum']['main']['throttle'] = nil # [/\d+k/, /\d+M/, /\d+G/]
|
97
|
+
default['yum']['main']['timeout'] = nil # /\d+/
|
98
|
+
default['yum']['main']['tolerant'] = false
|
99
|
+
default['yum']['main']['tsflags'] = nil # /.*/
|
100
|
+
default['yum']['main']['username'] = nil # /.*/
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Matchers for chefspec 3
|
2
|
+
|
3
|
+
if defined?(ChefSpec)
|
4
|
+
def create_yum_repository(resource_name)
|
5
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :create, resource_name)
|
6
|
+
end
|
7
|
+
|
8
|
+
def add_yum_repository(resource_name)
|
9
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :add, resource_name)
|
10
|
+
end
|
11
|
+
|
12
|
+
def delete_yum_repository(resource_name)
|
13
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :delete, resource_name)
|
14
|
+
end
|
15
|
+
|
16
|
+
def remove_yum_repository(resource_name)
|
17
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :remove, resource_name)
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_yum_globalconfig(resource_name)
|
21
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_globalconfig, :create, resource_name)
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete_yum_globalconfig(resource_name)
|
25
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_globalconfig, :delete, resource_name)
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"yum","version":"3.8.1","description":"Configures various yum components on Red Hat-like systems","long_description":"","maintainer":"Chef Software, Inc.","maintainer_email":"cookbooks@chef.io","license":"Apache 2.0","platforms":{"amazon":">= 0.0.0","centos":">= 0.0.0","fedora":">= 0.0.0","oracle":">= 0.0.0","redhat":">= 0.0.0","scientific":">= 0.0.0"},"dependencies":{},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{}}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: yum
|
3
|
+
# Provider:: repository
|
4
|
+
#
|
5
|
+
# Author:: Sean OMeara <someara@chef.io>
|
6
|
+
# Copyright 2013, Chef
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
# Allow for Chef 10 support
|
22
|
+
use_inline_resources if defined?(use_inline_resources)
|
23
|
+
|
24
|
+
def whyrun_supported?
|
25
|
+
true
|
26
|
+
end
|
27
|
+
|
28
|
+
action :create do
|
29
|
+
template new_resource.path do
|
30
|
+
source 'main.erb'
|
31
|
+
cookbook 'yum'
|
32
|
+
mode '0644'
|
33
|
+
variables(config: new_resource)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
action :delete do
|
38
|
+
file new_resource.path do
|
39
|
+
action :delete
|
40
|
+
end
|
41
|
+
end
|