Skip to content

Commit

Permalink
Adding original files
Browse files Browse the repository at this point in the history
  • Loading branch information
markaves committed Apr 6, 2015
1 parent 132e9b8 commit 1ce6db0
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
12 changes: 12 additions & 0 deletions classes/apache.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class apache {
package { 'httpd':
name => "httpd",
ensure => installed,
allow_virtual => true
}
service { 'httpd':
ensure => running,
hasstatus => true,
hasrestart => true,
}
}
20 changes: 20 additions & 0 deletions classes/deb_transmission.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class deb_transmission {
package { 'transmission':
name => "transmission",
ensure => installed,
}
package { 'transmission-daemon':
name => "transmission-daemon",
ensure => installed,
}
package { 'transmission-cli':
name => "transmission-cli",
ensure => installed,
}
service { 'transmission-daemon':
ensure => running,
hasstatus => true,
hasrestart => true,
}

}
7 changes: 7 additions & 0 deletions classes/mysite.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class mysite {
file { '/etc/httpd/conf.d/mysite.conf':
owner => root, group => root, mode => 0644,
source => "puppet:///files/mysite/mysite.conf",
notify => Service['httpd'],
}
}
7 changes: 7 additions & 0 deletions classes/nfs.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class nfs {
package { 'nfs-common':
name => "nfs-common",
ensure => installed,
}

}
13 changes: 13 additions & 0 deletions classes/sinatra.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class sinatra {
file { '/data/sinatra/sinatra.tar':
owner => root, group => root, mode => 0644,
source => "puppet:///files/mysite/sinatra.tar",
}
exec { 'deploy.sh':
command => "/data/deploy.sh",
subscribe => [
File['/data/sinatra/sinatra.tar'],
],
refreshonly => true,
}
}
21 changes: 21 additions & 0 deletions site.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'classes/*.pp'

class toolbox {
file { '/usr/local/sbin/puppetsimple.sh':
owner => root, group => root, mode =>0755,
content => "#!/bin/sh\npuppet agent --onetime --no-daemonize --onetime --verbose $1\n",
}
}

node 'client.markaves.com' {
include toolbox
include apache
include mysite
include sinatra
}

node 'cayli.markaves.com' {
include toolbox
include deb_transmission
include nfs
}

0 comments on commit 1ce6db0

Please sign in to comment.