0

I'm new to Puppet and having some trouble with the Puppet-Labs Apache Module http://forge.puppetlabs.com/puppetlabs/apache. I'm using it in conjunction with Vagrant as a serverless setup (if that changes yours answer.)

In my entry point I call the apache.pp class which looks like this:

class {'apache::mod::php': 
   case $::operatingsystem {
     'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL': {
     }
     default: {
      $osfamily = $::operatingsystem
      }
    }
  }

However when I run puppet I get a syntax error:

Error: Could not parse for environment production: Syntax error at '::operatingsystem';    expected '}' at /tmp/vagrant-puppet/manifests/classes/apache.pp:2

I've headed down this route because during the debug runs earlier I discovered that puppet was attempting to use "apt" on a centos box. I assumed that I needed to set the os type per the puppet labs "types" info on the puppet forge page.

Only other thing I should note for those unaware of working with vagrant, the *.pp are shared from the host system which is Debian in this case. Could that also be a cause? I don't think it would be.

I apologize if this is a dumb question. Thanks.

Grumps
  • 45
  • 1
  • 4

1 Answers1

0

You should not need to set the operating system in any way - Facter handles that. Run facter on the system to verify that it's setting the facts correctly.

What version of Puppet are you running? It seems to be choking on the use of $:: as an explicit specification of the top scope, which should work just fine in any recent version.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
  • Hi Shane - I was just about to follow up. I'm running 3.1.1. I discovered partially that I had dumby issue. When using vagrant, all modules are set on the host's machine. So - I was missing the stdlib and firewall modules for it to run. – Grumps Apr 25 '13 at 22:16