https://github.com/moritzheiber/mitamae-plugin-resource-apt-repository
https://github.com/moritzheiber/mitamae-plugin-resource-apt-repository
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/moritzheiber/mitamae-plugin-resource-apt-repository
- Owner: moritzheiber
- License: mit
- Created: 2018-06-28T14:01:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-15T08:32:41.000Z (over 7 years ago)
- Last Synced: 2025-01-25T05:44:25.798Z (over 1 year ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MItamae::Plugin::Resource::AptRepository
This mitamae plugin is supposed to handle:
- Adding and removing Debian/Ubuntu repositories, including GPG signing keys, either as GPG key id (which you can also supply a keyserver for) or as a downloadable URL
- Adding and removing PPA repositories on Ubuntu-compatible systems
_Note: This module will install the `gpg` package if it isn't installed yet and you're specifying a key to be imported_
## Usage
The `name` attribute can be used to specify the URL:
```ruby
apt_repository 'https://my.repo/ubuntu bionic main'
```
or you can use the `url` attribute:
```ruby
apt_repository 'my repo' do
url 'https://my.repo/ubuntu bionic main'
end
```
### with GPG key id
By default, keys are imported using `keyserver.ubuntu.com`.
```ruby
apt_repository 'my repo' do
url 'https://some.repository/debian stable main'
gpg_key '1234567890'
end
```
#### Specifying a keyserver
Optionally, you can specify the keyserver to fetch the repository key from.
```ruby
apt_repository 'some repo' do
url 'https://some.repo/ubuntu bionic universe'
gpg_key '1234567890'
keyserver 'https://keyserver.some.url:80'
```
### with a URL to a GPG key
_Note: The key's validity is not verified, I might add this at a later point in time._
```ruby
apt_repository 'something' do
url 'https://some.repo'
gpg_key 'https://some.repo/key.asc'
end
```
### Support for PPAs
The plugin also supports adding PPAs:
```ruby
apt_repository 'brightbox' do
url 'ppa:brightbox/ruby'
end
```
## Actions
Available actions are `:add` and `:remove`.