28
|
1 |
# = Class puppi::mcollective::client |
|
2 |
# |
|
3 |
# This class installs the mc puppi command for mcollective clients |
|
4 |
# (Note that in mcollective terminology a client is an host from |
|
5 |
# where you can manage mcollective servers) |
|
6 |
# |
|
7 |
# The class installs also the puppideploy and puppicheck commands |
|
8 |
# that are simple wrappers about mco puppi that correctly trap |
|
9 |
# remote errors and can be used in automatic procedures or |
|
10 |
# to give limited access (typically via sudo) to mc puppi commands |
|
11 |
# |
|
12 |
# They can be integrated, for example, in Jenkins as remote ssh |
|
13 |
# commands to manage deployments or tests |
|
14 |
# |
|
15 |
# == Usage: |
|
16 |
# include puppi::mcollective::client |
|
17 |
# |
|
18 |
# :include:../README.mcollective |
|
19 |
# |
|
20 |
class puppi::mcollective::client { |
|
21 |
|
|
22 |
require puppi::params |
|
23 |
require puppi::mcollective::server |
|
24 |
|
|
25 |
# OLD STYLE mc-puppi command |
|
26 |
file { '/usr/local/bin/mc-puppi': |
|
27 |
ensure => 'present', |
|
28 |
mode => '0755', |
|
29 |
owner => 'root', |
|
30 |
group => 'root', |
|
31 |
source => 'puppet:///modules/puppi/mcollective/mc-puppi', |
|
32 |
require => Class['mcollective'], |
|
33 |
} |
|
34 |
|
|
35 |
# mco application TODO |
|
36 |
# file { "${puppi::params::mcollective}/application/puppi.rb": |
|
37 |
# ensure => 'present', |
|
38 |
# mode => '0644', |
|
39 |
# owner => 'root', |
|
40 |
# group => 'root', |
|
41 |
# source => 'puppet:///modules/puppi/mcollective/mcpuppi.rb', |
|
42 |
# } |
|
43 |
|
|
44 |
file { '/usr/bin/puppicheck': |
|
45 |
ensure => 'present', |
|
46 |
mode => '0750', |
|
47 |
owner => $puppi::params::mcollective_user, |
|
48 |
group => $puppi::params::mcollective_group, |
|
49 |
source => 'puppet:///modules/puppi/mcollective/puppicheck', |
|
50 |
} |
|
51 |
|
|
52 |
file { '/usr/bin/puppideploy': |
|
53 |
ensure => 'present', |
|
54 |
mode => '0750', |
|
55 |
owner => $puppi::params::mcollective_user, |
|
56 |
group => $puppi::params::mcollective_group, |
|
57 |
source => 'puppet:///modules/puppi/mcollective/puppideploy', |
|
58 |
} |
|
59 |
|
|
60 |
} |