kemra102 / puppet-cloudwatchlogs

Puppet module for configuring AWS Cloudwatch Logs on Amazon Linux, Ubuntu, Red Hat & CentOS EC2 instances.
BSD 2-Clause "Simplified" License
11 stars 36 forks source link

invalid parameter errors in puppet #7

Closed neillturner closed 9 years ago

neillturner commented 9 years ago

hi,

I'm getting invalid parameter errors when running the latest 2.0.0 version. I had to comment the the following ensure and ensure_newline parameters in the init manifest:

      concat { '/etc/awslogs/awslogs.conf':
#        ensure         => 'present',
        owner          => 'root',
        group          => 'root',
        mode           => '0644',
#        ensure_newline => true,
        warn           => true,
        require        => File['/etc/awslogs'],
      }
neillturner commented 9 years ago

here in non-markdown format

      concat { '/etc/awslogs/awslogs.conf':
#        ensure         => 'present',
        owner          => 'root',
        group          => 'root',
        mode           => '0644',
#        ensure_newline => true,
        warn           => true,
        require        => File['/etc/awslogs'],
      }
kemra102 commented 9 years ago

Can you details on versions of everything you are using and the config you are using to produce this error (and the full error message)?

neillturner commented 9 years ago

puppet 3.8.1 on centos 6.5 using puppet apply and test-kitchen 1.4.0 with the kitchen-puppet plugin. Error: Invalid parameter ensure on Concat[/etc/awslogs/awslogs.conf] at /tmp/kitchen/modules/cloudwatchlogs/manifests/init.pp:96 on node ip- Error: Invalid parameter ensure on Concat[/etc/awslogs/awslogs.conf] at /tmp/kitchen/modules/cloudwatchlogs/manifests/init.pp:96 on node ip-

i just have something quite simple: class {'cloudwatchlogs': require => Class['cloudwatch_monitoring'], }

cloudwatchlogs::log { 'system_messages': path => '/var/log/messages', streamname => '{instance_id}', }

My guess is it is to do with concat module. I'm using puppetlabs-concat (2.0.1) ripienaar-concat (0.2.0)

and i'm using puppetlabs-stdlib (4.4.0) so i meet the dependencies

kemra102 commented 9 years ago

I'm not sure how you have both the RIPienaar & Puppetlabs versions of concat installed (they're both named concat so that wouldn't be possible in a standard Puppet installation).

It looks like the error you are receiving is caused by using ripienaar-concat which does not support values such as ensure & ensure_newline. This module only supports the puppetlabs-concat module. If you switch over to that it should work.

neillturner commented 9 years ago

I'll look into it. thanks for confirming. the problem is with common module dependencies of stdlib, concat that are used by lots of modules can cause conflicts. -)