23 votes
Accepted

Is it possible to get aws ec2 instance id based on its IP address

aws ec2 describe-instances --filter Name=ip-address,Values=IP_1,..IP_N Should do what you need. use the filter name of private-ip-address to select using private address in your VPC. Pipe through ...
user avatar
  • 356
20 votes
Accepted

New server unable to fetch configuration from Puppetmaster due to some ssl error

Concise answer The issue CRL is not yet valid for indicates that the time between the Puppet-agent and the Puppetmaster is out of sync. Sync the time (NTP). Remove the certificate from the Puppet-...
user avatar
  • 5,691
16 votes
Accepted

Error 400 on SERVER: The environment must be purely alphanumeric, not 'puppet-ca'

The root cause is that the puppet version on puppet master server is 3.8.1 However i install puppet 4.1.0 on puppet agent. Puppet master version must be greater than or equal puppet agent version. ...
user avatar
15 votes
Accepted

puppet cert list -all: Error: header too long

There were empty ca request files on the puppet master server that needed to be removed. here: /var/lib/puppet/ssl/ca/requests
user avatar
10 votes
Accepted

Order of resource/class execution in puppet manifest file

You're not specifying any resource dependencies so Puppet will apply the changes in a seemingly random order. If the java class should be installed before your cq::instance definitions, then you ...
user avatar
  • 4,611
10 votes
Accepted

Copy folder and its subfolders from puppet master to agent

I just found out the problem. First, instead of 'file' use 'directory' at ensure parameter . Second, make the copy process recursive to include all sub-folders. file { '/home/vagrant/scripts': ...
user avatar
9 votes

Is it possible to get aws ec2 instance id based on its IP address

You can use --query and --output formats if you want to use this in a bash script. aws ec2 describe-instances --filter Name=private-ip-address,Values=x.x.x.x --query 'Reservations[].Instances[]....
user avatar
8 votes
Accepted

How can I diagnose and speed up slow Linux puppet sync?

The most direct approach is running the agent with the --evaltrace flag like puppet agent --test --evaltrace This will give you a good idea of which resources are the most expensive. For your large ...
user avatar
  • 3,053
7 votes
Accepted

How do you use a variable in a Puppet Manifest?

Have you tried it this way? class excellent { $cool = 'Saturday' class { 'wsus_client': server_url => 'http://acme.com', auto_update_option => 'Scheduled' ...
user avatar
  • 12.3k
6 votes
Accepted

puppet: how to submit command "yum update" to all agents?

Well, it's super-easy with Puppet Enterprise and MCollective... But in your case, you're probably going to have to produce a manifest that runs an exec of /usr/bin/yum -y -q update. You can also ...
user avatar
  • 194k
6 votes

Could not find class, and yet it is there

I ran into this same problem, but had a different fix If you generate a puppet module like so: puppet module generate foo-example_module It will create a module named example_module with the foo ...
user avatar
  • 1,665
5 votes

Nested Puppet Resources

Ressources cannot be nested. They can only have dependencies on each other.
user avatar
  • 3,066
5 votes

Centos 5 - Using official repository to upgrade manually installed Puppet server

CentOS 5 has a nifty way to rollback your system. On update, it can rebuild packages with the configs that are present at that time. Configure RPM to repackage packages that will be altered by ...
user avatar
  • 1,823
5 votes
Accepted

Can Puppet File Source be from a web service?

I'm writing an updated answer to notify future readers that now the File resource indeed implements the HTTP source. From the docs: source A source file, which will be copied into place on ...
user avatar
  • 1,017
5 votes

Installing packages with dependencies using puppet

From what I see you are using Ubuntu and therefore the Apt package manager. The error you are encountering is due to installing a package that it cannot find the public key for the package. This can ...
user avatar
  • 6,443
5 votes
Accepted

Puppet: How to fix "Invalid resource type file_line"?

You likely need to install the standard library. On your other installation, this might have got pulled in by some other module you installed. After that, use it with include stdlib.
user avatar
  • 96.6k
5 votes
Accepted

File Copy failing using Puppet File resource

Your module(s) don't appear to conform to the standard directory structure. With a source URL of puppet:///modules/foo/bar.txt, Puppet will be looking for ${codedir}/environments/production/modules/...
user avatar
  • 4,611
5 votes
Accepted

Puppet assign nodes to environments from master?

The environment can either be set by the agent's puppet.conf config file, the agent's --environment command line option, or the master using an external node classifier (ENC), in order of increasing ...
user avatar
4 votes

Puppet manifest versioning

Puppet has no concept of VCS versions for its modules and manifests. It will simply use the files that are stored in the correct place and there is no way to require a specific version for a client. ...
user avatar
  • 96.6k
4 votes
Accepted

Installing packages with dependencies using puppet

You can try below manifest. The issue is that you have to add -f and --allow-unauthenticated options for apt-get to resolve the dependencies automatically and install them. Once these flags are added ...
user avatar
4 votes
Accepted

How to implement iptables using Puppet

Use the firewall module (which is developed by Puppet Labs). There are usage examples in the readme that should cover your use case quite nicely.
user avatar
4 votes
Accepted

How do I get puppet master to listen on IPv6?

In Puppet Enterprise the puppetmaster should be listening on a dual stack IPv6/IPv4 socket by default. Though PE has some other IPv6-related brokenness (my site) you'll have to work around. In open ...
user avatar
4 votes
Accepted

What's a good load balancer check for puppet master

What you could use as a check if puppet master is working correctly is to set up some kind of API query, for example: curl -k -H "Accept: pson" https://puppetmaster:8140/production/status/no_key ...
user avatar
  • 5,127
3 votes
Accepted

Use puppet to update Yum repository

Look into the yumrepo(doc link) resource and use it to duplicate the file on your puppet master. It can be used like this: yumrepo { "cuda": baseurl => "http://repourl", descr => "cuda", ...
user avatar
  • 96.6k
3 votes
Accepted

puppet-master/foreman "undefined method `[]' for nil:NilClass on node" after update

Between Puppet 2 and 3, config.ru (used by Passenger to run the Puppet master under Apache) needs updating as Puppet's initialisation changed. See the release notes here for the diff: Puppet 3 ...
user avatar
3 votes
Accepted

Unable to install Puppet Server

http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm the el-5 is intended to be used by RHEL 5 based operating systems. You are using CentOS 6, so you should use the el-6 version instead.
user avatar
  • 17.3k
3 votes

Could not find class, and yet it is there

Another problem that might happen is when your module have an invalid metadata.json file. Make sure the metadata.json file have all the required fields (see https://docs.puppet.com/puppet/latest/...
user avatar
  • 429
3 votes

Can Puppet File Source be from a web service?

It's been requested as a feature for years... But you'd end up needing a custom function for this... or to use curl or wget. See Puppet Forge. What's in text.txt?
user avatar
  • 194k
3 votes

Can Puppet File Source be from a web service?

It's not possible out of the box right now: source: ... The available URI schemes are puppet and file. Puppet URIs will retrieve files from Puppet’s built-in file server I ended up ...
user avatar
  • 3,494
3 votes

puppet enterprise installation error

You already installed Puppet Enterprise 3.7 on this computer. You cannot downgrade to 3.3 using the installer.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible