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

Puppet directory sync does not delete absent files

$
0
0
I'm trying to have my configs directory (on Windows server 2016 node) to be synced from puppet master (puppet --version = 5.5.3) modules folder: I have my desired structure repeated under module/files. This: file { "c:\\": ensure => directory, recurse => remote, source => "puppet:///modules/configs" } works for files that exist in source dir, but does not delete files that are deleted from source (from docs I understood that it should) also I tried: file { "c:\\": ensure => directory, recurse => true, purge => true, source => "puppet:///modules/configs" } but then I get an error: Error: /Stage[main]/Main/Node[nodename]/File[c:]: Failed to generate additional resources using 'eval_generate': CreateF ile(c:/Documents and Settings, 20000000000, 1, , 3, 210000000, 0): Access is denied. I was not able to find even descent source telling possible cause for the error; Access denied makes no sense as puppet agent runs with system privileges and should be able to access every path, also script should have nothing to do with c:/Documents and Settings path to my understanding. Any help to solve this?

What is the correct way to create a resource in a provider?

$
0
0
I'm currently writing a provider that acts as a "resource wrapper". Essentially, it takes a name, type, some parameters, and then creates a resource based on that. I've been using `Puppet::Resource.new(, , parameters: )`, but it doesn't seem to take into account `Sensitive` parameters. For example, I try to create a `File` resource, like so: `Puppet::Resource.new('file', '/root/.ssh/id_rsa', parameters: params)` If the params contain a `Sensitive` value, it gives me the following error: `Could not evaluate: Parameter content failed on File[/root/.ssh/id_ra]: Munging failed for value # in class content: no implicit conversion of Puppet::Pops::Types::PSensitiveType::Sensitive into String` What resource creation call do I need to make for all parameters (sensitive or not) to be handled correctly? EDIT: I need a custom type and provider because of what I'm trying to accomplish. I want to manage resources that need to reliably know a user's home directory. For example, I want to manage `/home//.vimrc` without knowing what that directory is beforehand. The new resource type is meant to "wrap" resources with the user's home directory. Writing a custom type and provider is the only way I know to do this.

After successfully deploying to a data center, why does an Error 500 Unknown Resource Type occur after deploying to another data center running 'puppet agent -t'?

$
0
0
Despite finding several somewhat related references to this issue (Error 500) on the Internet, the cause of this particular error (Error 500: Puppet Unknown Resource Type) eludes me. Please help me resolve this issue (and thank you in advance). Problem Statement ----------------- We have three data centers: DC-East and DC-West. After successfully deploying to DC-East, I added the following code to 'site.pp' and attempted to deploy to DC-West: node /west02/ { include role::puppet_server include role::puppet_server_db } After the deployment, running 'puppet agent -t' resulted in the following error message: Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error:Error while evaluating a Resource Statement, **Unknown resource type**: 'profile_d::script' (file: /etc/puppetlabs/code/environments/test/site/profile/manifests/prereq/timeout.pp, line: 3, column: 4) on node west01 Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Note that no errors occurred when I re-ran 'puppet agent -t' (with the aforementioned change) on a Puppet Agent in DC-East. Configuration ------------- Git git add, commit, and push | Puppet Master of Masters mco r10k deploy test -v OR mco r10k synchronize | | DC-East DC-West | | Puppet Master Puppet Master | | Puppet Agents Puppet Agents puppet agent -t --debug | | east01 west01 * Certificate Authority not shown. * Linux servers are used (e.g. Linux west01 2.6.32-696.23.1.el6.x86_64 #1 SMP Sat Feb 10 11:10:31 EST 2018 x86_64 x86_64 x86_64 GNU/Linux). Code ---- There are two instances of 'profile_d' in the project: Puppetfile: mod 'marcgascon-profile_d', '0.1.0' timeout.pp: class profile::prereq::timeout { profile_d::script { 'tmout.sh': ensure => present, content_file => 'profile/tmout.sh.erb', } 'prereq.pp' contains: class role::prereq { include profile::prereq::hostfile include profile::prereq::timeout <<< Generates Error include profile::prereq::user_add include profile::prereq::sshkey include profile::prereq::sudoer <<< Same Error if timeout commented out include profile::prereq::ulimit include profile::prereq::resolv_conf include profile::prereq::nexus_get_and_untar Class['profile::prereq::user_add']-> Class['profile::prereq::sshkey']-> Class['profile::prereq::sudoer'] } Note that if 'include profile::prereq::timeout' is removed then the same error occurs on 'include profile::prereq::sudoer'. 'sudoer.pp' contains entries like: class profile::prereq::sudoer { sudo::conf { 'bbbyrelease': content => 'bbbyrelease ALL=(ALL) NOPASSWD: ALL', } } I would be grateful for your thoughts and/or suggestions. Thanks!

Puppet-strings

$
0
0
Hey, I am trying to test out Puppet strings, and i am unable to get it working. I've installed both gems yard and puppet-string I've tried on windows and on centos 7 whenever i run the command i get this error Error: Unknown Puppet subcommand 'strings' Has anyone here used strings before?

How to install a module with no manifest (puppetlabs/catalog_preview)

$
0
0
We are running Puppet 3.8 (FOSS) and are trying to migrate to Puppet 5. I was pointed at the [Puppetlabs/catalog_preview](https://github.com/puppetlabs/puppetlabs-catalog_preview#installation) module to help us diff our catalog using the 3.8 syntax versus the 4.x syntax. However, I'm confused about how to install it. The [installation instructions](https://github.com/puppetlabs/puppetlabs-catalog_preview#installation) say the following. > Install the catalog_preview module with puppet module install puppetlabs-catalog_preview. I've done this, But this just adds the module to our catalog. It's not actually installed on the Puppetmaster. Normally, I would add a statement like `include your_module_here:: submodule` into the Puppetmaster's manifest, but in this case, there's no `manifest` directory: $ ls catalog_preview/ CHANGELOG.md docs Gemfile lib LICENSE metadata.json Rakefile README.md spec $ How do I actually install this so that I can run the `puppet preview` command? # puppet agent --test ... # puppet preview Error: Unknown Puppet subcommand 'preview' See 'puppet help' for help on available puppet subcommands #

Issue with puppet bolt running "facts"

$
0
0
Just installed Bolt today so go easy on me here... (Not new to Puppet Enterprise, just new to Bolt.) I'm trying to run 'bolt task run facts' or 'bolt plan run facts' and both result in an error stating "The facts task does not exist in environment production". I have the facts module installed, 0.4.1, so I'm at a loss as to what is happening here. If I run 'bolt plan run facts' I get the following output: Starting: plan facts Starting: task facts on XXX Finished: task facts with 1 failure in 0.62 sec Finished: plan facts in 0.63 sec { "kind": "bolt/run-failure", "msg": "Plan aborted: run_task 'facts' failed on 1 nodes", "details": { "action": "run_task", "object": "facts", "result_set": [ { "node": "XXX", "status": "failure", "result": { "_error": { "kind": "puppetlabs.orchestrator/unknown-task", "msg": "The facts task does not exist in environment production", "details": { "environment": "production", "task": "facts" } } } } ] } } The orchestration-services-access.log is giving 404's as well. Also, if I go with "facts::bash" I get facts returned to me. And if I run anything else via bolt it works, 'facts' is the only thing not working. Any help would be appreciated.

wholesale jerseys from china 5053

$
0
0
Tacitus described them as red haired and wholesale jerseys large limbed.All these tribes lived very different lifestyles than neighbouring peoples in other parts of Scotland. In many areas they lived in tall stone towers, called Brochs, or other fortified sites, called Duns.They shared much with their neighbours the Venicones to the south.These low lying and fertile parts of eastern Scotland provide archaeological evidence for different types of settlement and rituals compared to those of the Highlands and Islands to the west and north.Although the were defeated by the Romans in AD 84, they were never permanently occupied.Like the Venicones and Caledones, they lived beyond the northern most frontier of the Roman Empire

cheap jerseys 63647


wholesale jerseys from china 63861

$
0
0
Was at the all star game in 1991, all the World Series games, but this is something different. It so great to finally have a player wearing a Jays logo in the Hall of Fame. Late Saturday night after the Hall of Fame had closed, we saw three teenagers taking turns posing for pictures with a bat in front the Hall main doors..

cheap jerseys

Help extracting full hash (with title) from a hash of hashes.

$
0
0
I have a YAML that looks like this: Cluster_list: server1.domain.com: port: 1234 ssl_port: 0987 server2:domain.com: port: 1234 ssl_port: 0987 server3.domain.com: port: 1234 ssl_port: 0987 The lookup would give a hash like this into the variable: {server1.domain.com => {port => 1234, ssl_port => 0987}, server2:domain.com => {port => 1234, ssl_port => 0987}, server3.domain.com => {port => 1234, ssl_port => 0987}} I can then grab one of the internal hashes using a subscript of ['server2.domain.com']... this returns the children of server2.domain.com. How can I also get the title for this hash into the variable? What I want to do is basicially: $this_server = $lookup_var[$facts[fqdn]] and end up with $this_server having the full hash: `server2:domain.com => {port => 1234, ssl_port => 0987}`

Cheap Jerseys china 10897

cheap sex toys 78737

Cheap Jerseys free shipping 78724

$
0
0
But it's a smart play if you get away with it. You would think referees would be on the lookout more. But as Boston's Brad Marchand often proves, repeated slimy moves caught on replay doesn't make them any more likely to be caught by the stripes."He's the best player in the game and he might have a little bit more leeway," a smiling O'Reilly said of Crosby.

wholesale nfl jerseys

wholesale jerseys 15212

$
0
0
Moreso, the fans won't bother searching for the CC because they like me will have the Beeb and Cricinfo as bookmarks and click right there. The casual fans are far less likely to have such bookmarks and so will rely on searches. One thing though, David: "Such relatively new forms of communication, though, are spreading the word about England's professional circuit more enthusiastically than newspapers ever did." that is doing a real disservice to some of the proper old school cricket journalists..

cheap jerseys free shipping

Cheap Jerseys china 42049


add character to first and last array elements in ruby

$
0
0
Hello I'm trying to format the output of a custom fact in ruby. I've got this array: array = [ "a", "b", "c", "d", "e", "f", "g", "h" ] what i'd like to do is add a character to the first and last elements, so i end up with: [ "na", "b", "c", "d", "e", "f", "g", "hn" ] I've tried all sorts of ways using an if array.first? or array.last? conditions in a map! statement but just can't seem to get there. Any help appreciated! Cheers

Chown Recursively excluding a directory.

$
0
0
Murugan Ramaswamy 9:04 AM (0 minutes ago) to me My requirement is to run chown command recursively for a path except for one directory in that path. For example: Path:/opt/test/ Except for path:/opt/test/new/exclude/ How can I achieve this in puppet: I can do this with Linux command like the below one: "find /opt/test/ -not -path "*/exclude/*" -exec chown user1:group1 { } \;" But I'm not able to use the option -not -path in puppet , Can someone help me on how to achieve this scenario in puppet.

Help extracting full hash (with title) from a hash of hashes.

$
0
0
I have a YAML that looks like this: Cluster_list: server1.domain.com: port: 1234 ssl_port: 0987 server2:domain.com: port: 1234 ssl_port: 0987 server3.domain.com: port: 1234 ssl_port: 0987 The lookup would give a hash like this into the variable: {server1.domain.com => {port => 1234, ssl_port => 0987}, server2:domain.com => {port => 1234, ssl_port => 0987}, server3.domain.com => {port => 1234, ssl_port => 0987}} I can then grab one of the internal hashes using a subscript of ['server2.domain.com']... this returns the children of server2.domain.com. How can I also get the title for this hash into the variable? What I want to do is basicially: $this_server = $lookup_var[$facts[fqdn]] and end up with $this_server having the full hash: `server2:domain.com => {port => 1234, ssl_port => 0987}`

Puppet Agent reports "Failed to apply catalog: Could not find dependency File"

$
0
0
Hi All, I'm new to Puppet and I need your help please. --> I'm re-configuring puppet in manuscript but testing agent fails with dependency error: root@agent:~# puppet agent --test --noop --debug --verbose <...> debug: Creating default schedules err: Failed to apply catalog: Could not find dependency File[/plugins.d] for File[/plugins.d/irq.conf] at /etc/puppet/modules/collectd/manifests/plugins/irq.pp:8 root@agent:~# --> The file is there on the puppet master: root@master:~# ls -l /etc/collectd/plugins.d/irq.conf -rw-r----- 1 root root 15 Jan 21 2015 /etc/collectd/plugins.d/irq.conf root@master:~# --> I tried replacing file location variable with hard-coded path but the agent test still complaining about it. Thanks in Advance! Thanks, George Gabra

How do I create an acceptance test for a custom function ?

$
0
0
I am trying to help out on The Forge, and the folks running the pull requests/merges are asking for an acceptance test. https://github.com/voxpupuli/puppet-yum/pull/123
Viewing all 6104 articles
Browse latest View live


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