get_iplayer
Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.4.x
- Puppet >=4.9.0 <5.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'sevendials-get_iplayer', '0.1.9'
Learn more about managing modules with a PuppetfileDocumentation
get_iplayer
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with get_iplayer
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
The get_iplayer module lets you access content from the BBC iPlayer service.
Module Description
This module installs get_iplayer from its source location on the web. This provides a command line client and a web-based PVR service. The module also installs a service for PVR functionality. The software can only access video content from a UK-based IP address.
Setup
What get_iplayer affects
- Creates /etc/get_iplayer directory
- Installs software into /usr/local
- Creates get_iplayer service in native service provider
- Runs service on port 1935
Setup requirements
A system running a RHEL-based or Debian-based OS. On RHEL, extra YUM repositories must be added to satisfy the package requirements. These repositories are EPEL and Nux Dextop. They can be added them manually or by including the following Forge modules:
https://forge.puppet.com/stahnma/epel https://forge.puppet.com/m0byd1ck/nux
Beginning with get_iplayer
include 'get_iplayer'
The above gets the client software installed. Make sure to follow the setup requirements above. The command line client can be accessed by running:
/usr/bin/get_iplayer
The PVR service can be accessed from:
http://localhost:1935
Usage
Change the PVR service listen address
The PVR service runs on localhost (127.0.0.1) by default so to access it remotely, set the listen_address parameter:
class { 'get_iplayer':
listen_address => '0.0.0.0'
}
Change the PVR service listen port
class { 'get_iplayer':
listen_port => '1935'
}
Change the PVR service download directory location
class { 'get_iplayer':
output_dir => '/home/joebloggs/Downloads'
}
Set software version
By default, the latest version of the software is installed from the ftp site. See http://www.infradead.org/get_iplayer/CHANGELOG-get_iplayer for available versions and set the version manually:
class { 'get_iplayer':
version => '2.94'
}
Dealing with software prerequisites
This software has the following prerequisites:
perl perl::CGI perl::Env perl::HTML::Parser perl::HTTP::Cookies perl::libwww::perl perl::XML::Simple rtmpdump or flvstreamer ffmpeg or libav-tools
The module attempts to install these using the ensure_package function. If this causes a problem, prerequisite installation can be skipped:
class { 'get_iplayer':
manage_prereqs => false
}
Additional get_iplayer options for PVR service
To set additional options the options_extra takes a hash:
class { 'get_iplayer':
options_extra => { 'subdir' => true, subdirformat => '<nameshort>' }
}
The above option causes the PVR service to create a subdirectory for the download. For a complete list of options, run:
get_iplayer --dump-options
Reference
Classes
Public Classes
- get_iplayer: Main class, includes all other classes
Private Classes
- get_iplayer::install: Handles the software source.
- get_iplayer::config: Handles the PVR service configuration.
- get_iplayer::service: Handles the PVR service.
Parameters
The below parameters are available in the get_iplayer class:
####base_dir
Target directory for tarball. Defaults to '/usr/local'.
####conf_dir
PVR service config directory. The options file and the generated cache are stored here. Defaults to '/etc/get_iplayer'.
####listen_address
PVR service listen address. Defaults to '127.0.0.1'.
####listen_port
PVR service listen address. Defaults to '1935'.
####manage_prereqs
Installs perl dependencies and external commands (see full description in Setup section). Defaults to true.
####options_extra
Extra options for PVR service (see full description in Setup section). Defaults to an empty hash: {}
####output_dir
Download directory for PVR service. Defaults to '/var/get_iplayer'.
####prereqs
Prerequisite packages. Defaults to a hash in get_iplayer::params.
####service_env_path
Path to service environment file.
####service_path
Path to service file.
####service_template
Templace for service file.
####source_location
FTP location of software source file. VERSION is replaced by the version parameter. Defaults to:
ftp://ftp.infradead.org/pub/get_iplayer/get_iplayer-VERSION.tar.gz
####version
Set version.
Limitations
This module has been tested with Puppet 4.
The module has been tested on:
- CentOS 6/7
- Ubuntu 12.04/14.04/14.10/15.04
Development
Please send pull requests.
[33m523b32c[m[33m ([1;36mHEAD[m[33m, [1;32mmaster[m[33m)[m update tag to 0.1.4 [33m9e9f531[m[33m ([1;31morigin/master[m[33m, [1;31morigin/HEAD[m[33m)[m remove trailing comma which is bad for some reason [33m4be500a[m add missing fact stub [33me1afae1[m reorder params to use service_provider fact. Update to 2.97. Install staging dependencies in examples manifests [33m438ac22[m[33m ([1;31morigin/rubocop[m[33m)[m add rubocop update spec file to comply [33m8699f3b[m[33m ([1;31morigin/use_github[m[33m)[m cover package resources in spec [33m15d8692[m cover all resources in spec [33mccc17e8[m cover all classes in spec [33m69ed407[m remove environment variable [33m1520d92[m remove ruby 1.9 [33m9284c36[m set fact required by staging module [33mc1da186[m set fact required by staging module [33m672a6d5[m Use Github as source for get_iplayer [33mce55fa1[m use github for default source [33me867a47[m replace double with single quotes [33md2585a7[m switch second vagrant provisioner from shell to puppet [33m7b6b935[m make bundle resources idempotent [33mbdef3ca[m Merge branch 'vagrant' [33m3e39f5b[m Add nux and epel classes to examples and fixtures [33mb66e356[m Remove EPEL and Nux YUM repos from the list of requirements. Prereqs is now a simple list so the prereqs class parameter is now an array. Document the requirement for EPEL and Nux in the readme. [33mbbd09ab[m Use puppet to provision bundle. Add epel to tests manifest [33mb8056a4[m Add initial vagrant file [33m79c1cba[m Ignore files generated by spec file [33m1e7e9d9[m Add ignore file [33ma37e5d9[m Revert "Initial commit" [33maa268f5[m Initial commit [33ma88ba08[m[33m ([1;33mtag: 0.1.3[m[33m)[m 0.1.3 tag
- [33m31f1123[m[33m ([1;36mHEAD[m[33m, [1;31morigin/master[m[33m, [1;31morigin/HEAD[m[33m, [1;32mmaster[m[33m)[m release_checks runs spec, lint and validate
- [33md5f4f29[m validate metadata.json
- [33m9fdcab8[m same as travis.ci
- [33m6a72a73[m add facts to spec
- [33md2c3884[m test drone
- [33m791c78c[m test drone
- [33m6e77430[m remove space from versions
- [33m1d34ece[m add drone support
- [33m79991f5[m[33m ([1;33mtag: 0.1.2[m[33m)[m New tag
- [33m6eedd90[m Fix unbounded dependency
- [33m738237f[m remove older versions of ruby
- [33m1c92c5b[m set clone directory
- [33m453704f[m test travis
- [33mf2da63f[m Add travis yaml
- [33mbf30e20[m Fix lint errors
- [33md045887[m[33m ([1;33mtag: 0.1.1[m[33m)[m Fix licence and update metadata.json
- [33mf47333e[m[33m ([1;33mtag: 0.1.0[m[33m)[m Apache license
- [33m7e78358[m trailing space
- [33m3fc95f5[m More lint cleanup
- [33mdfeffae[m Fix lint errors
- [33m0dfa769[m Add CHANGELOG. Update README.md with module information. Rearrange params.
- [33mefb74a6[m Fix syntax error
- [33m888172c[m Fill out metadata.json
- [33mf0a1ceb[m Call validation functions on class parameters
- [33mda8e39b[m Optionally manage prerequisites. Rename basedir to base_dir
- [33m692deab[m don't hack profile env
- [33mba4b9a8[m versioncmp returns int not string
- [33m72e1232[m Use versioncmp differently
- [33m2b64907[m libav-tools no longer used by Ubuntu
- [33m2299ba1[m Redo source retrieval
- [33m76aa73f[m Rearrange params file.
- [33m91baac1[m Use systemd on Ubuntu 15.04 and greater
- [33mde6592b[m Add perl xml simple dependency
- [33m4e558da[m avconv in different package
- [33m4137c1d[m Ubuntu packages for get_iplayer
- [33mcbaafce[m First add Debian support
- [33m1a772d9[m add Ubuntu support
- [33m9ac9452[m Change err to fail
- [33m9ee032d[m Fix upstart script name
- [33m6b43e88[m syntax error
- [33m2742317[m use os fact hash. prereq packages different for RHEL 6
- [33mc385cbd[m Try upstart for RHEL6
- [33m4d4469d[m Create separate params for rhel6
- [33m67c1443[m rename
- [33m5804cda[m Require perl-CGI
- [33m8b9adf5[m Don't redeclare epel-release
- [33m391fe9b[m Create resources using ensure_resources. Require epel-release
- [33m9e61703[m fix package name
- [33m8284778[m update with working hash
- [33mec7a981[m fix package name
- [33mc24c69a[m syntax error. Add dependency
- [33m5af755d[m syntax error
- [33md307da3[m syntax error
- [33m225afaa[m Array of hashes
- [33m4c4eb3e[m Params before get_iplayer so can't use class parameter (duh)
- [33md0bfd4e[m Use future parser to iterate over package resources
- [33m0a6d4bf[m move default options hash to config class
- [33md19992e[m set output dir
- [33me85e607[m fix key name
- [33m72afc0b[m fix values
- [33mdfec717[m syntax error
- [33mfdf9a47[m syntax error
- [33ma4ed910[m Add service environment
- [33m379a147[m Add service
- [33m0700f8e[m Add source location and basedir params
- [33m05091ad[m Test map options
- [33med5a6e7[m Test map options
- [33mb504fa0[m Test map options
- [33m2c4293e[m Test map options
- [33madf1770[m fix dir name
- [33mcd3bd69[m add environment variables for conf dir
- [33m8c50a08[m syntax error
- [33m8ad3cf9[m install prerequisites
- [33m7a19b97[m Add config manifest. Create params
- [33m8194b29[m Add install class. Add copyright info. Add empty params class
- [33m01d3141[m Initial structure generated by puppet module subcommand
- [33mad29231[m Initial commit
Dependencies
- puppetlabs/stdlib (>=4.11.0 <5.0.0)
- m0byd1ck/nux (>=1.0.0 <2.0.0)
- stahnma/epel (>=1.0.0 <2.0.0)
- nanliu/staging (>=1.0.0 <2.0.0)
Copyright 2015 Christopher Jenkins 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.