You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-51Lines changed: 9 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ May work with or without modification on other Debian derivatives.
15
15
16
16
### Chef
17
17
18
-
- Chef 12.9+
18
+
- Chef 13.3+
19
19
20
20
### Cookbooks
21
21
@@ -149,55 +149,6 @@ To pull just security updates, set `origins_patterns` to something like `["origi
149
149
150
150
There is an `interface_ipaddress` method that returns the IP address for a particular host and interface, used by the `cacher-client` recipe. To enable it on the server use the `['apt']['cacher_interface']` attribute.
151
151
152
-
## Resources/Providers
153
-
154
-
### apt_preference
155
-
156
-
This resource provides an easy way to pin packages in /etc/apt/preferences.d. Although apt-pinning is quite helpful from time to time please note that Debian does not encourage its use without thorough consideration.
157
-
158
-
Further information regarding apt-pinning is available via <https://wiki.debian.org/AptPreferences>.
159
-
160
-
#### Actions
161
-
162
-
-`:add`: creates a preferences file under /etc/apt/preferences.d
163
-
-`:remove`: Removes the file, therefore unpin the package
164
-
165
-
#### Attribute Parameters
166
-
167
-
- package_name: name attribute. The name of the package
168
-
- glob: Pin by glob() expression or regexp surrounded by /.
169
-
- pin: The package version/repository to pin
170
-
- pin_priority: The pinning priority aka "the highest package version wins" (required)
171
-
172
-
#### Examples
173
-
174
-
Pin libmysqlclient16 to version 5.1.49-3:
175
-
176
-
```ruby
177
-
apt_preference 'libmysqlclient16'do
178
-
pin 'version 5.1.49-3'
179
-
pin_priority '700'
180
-
end
181
-
```
182
-
183
-
Unpin libmysqlclient16:
184
-
185
-
```ruby
186
-
apt_preference 'libmysqlclient16'do
187
-
action :remove
188
-
end
189
-
```
190
-
191
-
Pin all packages from dotdeb.org:
192
-
193
-
```ruby
194
-
apt_preference 'dotdeb'do
195
-
glob '*'
196
-
pin 'origin packages.dotdeb.org'
197
-
pin_priority '700'
198
-
end
199
-
```
200
-
201
152
## Usage
202
153
203
154
Put `recipe[apt]` first in the run list. If you have other recipes that you want to use to configure how apt behaves, like new sources, notify the execute resource to run, e.g.:
@@ -214,6 +165,14 @@ Put `recipe[apt::cacher-ng]` in the run_list for a server to provide APT caching
214
165
215
166
If you want to cleanup unused packages, there is also the `apt-get autoclean` and `apt-get autoremove` resources provided for automated cleanup.
216
167
168
+
## Resources
169
+
170
+
### apt_preference
171
+
172
+
The apt_preference resource has been moved into chef-client in Chef 13.3.
173
+
174
+
See <https://docs.chef.io/resource_apt_preference.html> for usage details
175
+
217
176
### apt_repository
218
177
219
178
The apt_repository resource has been moved into chef-client in Chef 12.9.
@@ -232,7 +191,6 @@ This cookbook is maintained by Chef's Community Cookbook Engineering team. Our g
0 commit comments