I'm trying to setup a simple Puppet setup on AWS EC2 using the latest Amazon Linux AMI.
I've followed through the install guide for RHEL and have a puppetmasterd
daemon running.
When apply the following manifest in /etc/puppet/manifests/site.pp
:
node 'ip-172-31-1-239.eu-west-1.compute.internal' {
class { 'apache': }
}
I get the error:
[ec2-user@ip-172-31-1-239 ~]$ sudo puppet agent --test
info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Class['apache::version']: Unsupported osfamily: Linux at /etc/puppet/modules/apache/manifests/version.pp:37 on node ip-172-31-1-239.eu-west-1.compute.internal
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
From version.pp
of the Apache module for Puppet I can see why the manifest is failing to install Apache, but I can't understand why Facter is reporting the osfamily
as "Linux" in the first place:
[ec2-user@ip-172-31-1-239 ~]$ facter | grep osfamily
osfamily => Linux
[ec2-user@ip-172-31-1-239 ~]$ rpm -qa | grep facter
facter-1.6.18-7.25.amzn1.noarch
[ec2-user@ip-172-31-1-239 ~]$ rpm -qa | grep puppet
puppetlabs-release-6-11.noarch
puppet-2.7.25-1.4.amzn1.noarch
puppet-server-2.7.25-1.4.amzn1.noarch
[ec2-user@ip-172-31-1-239 ~]$ sudo puppet module list
/etc/puppet/modules
├── puppetlabs-apache (v1.4.0)
├── puppetlabs-concat (v1.2.0)
└── puppetlabs-stdlib (v4.5.1)
/usr/share/puppet/modules (no modules installed)
Anyone any ideas how I can resolve this?