cookbook 'reposync', '~> 0.1.2'
reposync (2) Versions 0.1.2 Follow0
Installs/Configures reposync
cookbook 'reposync', '~> 0.1.2', :supermarket
knife supermarket install reposync
knife supermarket download reposync
kernel-modules Cookbook
Mirror rpm repository with reposync
.
Requirements:
Platforms
- Centos 6.x/7.x
- Rhel 6.x/7.x
Chef
- Chef version: >= 12.5.1
Attributes
kernel_modules
-
node['reposync']['prefix']
- use to set configuration directory (Default:/etc/reposync.d
) -
node['reposync']['dest_dir']
- use to define where to store the Mirror
Usage
Using this cookbook will mirror any rpm repository based on the tool reposync
.
The default
recipe is a requirement before using the provider.
For instance:
ruby
include_recipe 'reposync'
reposync_mirror 'couchbase' do
repofile 'http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo'
update 'chef'
end
Providers & Resources
reposync_mirror
This provider allows to mirror a rpm repository
Actions
Action | Description |
---|---|
create | Create a mirror |
delete | Remove a mirrorred repository |
Property
Name | Description | Default | Type |
---|---|---|---|
reponame |
repository name | name | String |
repofile |
In case the repository maintainer already provides a repository file | nil | URL identifier |
baseurl |
In case the repository uses a baseurl | nil | URL identifier |
cookbook |
The cookbook where to find the template for the reposync configuration | cookbook | String |
update |
The repository refresher method | daily | See Refreshers Methods |
hour |
The hour when to run the refresher if not launched by chef | * | String |
minute |
The minute when to run the refresher if not launched by chef | 0 | String |
weekday |
The weekday when to run the refresher if not launched by chef | 0 | String |
timeout |
The timeout before stopping the mirrorring | 7200 | String |
remove_repo |
Define if a repository has be removed once it is deleted | true | Boolean |
conf_dir |
Define configuration directory | /etc/reposync.d | String |
dest_dir |
Define destination directory | /var/opt/reposync | String |
cmd_args |
Define additional command line arguments | nil | [String, nil] |
References:
* The URL identifier
are defined as follow:
Protocol | Definition |
---|---|
HTTP URL | http:// |
FTP URL | ftp:// |
File | file:// |
- Refresher Methods
Name | Frequence |
---|---|
daily |
Once a daily |
weekly |
Once a weekly |
chef |
Every chef run |
For instance:
``` ruby
To mirror PowerDNS repositories at every chef run
include_recipe 'reposync'
reposync_mirror 'PowerDNS Auth 40' do
repofile 'https://repo.powerdns.com/repo-files/centos-auth-40.repo'
update 'chef'
end
default['reposync_config']['mirror'] = {
'couchbase' => {
repofile: 'http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo',
weekday: '',
},
'grafana-7' => {
baseurl: 'https://packagecloud.io/grafana/stable/el/7/x86_64',
weekday: '',
},
}
node['reposync_config']['mirror'].each do |repo_name, repo_config|
reposync_mirror repo_name do
repo_config.each do |k, v|
instance_variable_set "@#{k}", v
end
end
end
Contributing
------------
1. Fork the [repository on Github][repository]
2. Create a named feature branch (like `add_component_x`)
3. Write your change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: [Jeremy Mauro][author] ()
```text
Copyright 2014-2015, Criteo.
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.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.2 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.2 passed this metric
No Binaries Metric
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 failed this metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.2 passed this metric
No Binaries Metric
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 passed this metric
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 failed this metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number