Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all 6104 articles
Browse latest View live

Is there a way to get an unapproved puppet module from the official repo?

$
0
0
I am not sure whether the unapproved modules are being managed and served by PuppetLabs or not, but I wonder if there is a way to get unapproved puppet modules from the official repo. If it is not, maybe I need to wait for that until the version of modules I would like to get gets approved or I just need to build my own private repo that contains the version of modules I want to get, is it right?

Is there a way to get an unapproved puppet module from the official repo?

$
0
0
I am not sure if the unapproved modules are being managed and served by PuppetLabs, but I wonder if there is a way to get unapproved puppet modules from the official repo. If it is not, maybe I need to wait for that until the version of modules I would like to get gets approved or I just need to build my own private repo that contains the version of modules I want to get, is it right?

How should one handle »Duplicate declarations« between Forge modules?

$
0
0
I'm new to puppet and encountered the problem, that even in simple scenarios modules seem not work together. For example, I want to use NIS and NFS and installed the popular modules from forge ericsson-nisclient und derdanne-nfs. This leads to this error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: Service[rpcbind] is already declared in file /etc/puppetlabs/code/environments/testing/modules/rpcbind/manifests/init.pp:83; cannot redeclare at /etc/puppetlabs/code/environments/testing/modules/nfs/manifests/client/service.pp:43:5 on node test.local When using desalvo-nis instead of ericsson-nisclient, there is a conflict with ghoneycutt-nsswitch. My question is: what is the approved way to avoid these conflicts? I want to use puppet forge modules, because I don't want to reinvent the wheel.

what are the important resource types in puppet organization

$
0
0
hi, what kind of resource types are generally used in the puppet organizations, for example user,file,service,packages.. etc.

puppet master coding

$
0
0
Hi, I am new in Puppet. I want to manage access controls for puppet agents using Puppet master. If I get it right I should work with manifests, but I am going to set permissions on different files for different users. My questions are: How to manage such a big configuration on puppet master? Can I create .pp as much as possible with any names? If yes How to add all of them on Agents? Kindly Regards, Abu

puppetdb hangs and I see no error messages

$
0
0
Hi, PuppetDB keeps hanging and I find no reason why. puppetserver 2.2.1-1puppetlabs1 running on server1 puppetdb 3.2.3-1puppetlabs1 running on server2 postgres 9.4.5 running on server2 but in a docker container. Approx 8000 puppet agents. PuppetDB keeps hanging. From the PuppetServer and command curl, I see that the server is not responding: 2016-09-05T09:46:34.722956777Z 2016-09-05 09:46:34,722 WARN [qtp888237476-279] [puppet-server] Puppet Error connecting to server2 on 8081 at route /pdb/cmd/v1?checksum=1e341887631e1749199fc32ef3c2f8bac3a7d7a3, error message received was ''. Failing over to the next PuppetDB url in the 'server_urls' list $ curl --tlsv1 --cacert /etc/puppetlabs/puppetdb/ssl/ca.pem --cert /etc/puppetlabs/puppetdb/ssl/public.pem --key /etc/puppetlabs/puppetdb/ssl/private.pem https://server2:8081/pdb/meta/v1/version PuppetDB is currently down. Try again later. In Postgresql logs, I see only the messages "WARNING: there is already a transaction in progress". But I've searched and found that I should ignore this message in this version of puppetdb. In /var/log/puppetlabs/puppetdb/puppetdb.log, I see only this: 2016-09-05 01:24:01,294 INFO [p.p.c.services] Starting sweep of stale reports (threshold: 14 days) 2016-09-05 01:24:01,319 INFO [p.p.c.services] Finished sweep of stale reports (threshold: 14 days) 2016-09-05 01:24:01,320 INFO [p.p.c.services] Starting database garbage collection 2016-09-05 01:24:03,295 INFO [p.p.c.services] Finished database garbage collection And if I restart the postgres container and puppetdb, It will spend a few minutes in maintenance mode, and then It works again correctly for 20 minutes or so. Do you know how I could troubleshoot this? Thanks for your help.

node classification for hiera

$
0
0
I'm just starting out with the profiles and roles design pattern, and I've hit a simple problem. I'm trying, as much as possible, to avoid declaring classes as resources so that I can include them in multiple profiles without a conflict. Of course, different systems use different data, and hiera nicely provides for specializing data using available facts. For example, right now I use the host's name, environment, and OS in the hiera hierarchy to pick out the right data. However, I'm finding that when I have several nodes with the same *role* I want them to share some parameters from hiera. For example, webservers and email servers alike might have a 'postfix' class; the webservers use it for emailing important logs to the admin, but the email server uses it for much more. So, webserver (a role) and email server (a role) should have different data sources. How can I tell hiera about roles so that I can use it in the hierarchy? Custom facts don't seem like the way to go, because there's no script I could run/program to write that would tell me the role of a server, it has to be information I specify manually (preferably in a simple format).

puppet 3.85 - sshkey Could not evaluate: Field 'type' is required

$
0
0
In an attempt to debug my default.pp file now looks like this: sshkey { 'ssh-keys-dw80': type => 'rsa', ensure => present, name => 'github.com', key => 'srt5', } I replaced the actual key with whats above just to rule out any issues with special chars in the keys. Despite this very simple puppet file I still get this error: > /Stage[main]/Main/Sshkey[ssh-keys-dw80]:> Could not evaluate: Field 'type' is> required Any ideas, cause I'm all out....

Filebucket Newbie Question

$
0
0
Hello All, I'm having a little trouble understanding the filebucket and where it is stored locally. Right now, I have a puppet master with no custom configurations (3.8.7), and 50 Windows clients. When I execute a puppet run, one of my modules is removing files from the Desktop. Puppet makes the report that it file bucketed the files as such: Filebucketed c:/Users/user/Desktop/Imraan.txt to puppet with sum 56e4b7d59a0999f5768c8b8c2526a13c As I understand it, this is on a local file bucket since no global file bucket was defined. But when I try to check the file bucket, it comes up empty. I check the file bucket with: puppet filebucket -l list The above returns nothing and takes me back to a command prompt. Is there a piece of the puzzle I am missing? Thanks in advance for any help you can provide!

vmware node list error

$
0
0
# puppet node_vmware list Error: Unknown Puppet subcommand 'node_vmware' See 'puppet help' for help on available puppet subcommands I am using Puppet Enterprise 2016.2.1-3 installed puppet module install puppetlabs-cloud_provisioner tried for both - root user and regular user created ~/.fog (keeping only one file) added vcenter details

Dashboard future?

$
0
0
I went to a puppet users group meeting last night where they talked about `the dashboard` quite a bit. I was under the (apparently mistaken) impression that this component wasn't being developed anymore. Apparently it's only for PE now?

Lookup destination path of a file in a template.

$
0
0
Is it possible to determine the destination path while a template's being rendered?
file { 'my_cool_file':
  path    => '/etc/somewhere',
  content => template('coolmodule/coolfile.erb'),
}

file { 'another_file':
  path    => '/root/another_file',
  content => template('coolmodule/coolfile.erb')
}
<%-# this is coolmodule/coolfile.erb -%>
# this file's placed at <%= scope.lookupvar(' XXX magic to come here ') %>
So the file placed at /etc/somewhere states # this file's placed at /etc/somewhere and the one at /root/another\_file says /root/another\_file accordingly?

Does puppet 3.8.6 have hook feature?

$
0
0
* puppet-server-3.8.6-1.el6.noarch * puppetserver-1.1.3-1.el6.noarch I use above puppet versions. I'd like to know if puppet 3.8.6 has hook feature. I manage puppet files with git in the puppet master, and I want to record the commit of repository for modules when a node attempts to connect to the master. It would be helpful if I could put a hook script for such kind of event like node-connecting with some parameters like certname. Thanks,

Problems with require => Class['java']

$
0
0
I'm trying to understand why "require => Class['java']" only seems to work sometimes.

This cassandra module calls logstash which calls java - this works. file { '/etc/logstash/conf.d/cassandra.conf': owner => 'root', group => 'root', source => 'puppet:///modules/api_cassandra/etc/logstash/conf.d/cassandra.conf', require => [ Class['logstash::classes::install'], Class['logstash::classes::configuration'], ], } class logstash::classes::install { package {'logstash' : ensure => latest, require => Class['java'], } } If I just call logstash eg 'include logstash', I get Error: Failed to apply catalog: Could not find dependency Class[Java] for Package[logstash] at /etc/puppetlabs/code/environments/prod/modules/logstash/manifests/classes/install.pp:3 ie fail

If I call java eg 'include java' - it works ...

So why does the middle one fail ??

Cheers
Chris

Hiera not using ENC to traverse hierarchy

$
0
0
This problem has been driving me crazy. I'm using the roles and profiles design pattern, and I want to give data to my classes based on role (among other things). Thus, I have a hiera hierarchy that looks like this: --- :backends: - json :json: :datadir: /etc/puppet/hiera :hierarchy: - "host/%{::hostname}" - "role/%{::role}/common" - "role/%{::role}/%{::location}" - "common" The idea is that the 'role' and 'location' are going to be set by an external node classifier. The problem is it doesn't work. For now, I just have a simple ENC script that spits out the following yaml for my one host: --- classes: - roles::webserver::init parameters: role: "webserver" location: "dc1" Now, I have the following hiera tree structure: . ├── common.json ├── host └── role └── webserver └── common.json 3 directories, 2 files For testing purposes, I wrote the following module and added it to the list of classes for my node: class iama($hieratest="default", $hierarole="default") { file { '/root/iama': ensure => 'present', owner => 'root', group => 'root', mode => 0600, content => "Role: ${role}\nhieratest: ${hieratest}\nhierarole: ${hierarole}\n", } } Then I populated common.json with the following setting: { "iama::hierarole": "%{::role}" } and the webserver/common.json with this: { "iama::hieratest": "itworks!" } The goal is that the file /root/iama would be populated with this: role: webserver hieratest: itworks! hierarole: webserver Of course, if for some reason the role variable wasn't making it to hiera, I would expect 'hieratest' and 'hierarole' to both be set to 'default'. But what's actually happening is quite strange -- I'm getting the following output: role: webserver hieratest: default hierarole: webserver To me this suggests the following: puppet is calling hiera with the "role" variable in the top level scope. hiera is not using this variable in the hierarchy, but is using it for interpolation in the data files themselves. On the other hand, when I run hiera from the command line, everything is fine: $ hiera -c hiera.yaml "iama::hieratest" ::role=webserver itworks! I've tried everything: I've tried just putting "role" instead of "::role" in many places and vice-versa. I've double-checked that everything is spelled correctly. I've been at this a long time. Any ideas? References to others who have struggled with this: https://ask.puppet.com/question/27288/using-an-enc-to-inject-top-level-parameters-hiera-is-not-using/ https://groups.google.com/forum/#!topic/puppet-users/iw_HyoheOlY

How to install a module to puppet master without root

$
0
0
HI, I am an architect and doing puppet evaluation for a DevOps requirement. I have installed puppet using root user and when I am installing modules from root its getting installed and reflecting in the UI. But when I am trying the same from a non-root user, module is getting installed in /.puppetlabs/etc/code/modules/ and class is not getting reflected in the Class list in Admin GUI and exception is getting raised when I am using the same class name in site,pp. Please help me to figure out the way to install and use any module on master without root access. Regards, Prajnyan

agent lockfile remove latency up to 5s and more !

$
0
0
Hi, i only wanted to let you know, that **the agent lockfile remove latency is up to 5 seconds or even more**.
I stumbled upon the **"problem"** after the last upgrade of **PE 2016.1.x to 2016.2.0**.
Cannot tell, if it happened before.
Nonetheless, the upgrade **left a stale lockfile**, especially on the **razor** node.
Right now i created a **script**, running via **cron**, that checks the lockfile and removes it when stale (>20s staletime).
**It's running for 1h now and already deleted two stale lockfiles !**
**From my point of view, it's critical that the lockfile will be removed in TIME !**
It can cause unpredictable behaviour when triggerung the agent very often !
Someone also noticed this agent lockfile delay ? Rgds.
Franz

How to convert an ip to string in puppet

$
0
0
I am using version 3.8 of puppet and I need to convert an ip address to a string. I tried the String function but I am getting an error. This is the code I am using: class resolver::params { $ip = String($::ipaddress) $octs = split($ip, '.') file{ '/tmp/teste.txt': content => $octs[0] } } Here is the output: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '('; expected ')' at /etc/puppet/modules/resolver/manifests/params.pp:2 on node example.intranet.example.br Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Web Console not working during puppet installation

$
0
0
Hi Team, OS version : Red Hat Enterprise Linux Server release 7.2 (Maipo) Package Installed : EL (RHEL, CentOS, Scientific Linux, Oracle Linux) ver. 7 (x86_64) Download URL https://pm.puppetlabs.com/cgi-bin/download.cgi?dist=el&rel=7&arch=x86_64&ver=latest While trying to install puppet enterprise edition on the server : Package Arch Version Repository Size ================================================================================ Installing: pe-bundler noarch 1.8.2-3.pe.el7 puppet_enterprise 218 k pe-installer x86_64 2016.1.0.47-1.el7 puppet_enterprise 3.7 M puppet-agent x86_64 1.5.3-1.el7 puppet_enterprise 28 M Transaction Summary ================================================================================ Install 3 Packages Total download size: 32 M Installed size: 162 M Downloading packages: -------------------------------------------------------------------------------- Total 424 MB/s | 32 MB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : puppet-agent-1.5.3-1.el7.x86_64 1/3 Installing : pe-bundler-1.8.2-3.pe.el7.noarch 2/3 Installing : pe-installer-2016.1.0.47-1.el7.x86_64 3/3 Verifying : pe-installer-2016.1.0.47-1.el7.x86_64 1/3 Verifying : puppet-agent-1.5.3-1.el7.x86_64 2/3 Verifying : pe-bundler-1.8.2-3.pe.el7.noarch 3/3 Installed: pe-bundler.noarch 0:1.8.2-3.pe.el7 pe-installer.x86_64 0:2016.1.0.47-1.el7 puppet-agent.x86_64 0:1.5.3-1.el7 Complete! ## We're preparing the Web Installer... 2016-09-06 10:25:56,341 Running command: mkdir -p /opt/puppetlabs/puppet/share/installer/installer 2016-09-06 10:25:56,346 Running command: cp -pR /tmp/puppet-enterprise-2016.2.1-el-7-x86_64/* /opt/puppetlabs/puppet/share/installer/installer/ Please go to https://sd-9cff-0f7e.nam.nsroot.net:3000 in your browser to continue installation. Be sure to use 'https://' and that port 3000 is reachable through the firewall. 2016-09-06 10:25:56,753 Running command: RACK_ENV=production /opt/puppetlabs/puppet/bin/bundle exec thin start --debug -p 3000 -a 0.0.0.0 --ssl --ssl-disable-verify &> but am getting the below error while hitting the url : https://sd-9cff-0f7e.nam.nsroot.net:3000 This site can’t be reached sd-9cff-0f7e.nam.nsroot.net refused to connect. Try: Checking the connection Please help resolve the issue at the earliest.

What is the puppet equivelant to "chef-client -r"

$
0
0
I'm trying to have a new VM register itself with the puppet master and request/apply a puppet module. On a new chef client, I can run chef-client -r recipe[my_pgsql] and that will both register the new client, and set the run list to the recipe my_pgsql. So what is the equivelant in Puppet?
Viewing all 6104 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>