Ramorous / puppet-mcafee_epo

Manage McAfee EPO Agent Install/Service and Nails Service http://forge.puppetlabs.com/Ramorous/mcafee_epo
Apache License 2.0
0 stars 1 forks source link

unzip install #4

Open jostra opened 8 years ago

jostra commented 8 years ago

It would be nice to add unzip package installation during deployment. I have just create some modification and works:

zip.pp class mcafee_epo_agent::zip { package { 'unzip': ensure => installed, } }

and include in init.pp

Verify if target host is Linux

if $::kernel == 'Linux' { include mcafee_epo_agent::zip ##add

and

Check if Class is disabled (Helps to disable some hosts within Foreman/Satellite)

if $class_enabled_real == true {
  case $agent_install_type {
    'script': {
      $agent_install_script_real = '/tmp/McAfee-Install.sh'
      file{ $agent_install_script:
        ensure => 'present',
        path   => $agent_install_script_real,
        source => $agent_install_script,
        mode   => '0700',
        owner  => 'root',
        group  => 'root',
        **subscribe => Class['mcafee_epo_agent::zip'],**  ##add
      }
Ramorous commented 8 years ago

I'll take a look at that within a few days (I hope) provided I have the time. Seems like it's a good addition.