Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # manifests/default.pp (the entry point)
- include socksproxy
- include updatepuppet
- include moosh
- Class['socksproxy'] -> Class['updatepuppet'] -> Class['moosh']
- --------------------------------------------------------------------------------
- # modules/socksproxy/manifests/init.pp
- class socksproxy {
- package { 'autossh' :
- ensure => latest,
- }
- package { 'privoxy' :
- ensure => 'latest',
- require => Exec['autossh']
- }
- file { '/home/vagrant/autossh.sh' :
- ensure => 'file',
- require => [ Package['autossh'], File['/home/vagrant/.ssh/onj'] ],
- source => 'puppet:///modules/socksproxy/autossh.sh',
- notify => Exec['autossh']
- }
- file { '/etc/rc.local' :
- ensure => 'file',
- require => File['/home/vagrant/autossh.sh'],
- source => 'puppet:///modules/socksproxy/rc.local',
- }
- file { '/home/vagrant/.ssh/onj' :
- ensure => 'file',
- source => 'puppet:///modules/socksproxy/onj',
- mode => 600,
- owner => '1000'
- }
- file { '/etc/privoxy/config' :
- ensure => 'file',
- require => Package['privoxy'],
- owner => "root",
- source => 'puppet:///modules/socksproxy/config',
- mode => 644,
- notify => Service['privoxy'],
- }
- file { '/etc/apt/apt.conf.d/99proxy':
- ensure => 'file',
- require => File['/etc/privoxy/config'],
- mode => '644',
- owner => '0',
- source => 'puppet:///modules/socksproxy/99proxy'
- }
- service { 'privoxy' :
- ensure => 'running',
- enable => "true",
- require => Package['privoxy']
- }
- exec { 'autossh':
- command => '/bin/bash /home/vagrant/autossh.sh',
- refreshonly => true
- }
- }
- --------------------------------------------------------------------------------
- # modules/updatepuppet/manifests/init.pp
- class updatepuppet {
- exec { 'add-puppet-repo' :
- command => '/usr/bin/dpkg -i /vagrant/scripts/puppetlabs-release-trusty.deb',
- creates => '/etc/apt/sources.list.d/puppetlabs.list',
- }
- ->
- package { 'puppet' :
- ensure => 'latest'
- }
- }
- --------------------------------------------------------------------------------
- # modules/moosh/manifests/init.pp
- class moosh {
- include apt
- apt::source { 'moosh' :
- location => 'http://ppa.launchpad.net/zabuch/ppa/ubuntu',
- release => 'precise',
- repos => 'main',
- }
- ->
- package { 'moosh' :
- ensure => latest,
- install_options => ['--force-yes']
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment