HI All,
I am working on windows 2012. I have four patches to be installed in my system and i am planning to do this through puppet. I need to skip the already installed software and resume the remaining models to execute.
↧
How to install the software patches through puppet which require restart
↧
Puppet Agent Error retrieving catalog
Hi Guys,
I have a really simple setup with 1 puppet server and a couple of dev/test boxes. Up to this point I have only used/written my own classes and manifests, and everything has been going swimmingly.
I have now added a module to install ssh (sudo puppet module install saz-ssh) and added this straight into the site.pp under node 'servername' { include ssh } but I now get the error:
*"Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation. Error While evaluating a Resource Statement, HTTP request path is empty at /etc/puppetlabs/code/environments/production/manifests/site.pp:21:2 on node servername."*
NB: line 21:2 is the exact place I added my new node definition
I have tried other modules (sensu) and had the same exact error, although if I remove everything and leave my own modules in, everything works fine. Any ideas, I'm hoping I am just a muppet and did something wrong?
↧
↧
Running onetime agent from Windows node --tags argument
Hi Folks,
this is driving me nut since couple days.
I'd need to run one-time configuration from one of the Windows node and be able to pass a parameter or use the --tags (which does not work as far as i can see) to identify the class/es to apply on the node.
Basically I would like to be able to run on demand agent on Windows (therefore no daemon mode) and decide which class/es apply one the node.
I tried the --tags but it does not affect the agent request made against the PuppetServer as it gets what is really defined in the manifest.
Not sure whether it is possible or not, would be nice to hear from you.
PuppetServer : Version 4.10 on Linux CentOS
Puppet : 4.10 on Windows node
Thanks!
M.
↧
Hiera.conf 5 mapped_paths based on a Array fact from split string
Hi,
I'm trying to setup a generic hierarchy based on Hiera 5 under the following assumptions:
* a fact `roles` holds a comma-separated list of roles to use in hiera. Example: `[ 'role1', 'role2' ].join(',')` aka `"role1,role2"`
* this `roles` fact is passed to `puppet apply` using the `FACTER_roles` environment variable (which explain why the array is not passed directly).
I'm trying now to setup the `:hierarchy`section of `hiera.conf` to handle properly `facts.roles` as an array to iterate on it using [`mapped_paths`](https://docs.puppet.com/puppet/latest/hiera_config_yaml_5.html#the-hierarchy-key).
Ideally, I would like to express this iteration as follows:
# hiera.conf --- version: 5 # below version 5 are deprecated starting puppet 4.9 ### default datadir and backend for hierarchy levels. defaults: # Used for any hierarchy level that omits these keys. datadir: hieradata # This path is relative to hiera.yaml's directory. data_hash: yaml_data # Use the built-in YAML backend. hierarchy: #______________________ - name: "Per-node data" path: "nodes/%{trusted.certname}.yaml" - name: "Role Specific data" mapped_paths: [ "%{split(facts.roles, ',')}", role, "role/%{role}.yaml" ] - name: "Common data" path: "common.yaml"Assuming the above setup, I'm expecting to see hiera "loading" the following hiera files: * `hieradata/role/role1.yaml` * `hieradata/role/role2.yaml` * `hieradata/common.yaml` However it does not work: I end with a strange message ``` ==> master: Error: Evaluation Error: Error while evaluating a Function Call, Lookup of key 'noop_mode' failed: Syntax error in string: mapped_path[0] at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/default.pp:33:14 on node puppet-master.vagrant.dev ``` I don't see the proper way to define a call to the `split` function **within** `hiera.yaml`. Can anyone help me ? ## Appendix: `mapped_paths` > The mapped_paths key must contain three string elements, in the following order:> A scope variable that points to a collection of strings.> The variable name that will be mapped to each element of the collection.> A template where that variable can be used in interpolation expressions.> For example, a fact named $services contains the array `[“a”, “b”, “c”]`. Then this configuration: >> `mapped_paths: [services, tmp, "service/%{tmp}/common.yaml"]`>> has the same results as if paths had been specified to be `[service/a/common.yaml, service/b/common.yaml, service/c/common.yaml]`.
↧
Puppet registry module
Hi,
I am trying to manage TightVNC configuration using Registry module.. How I can provide the binary value to the key "password"?
I was able set key's which accept the data type of "String"
Thanks.
↧
↧
Hiera Defined Types + MongoDB Module?
I might be a bit confused about how Hiera works with defined types...
classes:
- mongodb::service
- mongodb::client
So here's where I start getting confused. I haven't had issues with Apache, which is similar.
In the puppetlabs module for MongoDB: https://forge.puppet.com/puppetlabs/mongodb#class-mongodbserver
There is a mongodb::db defined type, that normally would look like the following:
mongodb::db { 'testdb':
user => 'user1',
password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8',
}
So in Hiera, I thought it would look like the following:
mongodb::db:
chat_log:
user: 'user1'
password: 'plaintextmaybe'
However-- the above doesn't work. I'm confused, because the $user and $password variables arein the mongodb::db class, so shouldn't they be getting picked up that I've called the mongodb::db?
↧
pkg provider / Solaris 11 / Install package from source
I need to upgrade the Solaris 11 agent package 'puppet-agent@1.9.3,5.11-1.sparc.p5p'. The system currently has this version:
puppet-agent (puppetlabs.com) 1.8.2-1 i--
My manifest is as simple as this:
class profile::unix::puppet::agent () {
package {'puppet-agent':
provider => 'pkg',
source => '/glshared/puppet-agent/puppet-agent@1.9.3,5.11-1.sparc.p5p',
ensure => '1.9.3-5',
}
}
I get the next error while running the agent:
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet-pil00.msc.es
Info: Applying configuration version '1493978637'
Notice: this node is: puppet-pil00
Notice: /Stage[main]/Profile::Unix::App::Base/Notify[this node is: puppet-pil00]/message: defined 'message' as 'this node is: puppet-pil00'
Error: Execution of '/usr/bin/pkg list -Hvfa puppet-agent@1.9.3' returned 1: pkg list: no packages matching 'puppet-agent@1.9.3' known
Error: /Stage[main]/Profile::Unix::Puppet::Agent/Package[puppet-agent]/ensure: change from 1.8.2,5.11-1:20161206T010446Z to 1.9.3 failed: Execution of '/usr/bin/pkg list -Hvfa puppet-agent@1.9.3' returned 1: pkg list: no packages matching 'puppet-agent@1.9.3' known
Info: Stage[main]: Unscheduling all events on Stage[main]
So, how can I install Solaris 11 packages from file through puppet?
Thanks in advance.
↧
PuppetDB 2.3.7/2.3.8 - Caused by: java.io.IOException: Frame size of 127 MB larger than max allowed 100 MB
Hey,
I'm *really* struggling here with a PuppetDB 2.3.X issue that's crept through our infrastructure recently whereby after about 5 minutes of restarting the `puppetdb` service we start to get Exceptions in the `puppetdb.log` saying that the Frame size is over the 100MB allowed limit.
What stumps me is that the default should be set to 200MB...
We are using 2.3.7 (this still happens with 2.3.8 also) which apparently *contains* the fix (PB-700 iirc) that's meant to apply the `max-frame-size` setting to the transfers. Even with editing the `services.clj` and adding the wiresize hard-coded into the file it still complains after a short while of running.
I've even tried:
- Changing the `config.clj` schema file and supplying the value in the correct place in the config file.
- Downloading the source for ActiveMQ 5.6.0 (the version in 2.3.X) and tried to find where they specify the default in their source, but can't find it in there at all (except in some tests and a couple of oddly laid out "configs"). I was hoping to be able to compile it and replace the ActiveMQ bundled with PuppetDB.
I'm at a loss as to what to do and upgrading to Puppet 4 / PDB 3+ is not a current short-term option.
Any help would be greatly appreciated,
Many Thanks
↧
can I use an input file listing folders, user names and permissions with the acl module
If I have say 50 folders to set individual ACL's on can puppet handle an input file and read them in as variables?
↧
↧
i created an api to retrieve specific variavle from my platform,i need to call and put that variable in my puppet template ,any advise ?
ICINGA2_NODENAME=<%= @fqdn %>
ICINGA2_CA_TICKET= i need to use an api to get this variable
↧
i want to use api with puppet template to extract a needed variable ,any advise?
ICINGA2_NODENAME=<%= @fqdn %>
ICINGA2_CA_TICKET= i need to use an api to get this variable
↧
Is Maven installed?
Hi there,
I am trying to download war files from my maven repository. It is hosted in http://car-build-001.abc.com:8081/artifactory/simple/libs-snapshot-local/
$repo = {
id => "myrepo",
username => "admin",
password => "password",
url => "http://car-build-001.abc.com:8081/artifactory/simple/libs-snapshot-local/",
#mirrorof => "external:*" # if you want to use the repo as a mirror, see maven::settings below
}
maven { "/tmp/myfile.war":
groupid => "com.abc.aus",
artifactid => "assess-maven",
version => "latest",
packaging => "war",
#classifier => "sources",
repos => $repo,
ensure => "latest",
}
The error which I am seeing -
Error: mvn returned 1: Is Maven installed?
Error: /Stage[main]/Main/Node[car-lnxd-001.abc.com]/Maven[/temp/myfile.war]/ensure: change from absent to latest failed: mvn returned 1: Is Maven installed?
I am probably doing it wrong. Can anyone please take a look?
Thanks!
↧
Converting current system state to Puppet code
Hi, I am looking at a project which will require several services to be rebuilt. ideally we would like to 'Puppetize' these services at the same time.
These services a largely a combination of windows web, app and sql servers but lacking any detailed build documentation.
Puppet seems great when you know exactly what you want to define / manage but does anyone have any experience of taking a current system state and converting it to Puppet code? With the Puppet resource command it seems there may be a way to automate part of this process but im just not sure where to go from here
Thanks for any advice!
↧
↧
How can I write code to install a script and .tar file on the same command for specific hostname?
I am trying to write code to install SCCM on my puppet PE, the manual command is:
./install -mp -sitecode
I know how to write a code for installing just one script , but how does it work , when there is a script and .tar file:
**install** is the name of the script file that installs the client for Linux and UNIX. This file is provided with the client software.
**•-mp** ** specifies the site code that the client is assigned to.
Example: S01
**•** specifies the command-line properties to use with the installation script.
•**client installation package** is the name of the client installation .tar package for this computer operating system, version, and CPU architecture. The client installation .tar file must be specified last.
**Example: ccm-Universal-x64..tar**
↧
" Installing and configuring ULTRAVNC" through puppet resulted error
I have simple puppet program which
1) Install the "UltraVNC" from "chocolatey" repo
2) Move the config file to "C:\Program Files\uvnc bvba\UltraVnc"
3) Then start the service
When I ran the puppet program it resulted in few errors which I have mentioned below.
" Info: Applying configuration version '48ad96db3a314f99325dde5f328dab1e54c98a00'
Notice: /Stage[main]/Nrhlteamcity::Ultravnc/File[C:\Program Files\uvnc bvba\UltraVnc]/ensure: current_value absent, shou
ld be file (noop)
Info: /Stage[main]/Nrhlteamcity::Ultravnc/File[C:\Program Files\uvnc bvba\UltraVnc]: Scheduling refresh of Service[uvnc_
service]
Notice: /Stage[main]/Nrhlteamcity::Ultravnc/Service[uvnc_service]/ensure: current_value stopped, should be running (noop
)
Info: /Stage[main]/Nrhlteamcity::Ultravnc/Service[uvnc_service]: Unscheduling refresh on Service[uvnc_service]
Notice: Class[Nrhlteamcity::Ultravnc]: Would have triggered 'refresh' from 2 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Applied catalog in 10.39 seconds
PS C:\Windows\system32> puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in C:/ProgramData/PuppetLabs/puppet/cache/lib\facter\salts.rb: undefin
ed method `split' for nil:NilClass
Error: Facter: error while resolving custom facts in C:/ProgramData/PuppetLabs/puppet/cache/lib/facter\salts.rb: undefin
ed method `split' for nil:NilClass
Info: Caching catalog for erp-udc-build06.hautelook.local
Info: Applying configuration version '48ad96db3a314f99325dde5f328dab1e54c98a00'
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - C:/Program Files/uvnc bvba/UltraVnc2017
0508-5836-rk38fl.lock at /etc/puppetlabs/code/environments/production/site/nrhlteamcity/manifests/ultravnc.pp:13
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - C:/Program Files/uvnc bvba/UltraVnc2017
0508-5836-rk38fl.lock at /etc/puppetlabs/code/environments/production/site/nrhlteamcity/manifests/ultravnc.pp:13
Wrapped exception:
No such file or directory @ dir_s_mkdir - C:/Program Files/uvnc bvba/UltraVnc20170508-5836-rk38fl.lock
Error: /Stage[main]/Nrhlteamcity::Ultravnc/File[C:\Program Files\uvnc bvba\UltraVnc]/ensure: change from absent to file
failed: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - C:/Program Files/uvnc bvba/UltraVnc201
70508-5836-rk38fl.lock at /etc/puppetlabs/code/environments/production/site/nrhlteamcity/manifests/ultravnc.pp:13
Notice: /Stage[main]/Nrhlteamcity::Ultravnc/Service[uvnc_service]: Dependency File[C:\Program Files\uvnc bvba\UltraVnc]
has failures: true
Warning: /Stage[main]/Nrhlteamcity::Ultravnc/Service[uvnc_service]: Skipping because of failed dependencies
Notice: Applied catalog in 5.58 seconds"
And my puppet program looks like
"class nrhlteamcity::ultravnc {
if $::hostname =~ /^erp-(udc|aws)-build(06|07|08)/ {
package { 'ultravnc':
ensure => latest,
provider => 'chocolatey',
}
file { 'C:\Program Files\uvnc bvba\UltraVnc':
ensure => 'present',
source => 'puppet:///modules/nrhlteamcity/UltraVNC.ini',
}
service { 'uvnc_service':
ensure => 'running',
}
Package['ultravnc'] -> File['C:\Program Files\uvnc bvba\UltraVnc'] ~> Service['uvnc_service']
}"
I think I have provided the enough info here to trouble shoot the issue.
↧
Custom Type/Provider Parameter Issue: Value updating itself each agent run.
[Referenced Module](https://github.com/RossMurr4y/iis/tree/pool32bitfalse)
In my puppet IIS module, I have a custom type called iis_pool, with a parameter called 'enable_32bit'.
newproperty(:enable_32bit) do
desc 'A Boolean to determine if 32bit mode should enabled. Defaults to false.'
newvalues(:false, :true)
end
Try as I might to convert the output into various formats, Including ONLY accepting bool values instead of symbols or string, or munging values into symbols, strings or a bool, the output always results in the following 'Notice:'
Notice: /Iis_pool[testpool]/enable_32bit: enable_32bit changed 'false' to 'false'
Now this functions correctly (as in the attribute is correctly updated on my Resource), but it messes with my reporting as every single puppet run returns changes where it is simply enforcing its existing state. So I can't reliably look at my console and see an expected number of changes, because every node is constantly seeing changes.
On the provider side of things, the method is defined as follows:
# hash with various values
def self.poolattrs
{
....
:enable_32bit => 'enable32BitAppOnWin64',
....
}
end
and then the actual definition iterates over the hash and creates methods:
Puppet::Type::Iis_pool::ProviderPowershell.poolattrs.each do |property, poolattr|
define_method "#{property}=" do |value|
@property_flush['poolattrs'][property.to_sym] = value
@property_hash[property.to_sym] = value
end
end
and then finally the attribute is updated as necessary, via the flush (the below is only the relevant part of the flush, again iterating over the hash. Final execution is to trigger the command_array string.):
# Gather all the updated 'poolattrs' and add them to the command_array
@property_flush['poolattrs'].each do |poolattr, value|
property_name = Puppet::Type::Iis_pool::ProviderPowershell.poolattrs[poolattr]
# Skip the state poolattr, we'll do it last.
next if property_name == 'state'
command_array << "Set-ItemProperty \"IIS:\\\\AppPools\\#{@property_hash[:name]}\" -Name #{property_name} -Value #{value}"
end
I'm confident that this is problem with the logic, or I've referenced the wrong hash or variable someplace. I'd greatly appreciate any assistance.
Cheers,
Ross
↧
Getting a strange error for file resource when recursive=remote
Note - a puppet newbie here - any help is much appreciated.
We are getting a "Failed to generate additional resources using 'eval_generate': Error 400 on SERVER: Permission denied" whenever a file being accessed/referenced via the file resource (directive) "recurse = remote" function is not world readable on the puppet master. It does not appear to be a file owner/group thing - it appears that all files within the source tree actually require file level accessibility to be world readable (004 mask) on the master so to deploy the file within a recursive block to a node without the above error. This is on PE 3.8 CentOS 6.8.
Is this a bug? Is this a configuration setting? The thing is that this is a blocker for us - we would like to deploy a directory tree but the world permissions cannot have read access on the node once deployed.
huh? :-)
Thanks in advance?
↧
↧
Cloud managed Puppet access LANs behind firewall
Hi,
Im new to puppet. We have a large volume of clients with predominantly Windows servers and workstations. Each client has an automation system that sits on a LAN we maintain. Rather than install a Puppet instance per client on their LAN, is there a way to centralize management from a remote server, eg from an AWS instance? How would you configure the firewall? Can Puppet nodes be configured to pull instructions rather than the server push?
↧
What does 'Unscheduling refresh on Service' mean in a puppet run output?
I am trying to install an elasticsearch instance on a node using the elastic/elasticsearch module. It installs elasticsearch but the instance service does not start. In the puppet run output there are these lines at the end:
Notice: /Stage[main]/Profile::Elasticsearch/Elasticsearch::Instance[appsNode]/Elasticsearch::Service[appsNode]/Elasticsearch::Service::Systemd[appsNode]/Service[elasticsearch-instance-appsNode]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Profile::Elasticsearch/Elasticsearch::Instance[appsNode]/Elasticsearch::Service[appsNode]/Elasticsearch::Service::Systemd[appsNode]/Service[elasticsearch-instance-appsNode]: Unscheduling refresh on Service[elasticsearch-instance-appsNode]
What does this 'Unscheduling refresh on Service' mean? What causes that to occur? In the logs for elasticsearch I did find an error:
java.lang.IllegalArgumentException: unknown setting [default.path.home] did you mean any of [default.path.conf, default.path.logs]?
So I am assuming this could be the cause of the problem. But I would like to know in general what causes the 'Unscheduling refresh on Service' to occur for puppet runs, along with help in my specific case.
For the elasticsearch module there is no way to set the home path as a setting so this default is always the case, not sure where to begin to figure this out. Thanks for any help!
↧
puppet is trying to use systemd to start my service rather than the command that I specified
This used to work on our old (2.7) puppet system but when I moved the code over to 4.x it does not anymore. My code is included in with a lot of other stuff that I don't control including all the default set up for OS etc. I suspect that something is being set somewhere that is telling puppet to *always* use systemd as the provider for Ubuntu systems.
service {
"argus.$sensor":
start => "/home/sensors/bin/run-service argus $sensor start",
restart => "/home/sensors/bin/run-service argus $sensor restart",
stop => "/home/sensors/bin/run-service argus $sensor stop",
status => "/home/sensors/bin/run-service argus $sensor status",
ensure => running;
}
We are trying to figure out what would cause this.
↧