Puppet Class: mcafee

Defined in:
manifests/init.pp

Overview

Install the command line McAfee anti-virus scanner and configures updates to be pulled from rsync.

If you wish to schedule a virus scan, you will need to create a cron job that is appropriate, or drop a script into the cron.* directory that is appropriate.

Parameters:

  • rsync_source (String) (defaults to: "mcafee_${::environment}/")
  • rsync_server (Simplib::Host) (defaults to: simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1'}))
  • rysnc_timeout
  • rsync_timeout (Integer) (defaults to: simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2 }))

Author:

  • Trevor Vaughan <tvaughan@onyxpoint.com>



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/init.pp', line 14

class mcafee(
  String        $rsync_source  = "mcafee_${::environment}/",
  Simplib::Host $rsync_server  = simplib::lookup('simp_options::rsync::server', { 'default_value'  => '127.0.0.1'}),
  Integer       $rsync_timeout = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2 })
){

  case $facts['hardwaremodel'] {
    'x86_64': {
      $mcafee_package = 'mcafee-uvscan64'
    }
    default: {
      $mcafee_package = 'mcafee-uvscan32'
    }
  }

  package { $mcafee_package: ensure => 'latest' }

  file { '/opt/mcafee_dat':
    ensure  => 'directory',
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    recurse => true,
    require => Package[$mcafee_package]
  }

  rsync { 'mcafee':
    source  => $rsync_source,
    target  => '/opt/mcafee_dat',
    server  => $rsync_server,
    timeout => $rsync_timeout,
    delete  => true
  }
}