Initial version of MythTV module.
This commit is contained in:
parent
dcb83d6900
commit
e1a4c4d99c
5 changed files with 172 additions and 0 deletions
114
mythtv/manifests/init.pp
Normal file
114
mythtv/manifests/init.pp
Normal file
|
@ -0,0 +1,114 @@
|
|||
|
||||
# Install MythTV backend service.
|
||||
#
|
||||
# === Global variables
|
||||
#
|
||||
# $mythtv_dbhost:
|
||||
# Database server name (defaults to localhost).
|
||||
#
|
||||
# $mythtv_dbname:
|
||||
# Database name (defaults to mythconverg).
|
||||
#
|
||||
# $mythtv_dbuser:
|
||||
# Database user name (defaults to mythtv).
|
||||
#
|
||||
# $mythtv_dbpass:
|
||||
# Database password.
|
||||
#
|
||||
class mythtv::backend {
|
||||
|
||||
if ! $mythtv_dbhost {
|
||||
$mythtv_dbhost = "localhost"
|
||||
}
|
||||
if ! $mythtv_dbuser {
|
||||
$mythtv_dbuser = "mythtv"
|
||||
}
|
||||
if ! $mythtv_dbname {
|
||||
$mythtv_dbname = "mythconverg"
|
||||
}
|
||||
|
||||
package { ["mythtv-backend", "mythtv-setup", "mythtv-docs"]:
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/etc/mythtv/mysql.txt":
|
||||
ensure => present,
|
||||
content => template("mythtv/mysql.txt.erb"),
|
||||
mode => 0640,
|
||||
owner => root,
|
||||
group => mythtv,
|
||||
notify => Service["mythbackend"],
|
||||
require => Package["mythtv-backend"],
|
||||
}
|
||||
|
||||
file { "/etc/mythtv/config.xml":
|
||||
ensure => present,
|
||||
content => template("mythtv/config.xml.erb"),
|
||||
mode => 0640,
|
||||
owner => root,
|
||||
group => mythtv,
|
||||
notify => Service["mythbackend"],
|
||||
require => Package["mythtv-backend"],
|
||||
}
|
||||
|
||||
file { "/root/.mythtv":
|
||||
ensure => "/etc/mythtv",
|
||||
force => true,
|
||||
require => Package["mythtv-backend"],
|
||||
}
|
||||
|
||||
service { "mythbackend":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["mythtv-backend"],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install MythTV daily cron jobs.
|
||||
#
|
||||
# This class should be included only to one host.
|
||||
#
|
||||
class mythtv::cron inherits mythtv::backend {
|
||||
|
||||
package { [ "perl-MythTV", "perl-Net-UPnP", "perl-DBD-MySQL" ]:
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/etc/cron.daily/mythfilldatabase":
|
||||
ensure => present,
|
||||
source => "puppet:///mythtv/mythfilldatabase",
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => root,
|
||||
}
|
||||
|
||||
file { "/etc/cron.daily/mythoptimize":
|
||||
ensure => present,
|
||||
source => "puppet:///mythtv/mythoptimize",
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => root,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install MythTV web frontend.
|
||||
#
|
||||
class mythtv::mythweb {
|
||||
|
||||
package { [ "mythweb", "mythweather" ]:
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/usr/share/mythweb/data":
|
||||
ensure => directory,
|
||||
mode => 0770,
|
||||
owner => root,
|
||||
group => httpsd,
|
||||
require => Package["mythweb"],
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue