[Puppet Users] Can I store RPM's on the Puppet Server to install on agents ?

2022-09-29 Thread 'White, Daniel E. (GSFC-770.0)[AEGIS]' via Puppet Users
Currently running PE 2021.4 on RHEL 8

We have a few assorted vendor supplied RPMs that are not available from a 
proper repository.

Is it possible to place the RPM on the PE Server somewhere so that it can be 
installed with a URL to it ?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/D7B0A1A4-47CF-4A52-A222-1BA0F29237DE%40nasa.gov.


Re: [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?

2022-03-21 Thread 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet Users
The command “puppetserver gem list” does not list  “ruby-shadow”
How do I get a list of agent side gems, please ?
__

Daniel E. White
daniel.e.wh...@nasa.gov<mailto:daniel.e.wh...@nasa.gov>
NASCOM Linux Engineer
NASA Goddard Space Flight Center
Science Applications International Corporation (SAIC)
Office: (301) 286-6919
Mobile: (240) 513-5290

From: Puppet-Users Mailing List  on behalf of 
Martin Alfke 
Reply-To: Puppet-Users Mailing List 
Date: Monday, March 21, 2022 at 07:01
To: Puppet-Users Mailing List 
Subject: Re: [EXTERNAL] [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?

Shadow is part of the ruby installation inside the puppet agent.
You can verify functionality:

/opt/puppetlabs/puppet/bin/irb
irb(main):001:0> require 'shadow'
=> true
irb(main):002:0> exit
root@node01:~#

If you receive the “true” output after you run require ’shadow’ all is set and 
you can directly start using the user resource type.

No need to install anything.


Hth,
Martin



On 21. Mar 2022, at 11:23, 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet 
Users mailto:puppet-users@googlegroups.com>> 
wrote:

Ny use case is 
https://puppet.com/docs/puppet/7/types/user.html#user-provider-useradd<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpuppet.com%2Fdocs%2Fpuppet%2F7%2Ftypes%2Fuser.html%23user-provider-useradd=04%7C01%7Cdaniel.e.white%40nasa.gov%7C3b51cdbd8bfd49f562ff08da0b2a2869%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637834572936795645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=eVdyEE%2F1opgdrhum5imNXQf9tz0t9eUM0GhhBQUXre8%3D=0>


From: Puppet-Users Mailing List 
mailto:puppet-users@googlegroups.com>> on behalf 
of Corey Osman mailto:co...@logicminds.biz>>
Reply-To: Puppet-Users Mailing List 
mailto:puppet-users@googlegroups.com>>
Date: Friday, March 18, 2022 at 18:20
To: Puppet-Users Mailing List 
mailto:puppet-users@googlegroups.com>>
Subject: [EXTERNAL] [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?


I would like to know your use case of this gem since parsing /etc/shadow or 
/etc/passwd can be done with other tooling like augeas.  Also, are you parsing 
the puppetserver's files or the agent?   Additionally, any ruby code used to 
parse files would be installed on the agent and never the puppetserver.   The 
puppetserver's job is to only compile the catalog.

To answer the original question you can pre-compile the gem and deliver/install 
to the destination.

https://github.com/apalmblad/ruby-shadow<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapalmblad%2Fruby-shadow=04%7C01%7Cdaniel.e.white%40nasa.gov%7C3b51cdbd8bfd49f562ff08da0b2a2869%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637834572936795645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=S4jgFLmQStnJPixr%2FDFmEWlI7pfOHFmenAWOY9JdtbI%3D=0>
https://stackoverflow.com/questions/3667918/how-do-you-precompile-the-native-extensions-for-a-ruby-gem-for-linux<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3667918%2Fhow-do-you-precompile-the-native-extensions-for-a-ruby-gem-for-linux=04%7C01%7Cdaniel.e.white%40nasa.gov%7C3b51cdbd8bfd49f562ff08da0b2a2869%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637834572936795645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=rTKWVeLPrpeOoGCjfy6GzE4OwtIoKe3g1YTI%2FhPL0fA%3D=0>
https://github.com/rake-compiler/rake-compiler<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frake-compiler%2Frake-compiler=04%7C01%7Cdaniel.e.white%40nasa.gov%7C3b51cdbd8bfd49f562ff08da0b2a2869%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637834572936795645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=Fg5TwUf8iiWT0w5rzZFmb9znQxAVEF6%2BWN%2FXIPMb5hU%3D=0>


Although I don't see a need to do this since there are other ways to solve 
actual issue.

The epel package will not work since it would install files in the wrong 
location and since puppetserver runs on jruby it wouldn't work anyways.

Reach out on the puppet community slack channels for more support.


Corey
NWOPS, LLC

On Thursday, March 17, 2022 at 8:49:50 AM UTC-7 nasa_dan wrote:
Will the rubygem-ruby-shadow RPM from EPEL work with PE 2021.4 instead of 
installing the gem ?

The command “puppetserver gem install ruby-shadow” fails, telling me I need to 
install development tools.
I can do that for the test-lab instance, but not in production.

Thanks.
--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
puppet-users+unsubscr...@googlegroups

Re: [EXTERNAL] [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?

2022-03-21 Thread 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet Users
Ny use case is 
https://puppet.com/docs/puppet/7/types/user.html#user-provider-useradd


From: Puppet-Users Mailing List  on behalf of 
Corey Osman 
Reply-To: Puppet-Users Mailing List 
Date: Friday, March 18, 2022 at 18:20
To: Puppet-Users Mailing List 
Subject: [EXTERNAL] [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?


I would like to know your use case of this gem since parsing /etc/shadow or 
/etc/passwd can be done with other tooling like augeas.  Also, are you parsing 
the puppetserver's files or the agent?   Additionally, any ruby code used to 
parse files would be installed on the agent and never the puppetserver.   The 
puppetserver's job is to only compile the catalog.

To answer the original question you can pre-compile the gem and deliver/install 
to the destination.

https://github.com/apalmblad/ruby-shadow
https://stackoverflow.com/questions/3667918/how-do-you-precompile-the-native-extensions-for-a-ruby-gem-for-linux
https://github.com/rake-compiler/rake-compiler


Although I don't see a need to do this since there are other ways to solve 
actual issue.

The epel package will not work since it would install files in the wrong 
location and since puppetserver runs on jruby it wouldn't work anyways.

Reach out on the puppet community slack channels for more support.


Corey
NWOPS, LLC

On Thursday, March 17, 2022 at 8:49:50 AM UTC-7 nasa_dan wrote:
Will the rubygem-ruby-shadow RPM from EPEL work with PE 2021.4 instead of 
installing the gem ?

The command “puppetserver gem install ruby-shadow” fails, telling me I need to 
install development tools.
I can do that for the test-lab instance, but not in production.

Thanks.
--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7cb87ec3-d539-4cb5-81aa-0088d9d2d74an%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CDB50CAC-F784-47F0-83D2-9B1816A66704%40nasa.gov.


[Puppet Users] Ruby gem-ruby-shadow RPM on RHEL 8 ?

2022-03-17 Thread 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet Users
Will the rubygem-ruby-shadow RPM from EPEL work with PE 2021.4 instead of 
installing the gem ?

The command “puppetserver gem install ruby-shadow” fails, telling me I need to 
install development tools.
I can do that for the test-lab instance, but not in production.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/83DDF93C-D0AE-4BDE-982F-89FF2BE3E49C%40nasa.gov.


[Puppet Users] Problems with Forge Module puppet-firewall on RHEL 8.5

2022-03-14 Thread 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet Users
I used this is a RHEL 7 PuppetServer without problem:
firewalld::custom_services:
  'pe-puppetserver':
short: 'Puppet Enterprise Server'
description: 'Puppet is a network tool for managing many disparate systems. 
Puppet Master is a server which Puppet Agents pull their configurations from.'
port:
  - port: 4433
protocol: 'tcp'
  - port: 5432
protocol: 'tcp'
  - port: 8081
protocol: 'tcp'
  - port: 8170
protocol: 'tcp'
module:
  - 'nf_conntrack_netbios_ns'
but on RHEL 8.5, it does this:
[1] 2022-03-11 18:00:30 DEBUG1: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/firewall/core/fwpolicy.py", line 
717, in get_helpers_for_service_modules
helper = self.fw.helper.gethelper(module)
  File "/usr/lib/python3.6/site-packages/firewall/core/fwhelper.py", line 
56, in get_helper
self.checkhelper(name)
  File "/usr/lib/python3.6/site-packages/firewall/core/fwhelper.py", line 
44, in check_helper
raise FirewallError(errors.INVALIDHELPER, name)
firewall.errors.FirewallError: INVALID_HELPER: netbios_ns

I filed an issue<https://github.com/voxpupuli/puppet-firewalld/issues/319> on 
GitHub.
Removing the module parameter fixed the problem, however, I realized that I 
just copied from the modules code samples.
What does this parameter do ?
If I need it, how do I use it in RHEL 8 ?
__

Daniel E. White
daniel.e.wh...@nasa.gov<mailto:daniel.e.wh...@nasa.gov>
NASCOM Linux Engineer
NASA Goddard Space Flight Center
Science Applications International Corporation (SAIC)
Office: (301) 286-6919
Mobile: (240) 513-5290

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53991344-5ACB-4D6D-94C7-C82BE6997DF0%40nasa.gov.


Re: [Puppet Users] boolean like operation for puppetdb query

2022-02-15 Thread Daniel Krämer
Hi,

no answer yet? Or did miss them? I'm not a puppet professional but i may
provide some other approaches and an opinion.

There is the function defined()
https://puppet.com/docs/puppet/7/function.html#defined , but it's tricky
because you need to be 100% sure that in your example class fail2ban is
included before the function call.
Here is an example:

❯ cat profile/manifests/test.pp
class profile::test (
) {
  notify {"this is test.": }
}

❯ cat profile/manifests/test2.pp
class profile::test2 {
  if defined(Class["profile::test"]) {
notify { "This ist test2. test is also here.": }
  } else {
notify { "This ist test2. i'm alone. i'm cold.": }
  }
}

❯ cat profile/manifests/wrapper1.pp
class profile::wrapper1 {
  include profile::test
  include profile::test2
}

❯ cat profile/manifests/wrapper2.pp
class profile::wrapper2 {
  include profile::test2
  include profile::test
}

Performing puppet runs with ('profile::wrapper1',)
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for bullseye.local
Info: Applying configuration version '1644913701'
Notice: this is test.
Notice: /Stage[main]/Profile::Test/Notify[this is test.]/message: defined
'message' as 'this is test.'
Notice: This ist test2. test is also here.
Notice: /Stage[main]/Profile::Test2/Notify[This ist test2. test is also
here.]/message: defined 'message' as 'This ist test2. test is also here.'
Notice: Applied catalog in 16.16 seconds

Performing puppet runs with ('profile::wrapper2',)
Reading package lists...
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for bullseye.local
Info: Applying configuration version '1644913738'
Notice: This ist test2. i'm alone. i'm cold.
Notice: /Stage[main]/Profile::Test2/Notify[This ist test2. i'm alone. i'm
cold.]/message: defined 'message' as 'This ist test2. i\'m alone. i\'m
cold.'
Notice: this is test.
Notice: /Stage[main]/Profile::Test/Notify[this is test.]/message: defined
'message' as 'this is test.'
Notice: Applied catalog in 15.80 seconds

For me this wouldn't be reliable enough to use.


Another approach would be to create a fact.
https://puppet.com/docs/puppet/7/external_facts.html

❯ cat profile/facts.d/fail2ban.sh
#!/bin/sh
FAIL2BAN="/usr/bin/fail2ban-client"
[ -x ${FAIL2BAN} ] && echo fail2ban_version=$(/usr/bin/fail2ban-client
--version)

❯ cat profile/manifests/test3.pp
class profile::test3 {
  if $facts["fail2ban_version"] {
notify {"The fail2ban version is ${facts['fail2ban_version']}":}
  }
}

But this solution has the same drawbacks as yours, it adds to execution
time and it can only be true on the second puppetrun.

Imho you should find the point where you include fail2ban and do your stuff
there. Or you can wrap fail2ban.


I'm sure there are puppetnerds out there with way better advice.

Greetings,
Daniel



Am Fr., 11. Feb. 2022 um 22:29 Uhr schrieb 'Matt Zagrabelny' via Puppet
Users :

> Greetings,
>
> I have a puppetdb installation that I leverage by querying from my
> manifests.
>
> I'd like to have a boolean-like operation for puppetdb that pretty much
> tests if the current node has a given class as part of the catalog. Here is
> my current code:
>
> $query = [
> 'resources[certname] {',
> 'type = "Class"',
> 'and',
> "title = \"fail2ban\"",
> 'and',
> "certname = \"${trusted['certname']}\"",
> '}',
> ]
> $this_host_has_fail2ban = puppetdb_query(
> $query.join(' ')
> ).map |$entity| {
> $entity["certname"]
> }
>
> if "${trusted['certname']}" in $this_host_has_fail2ban {
> $shall_allow_from_internet = true
> }
> else {
> $shall_allow_from_internet = false
> }
>
> Is there a simpler mechanism to find out if a node has a given class in
> its catalog?
>
> Thanks for any help!
>
> -m
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/bc6d5bf6-df6f-4850-ab35-59edc49e13c6n%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/bc6d5bf6-df6f-4850-ab35-59edc49e13c6n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
You receiv

[Puppet Users] Selectively calling custom lookup function

2020-10-06 Thread Daniel Kasen
Hello All,
I have a problem I'm trying to solve. I'm using a custom backend to fetch 
SSM values from AWS parameter store and it works nicely but with 1 problem. 
If I add the lookup call to my hiera.yaml it means every variable lookup is 
going to perform this SSM call. Now, the plugin does allow to recursively 
fetch and cache these values which takes the calls down to 1 time per run, 
but it has a large risk around decryption. As in, if any of the keys in the 
uris path defined cannot be decrypted the run will fail. This is a 
limitation with the AWS CLI and there's nothing the maintainer can do to 
resolve this. So I moved on to a different approach, only execute the SSM 
lookup for specific variables. But I cannot for the life of me figure out 
how to execute this at the hiera level. In specific manifests its simple to 
call the lookup function like this

class datadog_agent(
  $options = { 'uri' => '/root/stg/', 'region' => 'us-east-1' },
  String $api_key = hiera_ssm_paramstore('global/datadog_api_key', 
$options),

but the issue is we use a lot of puppet forge modules that I'd rather not 
fork. Along with that we have a design to set these values in our hiera 
tree:

code/environments/stg/defaults.yaml

So ideally there would be a way to do a direct function lookup call using a 
custom backend but I just can't figure it out. Something like this:

datadog_agent::api_key: "${hiera_ssm_paramstore('global/datadog_api_key', 
$options)}"



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8e63b22d-5af1-4763-a73f-226c86ee6ad2n%40googlegroups.com.


Re: [Puppet Users] Duplicate declaration: Exec

2020-09-01 Thread Daniel Krämer
That is a limitation of ensure_resource() i'm also experiencing.

For example:
❯ cat modules/profile/manifests/test1.pp
class profile::test1 {
  include profile::test3
  include profile::test2
}
❯ cat modules/profile/manifests/test2.pp
class profile::test2 {
  notify{"i'm a test":}
}
❯ cat modules/profile/manifests/test3.pp
class profile::test3 {
  ensure_resource("notify", "i'm a test")
}
This will produce a duplicate declaration error:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Server Error: Evaluation Error: Error while evaluating a Resource
Statement, Evaluation Error: Error while evaluating a Resource Statement,
Duplicate declaration: Notify[i'm a test] is already declared at (file:
/etc/puppetlabs/code/environments/production/modules/profile/manifests/test3.pp,
line: 2); cannot redeclare (file:
/etc/puppetlabs/code/environments/production/modules/profile/manifests/test2.pp,
line: 2) (file:
/etc/puppetlabs/code/environments/production/modules/profile/manifests/test2.pp,
line: 2, column: 3) on node buster.local.solutetech.net

But when i change the include order in test1.pp it will work

I guess it has something to do with what is parsed first.

Am Di., 1. Sept. 2020 um 12:19 Uhr schrieb Helmut Schneider :

> Hi,
>
> /etc/puppetlabs/code/modules/amavisd/manifests/init.pp
>
> ensure_resource('exec', '/usr/local/bin/amavisd.sh -sP', {
>path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin',
>refreshonly => true,
>command => 'su -l root -c "/usr/local/bin/amavisd.sh -sP"',
> })
>
> One client reports:
>
> Server Error: Could not find resource 'Exec[/usr/local/bin/amavisd.sh
> -sP]' in parameter 'notify' (file:
> /etc/puppetlabs/code/modules/spamassassin/manifests/init.pp, line: 49)
>
> So I add the same block also to
> /etc/puppetlabs/code/modules/spamassassin/manifests/init.pp
>
> But then another client reports:
>
> Server Error: Evaluation Error: Error while evaluating a Function Call,
> Duplicate declaration: Exec[/usr/local/bin/amavisd.sh -sP] is already
> declared at (file:
> /etc/puppetlabs/code/modules/amavisd/manifests/init.pp, line: 26);
> cannot redeclare (file:
> /etc/puppetlabs/code/modules/spamassassin/manifests/init.pp, line: 16)
>
> I thought that "ensure_resource" should avoid such conflicts? Or am I
> doing something wrong?
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ril76c%24bs8%241%40ciao.gmane.io
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B%3DxqaAdfMNjWKMEbYbNbsn%3D_DSjNsYPrhobou97%2B5WcEcqNjg%40mail.gmail.com.


[Puppet Users] ‘Contains’ conditional operator in PQL?

2019-09-27 Thread Daniel Sung
Hello,

I have a fact that is an array of strings and I would like to return all 
certnames that contain an element in that array. I’ve tried to use the in 
operator but that doesn’t work that way around and ~ does sort of work but 
it’ll match a substring of an element in the array. What is the best way to 
perform such a query?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/43ee89fd-fbf5-4873-8971-c8f538aaf5fc%40googlegroups.com.


Re: [Puppet Users] Bolt needs /opt/puppetlabs, but does not exist on debian buster

2019-08-27 Thread Daniel Krämer
There are no puppet5 packages for Debian Buster from puppetlabs at the
moment. They are expected mid October.

Am Di., 27. Aug. 2019 um 12:36 Uhr schrieb David Schmitt <
david.schm...@puppet.com>:

> "puppet" is the debian-native packaging. to get the puppetlabs packaging,
> install `puppet-agent`. You'll also want to use the puppet6 - not the
> puppet5 - release train, to get all the new stuff.
>
> Cheers, David
>
> On Tue, 27 Aug 2019 at 11:07, 'Christoph Myself' via Puppet Users <
> puppet-users@googlegroups.com> wrote:
>
>> Hi,
>>
>> I want to use  bolt to run some tasks on a debian 10 buster node
>>
>> On the buster node I Installed the puppet packages fro puppetlabs.com
>> via dpkg -i  puppet5-release-buster.deb and apt install puppet.
>>
>> But whenever I want to run a task from my bolt directory to that debian
>> buster I get an error :
>>   bash: /tmp/828ed839-b442-4a25-bfa0-69c74077f40d/patch_server.rb:
>> /opt/puppetlabs/puppet/bin/ruby: bad interpreter: No such file or directory
>>
>> I dont have an /opt/puppetlabs tree.
>>
>> The buster puppet package from puppetlabs seems to install elsewhere but
>> not in /opt/puppetlabs
>>
>> How can I run bolt tasks in this  situation ?
>>
>> Thanks
>>   Chistoph
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/3f653db0-dbfe-49bb-93a6-d2e8e1ea66fa%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CALF7fHbPpPZdNv0y9K%3DcU6M5%3D1W5gCVe-srVU_eQsz6hR8Esqw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B%3DxqaAqKS%3DU21zm3qFa7YpZ5QsxTxDy-CFCLXzf7gzHniMHbA%40mail.gmail.com.


Re: [Puppet Users] Help with Multiple Resource Declarations

2019-05-04 Thread Daniel Kinon
Hey Stephen and all,
You are correct in your assumptions, and this definitely solved my
problem.  I tried going down this path before but only met failure, looks
like my declaration syntax might have been wrong and I might have also had
issues with the define syntax itself but I'm unsure at this point.  Most
importantly, it works!

So now that this is working, will it also work if I have multiple
different manifests declaring the same resource?  I'm trying to use the
concept of roles so that I can assign one to many roles to each host.  So
lets assume the username is *testing*.  If I have role1.pp declare
`base::systemusers { testing: }` and role2.pp also declares the same user,
I'm assuming that will also create a resource duplication.  If that
assumption is incorrect then I'm good, otherwise I'm not sure how to solve
that issue.  I've read up on virtual resources and I think I understand how
the declaration works however I'm unsure where to collect/realize that
resource.
Thanks,
-Dan

On Fri, May 3, 2019 at 10:14 AM Stephen Marlow 
wrote:

> Hey Dan,
>
>   The error you're getting is just saying that you've declared the
> Base::Systemusers class twice and a class can only be declared once. I
> suspect that your code looks something like this:
>
>   $systemusers   = lookup({ name => 'base::systemusers' })
>   $systemusers.each |$username, $userinfo| {
> class { 'base::systemusers':
>   username => $username,
> }
>   }
>
>   If that is the case then you should be able to fix the problem by
> changing Base::Systemusers from a class to a define. Defined types can be
> declared multiple times as long as each one has a unique title. You can
> find more information about defined types here:
> https://puppet.com/docs/puppet/6.4/lang_defined_types.html
>
>   The syntax to declare the defined type would change slightly. It should
> look like this:
>   base::systemusers { $username: }
>
>   Let me know if you have any questions (or if I guess incorrectly about
> what your code looks like).
>
>   - Steve
>
> On Fri, May 3, 2019 at 12:21 PM Daniel Kinon  wrote:
>
>> Hello Everyone,
>> So I'm trying to create templates for system users.  Here is my
>> systemusers class:
>> ~~~
>> class base::systemusers (
>>   $username = $title,
>>   $home = "/var/lib/$username",
>> ) {
>>   $systemusers   = lookup({ name => 'base::systemusers' })
>>   user { $username:
>> ensure => present,
>> system => true,
>> uid=> $systemusers[$username]['uid'],
>> home   => $home,
>> managehome => true,
>> shell  => '/bin/bash',
>>   }
>>
>>   file { "$home/.ssh":
>> ensure  => directory,
>> owner   => $username,
>> group   => $username,
>> mode=> '0700',
>>   }
>>
>>   file { "/var/run/$username":
>> ensure  => directory,
>> owner   => $username,
>> group   => $username,
>> mode=> '0755',
>>   }
>>
>>   file { "/var/log/$username":
>> ensure  => directory,
>> owner   => $username,
>> group   => $username,
>> mode=> '0755',
>>   }
>> ~~~
>>
>> This works great when I only have 1 system user but the minute I have
>> more than 1 I get a *Duplicate declaration: Class[Base::Systemusers] *error.
>> I've looked at the docs for virtual resources (tbh, it breaks my brain a
>> little) but all the examples seem to be for general resources and not
>> classes.  I've tried a bunch of different iterations to solve this and I
>> haven't gotten any of them to work.  If someone could point me in the right
>> direction, I'd appreciate it.
>>
>> Thanks,
>> -Dan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAMGSraH5Sn31xPt8Z4DN8Xj74g20TZZ4z%3DPgD5TwgP%3DtWRT%3DxQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAMGSraH5Sn31xPt8Z4DN8Xj74g20TZZ4z%3DPgD5TwgP%3DtWRT%3DxQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and

[Puppet Users] Help with Multiple Resource Declarations

2019-05-03 Thread Daniel Kinon
Hello Everyone,
So I'm trying to create templates for system users.  Here is my
systemusers class:
~~~
class base::systemusers (
  $username = $title,
  $home = "/var/lib/$username",
) {
  $systemusers   = lookup({ name => 'base::systemusers' })
  user { $username:
ensure => present,
system => true,
uid=> $systemusers[$username]['uid'],
home   => $home,
managehome => true,
shell  => '/bin/bash',
  }

  file { "$home/.ssh":
ensure  => directory,
owner   => $username,
group   => $username,
mode=> '0700',
  }

  file { "/var/run/$username":
ensure  => directory,
owner   => $username,
group   => $username,
mode=> '0755',
  }

  file { "/var/log/$username":
ensure  => directory,
owner   => $username,
group   => $username,
mode=> '0755',
  }
~~~

This works great when I only have 1 system user but the minute I have more
than 1 I get a *Duplicate declaration: Class[Base::Systemusers] *error.
I've looked at the docs for virtual resources (tbh, it breaks my brain a
little) but all the examples seem to be for general resources and not
classes.  I've tried a bunch of different iterations to solve this and I
haven't gotten any of them to work.  If someone could point me in the right
direction, I'd appreciate it.

Thanks,
-Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMGSraH5Sn31xPt8Z4DN8Xj74g20TZZ4z%3DPgD5TwgP%3DtWRT%3DxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver6 and hiera-eyaml-gpg

2019-02-19 Thread Daniel Kinon
Hey Chengkai,
That was definitely the problem.  I made a bad assumption that
`puppetserver gem install` and `/opt/puppetlabs/puppet/bin/gem install`
were the same thing.  Everything works perfectly now.
Thanks!
-Dan

On Tue, Feb 19, 2019 at 12:42 PM chengkai liang  wrote:

> You will also need to install hiera-eyaml via
> /opt/puppetlabs/puppet/bin/gem. Puppetserver only install gem for jruby
>
> On Sat, Feb 16, 2019 at 23:00 Daniel Kinon  wrote:
>
>> Hello,
>> I'm running puppetserver 6.2.0 with hiera-eyaml-gpg but can't seem to
>> get past the following error when I perform a lookup for an encrypted block
>> during a puppet agent run:
>> ~~~
>> Error: Could not run: cannot load such file --
>> hiera/backend/eyaml/encryptors/gpg
>> ~~~
>>
>> Here is the full gem list from puppetserver and all the requisite gems
>> are present (hiera-eyaml, hiera-eyaml-gpg, ruby_gpg [since gpgme fails
>> install]):
>> ~~~
>> # puppetserver gem list
>>
>> *** LOCAL GEMS ***
>>
>> cmath (default: 1.0.0)
>> csv (default: 1.0.0)
>> deep_merge (1.0.1)
>> facter (2.5.1)
>> fast_gettext (1.1.2)
>> fileutils (default: 1.1.0)
>> gettext (3.2.2)
>> hiera-eyaml (2.1.0)
>> hiera-eyaml-gpg (0.6)
>> highline (1.6.21)
>> hocon (1.2.5)
>> ipaddr (default: 1.2.0)
>> jar-dependencies (default: 0.3.12)
>> jruby-openssl (default: 0.10.0 java)
>> jruby-readline (default: 1.2.2 java)
>> json (default: 2.1.0 java)
>> locale (2.1.2)
>> mini_portile2 (2.4.0)
>> multi_json (1.13.1)
>> psych (default: 3.0.2 java)
>> puppet-resource_api (1.7.0)
>> puppetserver-ca (1.2.1)
>> rake-ant (default: 1.0.4)
>> rdoc (default: 6.0.1)
>> ruby_gpg (0.3.2)
>> scanf (default: 1.0.0)
>> semantic_puppet (1.0.2)
>> text (1.3.1)
>> trollop (2.1.2)
>> webrick (default: 1.4.2)
>> ~~~
>>
>> Any ideas on what I might be missing or how to get more verbose output
>> for further troubleshooting?
>> Thanks!
>> -Dan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/3657e2ed-6e30-477d-bd0c-4dc9e445a034%40googlegroups.com
>> <https://groups.google.com/d/msgid/puppet-users/3657e2ed-6e30-477d-bd0c-4dc9e445a034%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAC9thQUyF4-eB0%3DaKtF2AwHgg-s%2Bn2PXPHdJ4-CxwveRS8sT2g%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAC9thQUyF4-eB0%3DaKtF2AwHgg-s%2Bn2PXPHdJ4-CxwveRS8sT2g%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMGSraF3h4Q3VhndWv1Hb%3DUuKZVKTQJbgx5g4vHy%2B7aYfWpbNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetserver6 and hiera-eyaml-gpg

2019-02-16 Thread Daniel Kinon
Hello,
I'm running puppetserver 6.2.0 with hiera-eyaml-gpg but can't seem to 
get past the following error when I perform a lookup for an encrypted block 
during a puppet agent run:
~~~
Error: Could not run: cannot load such file -- 
hiera/backend/eyaml/encryptors/gpg
~~~

Here is the full gem list from puppetserver and all the requisite gems are 
present (hiera-eyaml, hiera-eyaml-gpg, ruby_gpg [since gpgme fails 
install]):
~~~
# puppetserver gem list

*** LOCAL GEMS ***

cmath (default: 1.0.0)
csv (default: 1.0.0)
deep_merge (1.0.1)
facter (2.5.1)
fast_gettext (1.1.2)
fileutils (default: 1.1.0)
gettext (3.2.2)
hiera-eyaml (2.1.0)
hiera-eyaml-gpg (0.6)
highline (1.6.21)
hocon (1.2.5)
ipaddr (default: 1.2.0)
jar-dependencies (default: 0.3.12)
jruby-openssl (default: 0.10.0 java)
jruby-readline (default: 1.2.2 java)
json (default: 2.1.0 java)
locale (2.1.2)
mini_portile2 (2.4.0)
multi_json (1.13.1)
psych (default: 3.0.2 java)
puppet-resource_api (1.7.0)
puppetserver-ca (1.2.1)
rake-ant (default: 1.0.4)
rdoc (default: 6.0.1)
ruby_gpg (0.3.2)
scanf (default: 1.0.0)
semantic_puppet (1.0.2)
text (1.3.1)
trollop (2.1.2)
webrick (default: 1.4.2)
~~~

Any ideas on what I might be missing or how to get more verbose output for 
further troubleshooting?
Thanks!
-Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3657e2ed-6e30-477d-bd0c-4dc9e445a034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] reduce function doesn't return results from single iteration

2019-02-09 Thread Daniel Kinon
Hey Steve,
Ha, totally obvious now what the issue is.  This is exactly what I needed, 
thanks for the help and great explanation!
Cheers,
-Dan

> On Feb 9, 2019, at 10:41 AM, Stephen Marlow  
> wrote:
> 
> Hey Dan,
> 
>  In each iteration of the reduce function the memo value is replaced by the 
> result value of the block. The final return value of reduce is the result of 
> the last iteration of the block. The result of the block is the value of the 
> last statement executed. Your block has two possible results:
> 1) $result + $group when the condition is met
> 2) Undef otherwise (which I think might be the result of the if statement)
> 
>   Since user1 doesn't match the condition in the last iteration the result of 
> the reduce is Undef.
> 
>   To correct this you could add an else clause that just returns $result, e.g.
> 
>   $usergroups = $hostgroups.reduce([]) |$result, $group| {
> $members = $groups[$group]["members"]
> warning("[$username] $group: $members")
> if ( $username in $members ) {
>   warning("[$username] Added $group")
>   $result + $group
> } else {
>   $result
> }
>   }
> 
>   Hope this helps.
> - Steve
> 
> 
>> On Sat, Feb 9, 2019 at 12:52 PM Daniel Kinon  wrote:
>> Hello,
>> I'm attempting to use the reduce 
>> function(https://puppet.com/docs/puppet/6.2/function.html#reduce) to 
>> consolidate hiera facts into data structures I can use with puppet 
>> resources.  I've run into an issue that I'm not sure how to solve.  When the 
>> data passed to the reduce function results in 2 or more iterations, I get 
>> the data return I expect.  When the data passed only results in 1 
>> iterations, I get back no results when I expect one result.  Here is the 
>> applicable code snippet (hiera lookups replaced with dummy data):
>> ~~~
>>   $groups  = {
>> "group1" => {
>>   "gid" => 901,
>>   "members" => ["user1","user2","user3","user4"],
>> },
>> "group2" => {
>>   "gid" => 902,
>>   "members" => ["user2"],
>> }
>>   }
>>   $hostgroups = [ "group1", "group2" ]
>>   $usernames = ["user1","user2"]
>> 
>>   $usernames.each |$username| {
>> $usergroups = $hostgroups.reduce([]) |$result, $group| {
>>   $members = $groups[$group]["members"]
>>   warning("[$username] $group: $members")
>>   if ( $username in $members ) {
>> warning("[$username] Added $group")
>> $result + $group
>>   }
>> }
>> warning("[$username] groups: $usergroups")
>> warning()
>>   }
>> ~~~
>> 
>> The output of this code shows user1 with an empty array of groups when it 
>> should have group1 while user2 has the expected 2 group output:
>> ~~~
>> Warning: Scope(Class[Base::Test]): [user1] group1: [user1, user2, user3, 
>> user4]
>> Warning: Scope(Class[Base::Test]): [user1] Added group1
>> Warning: Scope(Class[Base::Test]): [user1] group2: [user2]
>> Warning: Scope(Class[Base::Test]): [user1] groups:
>> Warning: Scope(Class[Base::Test]):
>> Warning: Scope(Class[Base::Test]): [user2] group1: [user1, user2, user3, 
>> user4]
>> Warning: Scope(Class[Base::Test]): [user2] Added group1
>> Warning: Scope(Class[Base::Test]): [user2] group2: [user2]
>> Warning: Scope(Class[Base::Test]): [user2] Added group2
>> Warning: Scope(Class[Base::Test]): [user2] groups: [group1, group2]
>> Warning: Scope(Class[Base::Test]):
>> ~~~
>> 
>> Let me know if I'm missing something otherwise this seems like it might be a 
>> bug.
>> Thanks,
>> -Dan
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/bc076bfc-86b2-40c9-a07e-05a632909048%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CALGSqjJ4yEJkY__0%2Bm4b6kugbhOq2kV%2Ba3jYMgueWec4ikx_mA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/06EDD94E-68C0-4CD5-BEF2-C5DE6EE724E5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] reduce function doesn't return results from single iteration

2019-02-09 Thread Daniel Kinon
Hello,
I'm attempting to use the reduce 
function(https://puppet.com/docs/puppet/6.2/function.html#reduce) to 
consolidate hiera facts into data structures I can use with puppet 
resources.  I've run into an issue that I'm not sure how to solve.  When 
the data passed to the reduce function results in 2 or more iterations, I 
get the data return I expect.  When the data passed only results in 1 
iterations, I get back no results when I expect one result.  Here is the 
applicable code snippet (hiera lookups replaced with dummy data):
~~~
  $groups  = {
"group1" => {
  "gid" => 901,
  "members" => ["user1","user2","user3","user4"],
},
"group2" => {
  "gid" => 902,
  "members" => ["user2"],
}
  }
  $hostgroups = [ "group1", "group2" ]
  $usernames = ["user1","user2"]

  $usernames.each |$username| {
$usergroups = $hostgroups.reduce([]) |$result, $group| {
  $members = $groups[$group]["members"]
  warning("[$username] $group: $members")
  if ( $username in $members ) {
warning("[$username] Added $group")
$result + $group
  }
}
warning("[$username] groups: $usergroups")
warning()
  }
~~~

The output of this code shows user1 with an empty array of groups when it 
should have group1 while user2 has the expected 2 group output:
~~~
Warning: Scope(Class[Base::Test]): [user1] group1: [user1, user2, user3, 
user4]
Warning: Scope(Class[Base::Test]): [user1] Added group1
Warning: Scope(Class[Base::Test]): [user1] group2: [user2]
Warning: Scope(Class[Base::Test]): [user1] groups:
Warning: Scope(Class[Base::Test]):
Warning: Scope(Class[Base::Test]): [user2] group1: [user1, user2, user3, 
user4]
Warning: Scope(Class[Base::Test]): [user2] Added group1
Warning: Scope(Class[Base::Test]): [user2] group2: [user2]
Warning: Scope(Class[Base::Test]): [user2] Added group2
Warning: Scope(Class[Base::Test]): [user2] groups: [group1, group2]
Warning: Scope(Class[Base::Test]):
~~~

Let me know if I'm missing something otherwise this seems like it might be 
a bug.
Thanks,
-Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bc076bfc-86b2-40c9-a07e-05a632909048%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] One master per environment, or one to rule them all?

2017-10-12 Thread Daniel Urist
Option (2) allows you to test upgrades to the puppet infrastructure itself,
which changes not infrequently.

On Wed, Oct 11, 2017 at 3:15 PM, Antony Gelberg 
wrote:

> I've asked a similar question on the Terraform mailing-list but on
> reflection, I think it's more appropriate here.
>
> Let's say I need several environments, and I'm using AWS, with each
> environment in a separate VPC. I'm going to configure instances with Puppet
> (and deploy with Jenkins). I see two basic design options here:
>
> *Option 1: Puppet master in one environment / VPC, either:*
>
>1. In their own VPC, e.g. "devops".
>2. Less-optimally, piggy-backed on an application environment VPC,
>e.g. "staging".
>
> This master would be responsible for configuring all servers across all
> other environments / VPCs.
>
> Implications:
>
>- Have to open up security groups, scope for environments to affect
>each other.
>- Configuring Puppet environments using something like r10k, high
>dependency on that enviroment
>- VPCs will have to have different CIDRs (not sure if this is a big
>deal).
>
>
> *Option 2: Every environment to have its own Puppet master.*
>
> Implications:
>
>- More costly.
>- Feels "cleaner", each Puppet master only needs to handle one
>environment.
>- Less likely for environments to interfere with each other.
>- Potentially less (or more?) pain with managing Puppet environments.
>- Might be overly complex.
>
> Is either of these an obviously better choice than the other? If (1) is
> better, is sub-option (1) or (1) better?
> Or are both options both viable and sane?
>
> NB Assume that "master" may mean "masters" according to the need.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/d5c26bc6-c7ce-4439-8073-41c462f9ded2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKaD-qaEy8hhi6ACqEVqz1KRhfyBh5YLk1tviwf4TMs54Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] ERB variable scope

2017-10-09 Thread Daniel Urist
Thanks very much.

It would be great if the template doc page (
https://docs.puppet.com/puppet/5.3/lang_template.html) gave more guidance
on epp vs erp, use cases for each and possible gotchas like this.

On Fri, Oct 6, 2017 at 4:17 PM, Henrik Lindberg <henrik.lindb...@puppet.com>
wrote:

> On 06/10/17 11:28, Daniel Urist wrote:
>
>> I've noticed in classes with multiple templates that ERB variables seem
>> to share a single scope. That caught me by surprise-- is that intended
>> behavior?
>>
>>
> Intended or not - that is the behavior, and this is Ruby so it is possible
> to mutate things that should be immutable.
>
> There is great responsibility when writing code in ERB because of the
> generality and power available in Ruby. Suggest using EPP instead where
> problems like this one does not occur.
>
> Best,
> - henrik
>
> Here's a simple test case:
>>
>> class erb_scope_test (
>> )
>> {
>>$myarr1 = [ 'one' ]
>>$myarr2 = [ 'two' ]
>>
>>$str1 = inline_template("<%= @myarr1.concat(@myarr2) %>")
>>notify { $str1: }
>>
>>$str2 = inline_template("<%= @myarr1.concat(@myarr2) %>")
>>notify { $str2: }
>> }
>>
>> Notice: ["one", "two"]
>> Notice: ["one", "two", "two"]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com > puppet-users+unsubscr...@googlegroups.com>.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/puppet-users/CAEo6%3DKbd8wMO9rvzHMe4W-bo%2BizqLxyAyEf4Th
>> WScOAgpL%2BkdA%40mail.gmail.com <https://groups.google.com/d/m
>> sgid/puppet-users/CAEo6%3DKbd8wMO9rvzHMe4W-bo%2BizqLxyAyEf4T
>> hWScOAgpL%2BkdA%40mail.gmail.com?utm_medium=email_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/puppet-users/or8vca%242te%241%40blaine.gmane.org.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKY%2B16i7Nxpaj9yDo%3DsY_YW6WdBfPUVHC0Dw2jBas7JQdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] ERB variable scope

2017-10-06 Thread Daniel Urist
I've noticed in classes with multiple templates that ERB variables seem to
share a single scope. That caught me by surprise-- is that intended
behavior?

Here's a simple test case:

class erb_scope_test (
)
{
  $myarr1 = [ 'one' ]
  $myarr2 = [ 'two' ]

  $str1 = inline_template("<%= @myarr1.concat(@myarr2) %>")
  notify { $str1: }

  $str2 = inline_template("<%= @myarr1.concat(@myarr2) %>")
  notify { $str2: }
}

Notice: ["one", "two"]
Notice: ["one", "two", "two"]

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKbd8wMO9rvzHMe4W-bo%2BizqLxyAyEf4ThWScOAgpL%2BkdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] rsync.puppet.com HA upgrade

2017-07-12 Thread Daniel Dreier
We're upgrading the rsync service for mirroring Puppet's apt and yum
repositories from the single node it's currently on to an HA setup. The DNS
update will go out shortly. I'm not expecting any user-visible changes, but
if you do see problems please let me know.

-- 
Daniel Dreier
Site Reliability Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suZmDP9SRpKQ32RTSQy8Ab%3DOw46SaJydwH2rEZokgLK71w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] apt, yum, downloads, and rsync infrastructure improvements

2017-06-30 Thread Daniel Dreier
On Fri, Jun 30, 2017 at 2:14 AM, SCHAER Frederic <frederic.sch...@cea.fr>
wrote:

> Hi,
>
>
>
> I  was (up to now) mirroring the puppetlabs repositories to both :
>
> -  Make sure I have a local copy in case your repos are down, or
> our internet link is too weak
>
> -  Not hammer on your infrastructure with our servers
>
Much appreciated!



> Unfortunately, we just noticed our mirroring suddenly got broken just
> after your changes.
>
> We use lftp, but I just tried with a recursive wget and see the same
> issue, depending on the max depth I ask.
>
>
>
> What I see after a simple wget –r –l1 yum.puppetlabs.com is this :
>
>
>
> # ll yum.puppetlabs.com/el/6Server/
>
> total 28
>
> -rw-r--r-- 1 root root 1635 Jun 28 20:01 dependencies
>
> -rw-r--r-- 1 root root 1603 Jun 28 20:01 devel
>
> -rw-r--r-- 1 root root 1832 Jun 28 20:01 index_by_lastModified.html
>
> -rw-r--r-- 1 root root 1824 Jun 28 20:01 index_by_name_reverse.html
>
> -rw-r--r-- 1 root root 1832 Jun 28 20:01 index_by_size.html
>
> -rw-r--r-- 1 root root 1592 Jun 28 20:01 PC1
>
> -rw-r--r-- 1 root root 1618 Jun 28 20:01 products
>
>
>
> Symlinks or directories now are files, and those are html files with
> relative hrefs to the corresponding files/directories
>

Symlinks don't exist anymore because we're using S3 as the backend to
CloudFront, and S3 has no concept of symlinks. We're still shipping
symlinks to the rsync servers, so if you "rsync -a rsync://
rsync.puppet.com/packages/yum /tmp/yum" you'll get the symlinks, which is a
lot more space efficient than mirroring the fully-resolved filesystems via
HTTPS.


>
>
> Is there a « now recommended » way of mirroring the repos ?
>
> (I’ve tried the lftp –dereference option to no avail…)
>

Each of the following should work:

Rsync: rsync -a rsync://rsync.puppet.com/packages/yum /tmp/yum
Directly from S3: aws s3 sync --exclude '*.html' s3://yum.puppetlabs.com
/tmp/yum
HTTPS via CloudFront: wget -r https://yum.puppetlabs.com

Of them, rsync and aws s3 sync are both incremental, so they'll be more
bandwidth efficient and faster compared to using wget. If any of those
options aren't working, I'd like to know about it.

I'm seeing the same behavior you described when wget max depth is set, but
I don't understand the use case where you'd limit depth on it; it seems
like you'd end up with a broken repository if you didn't sync down pretty
much everything.


>
>
> I see rsync is still sort of supported, but I have the impression you
> would prefer that we use your new CDN (hence, get the files through
> cloudfront using http …)
>

rsync is absolutely still supported. After we discontinued it last time and
got a lot of pushback, I've been working on an HA rsync.


>
>
> Thanks && regards
>
> Frederic Schaer
>
>
>
> *De :* puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com]
> *De la part de* Daniel Dreier
> *Envoyé :* mercredi 28 juin 2017 20:26
> *À :* puppet-users@googlegroups.com
> *Objet :* [Puppet Users] apt, yum, downloads, and rsync infrastructure
> improvements
>
>
>
> Today we're making improvements to apt.puppetlabs.com, yum.puppetlabs.com,
> and downloads.puppetlabs.com. I don't anticipate any user-visible
> changes, and this notification is just to let folks know so that you can
> report problems to me.
>
>
>
> Specifically, we're switching out the CDN backend - it's been running off
> a server in Linode, and we're switching to an S3 backend, which will be
> faster and more reliable.
>
>
>
> If you see any problems with the apt/yum download infrastructure, please
> let me know.
>
>
>
> --
>
> Daniel Dreier
>
> Technical Operations Engineer
>
> GPG: BA4379FD
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/CAGk8subLmT0QDSh79Jd9KOCxfzRXO
> TqK4i0Padvhk3Abq0iQTg%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAGk8subLmT0QDSh79Jd9KOCxfzRXOTqK4i0Padvhk3Abq0iQTg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups

[Puppet Users] apt, yum, downloads, and rsync infrastructure improvements

2017-06-28 Thread Daniel Dreier
Today we're making improvements to apt.puppetlabs.com, yum.puppetlabs.com,
and downloads.puppetlabs.com. I don't anticipate any user-visible changes,
and this notification is just to let folks know so that you can report
problems to me.

Specifically, we're switching out the CDN backend - it's been running off a
server in Linode, and we're switching to an S3 backend, which will be
faster and more reliable.

If you see any problems with the apt/yum download infrastructure, please
let me know.

-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8subLmT0QDSh79Jd9KOCxfzRXOTqK4i0Padvhk3Abq0iQTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Force custom service provider to never be default

2017-06-06 Thread Daniel Urist
I've written a simple custom service provider for monit that inherits from
the debian provider. Since this is running on debian systems, I want to use
the debian "enable" to enable/disable running at boot, but I want monit to
manage the running service rather than puppet.

Puppet::Type.type(:service).provide :monitdummy, :parent => :debian do
>   desc <<-'EOT'
> Dummy provider for monit; always reports status as "running" so puppet
> doesn't manage the running state
>   EOT
>
>   confine :exists => "/usr/bin/monit"
>
>   def startcmd
> [ "/bin/true" ]
>   end
>   def stopcmd
> [ "/bin/true" ]
>   end
>   def restartcmd
> [ "/bin/true" ]
>   end
>   def statuscmd
> [ "/bin/true" ]
>   end
> end
>

It works for what I need. My problem is that this has now become the
default provider on my system, according to facter:

# facter -p | grep service
> service_provider => monitdummy


I've tried adding a call to "defaultfor" like this:

defaultfor :operatingsystem => 'none'


...but that doesn't have any effect, I guess because it's inheriting the
defaultfor from the debian provider and there can be multiple?

Looking at the code in
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider.rb,
there is the function "self.specificity" that picks the provider with the
most ancestors, so I guess that's why my provider gets picked over debian.

I realize I could set debian as the default provider with "Service {
provider => 'debian' }" in a high-level manifest, but that seems less than
ideal since it short-circuits puppet's provider selection-- what I'd really
like would be for a way to ensure that my custom provider is never the
default.

Is there any way to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYU449ig7VmDYiLYkhpjDz9-jMP_aXx7isSyQkpOxiRew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] List all hosts

2017-05-31 Thread Daniel Scott
On Wednesday, 31 May 2017 14:36:33 UTC+1, R.I. Pienaar wrote:
>
>
>
> On Wed, May 31, 2017, at 15:33, Daniel Scott wrote: 
> > Hi, 
> > 
> > I'm looking for a way to list all hosts known by a puppetserver (in 
> > puppetdb). 
> > 
> > I've been using 'puppet cert list --all', however, this doesn't 
> > necessarily 
> > correspond to the list of hosts in puppetdb (for example, if I have to 
> > rebuild the puppet server, and lose all the certs, but I still have the 
> > database). 
> > 
> > Is there a 'puppet' command to list all known hosts? 
> > 
> > I know that it's possible by running a curl against the puppetdb server 
> > itself, but it would be much cleaner if I could just run a command on 
> the 
> > puppetserver. 
>
> Install the client tools: 
>
>https://docs.puppet.com/puppetdb/4.4/pdb_client_tools.html 
>
> Use PQL to query it: 
>
>https://docs.puppet.com/puppetdb/4.4/api/query/examples-pql.html 
>

Hmm, thanks.

That's basically a wrapper around a curl, right?

 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6d6d748b-3190-447b-abd3-8296335bfa67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] List all hosts

2017-05-31 Thread Daniel Scott
Hi,

I'm looking for a way to list all hosts known by a puppetserver (in 
puppetdb).

I've been using 'puppet cert list --all', however, this doesn't necessarily 
correspond to the list of hosts in puppetdb (for example, if I have to 
rebuild the puppet server, and lose all the certs, but I still have the 
database).

Is there a 'puppet' command to list all known hosts?

I know that it's possible by running a curl against the puppetdb server 
itself, but it would be much cleaner if I could just run a command on the 
puppetserver.

Thanks,

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/85db5579-ce6b-463d-a8d0-a2f6861048e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: apt/yum.downloads.puppetlabs.com CDN & rsync deprecation

2017-04-26 Thread Daniel Dreier
I'm sorry we broke people's rsync-based repository mirroring. I should have 
communicated this change well in advance. To get you all mirroring our 
repositories again, I've configured rsync.puppet.com. You can sync from it 
using a command like:

rsync -av --copy-links --del rsync://rsync.puppet.com/packages/yum/ 
/tmp/yum/
rsync -av --copy-links --del rsync://rsync.puppet.com/packages/apt/ 
/tmp/apt/

Please let me know if you have any trouble with the new rsync service.

On Wednesday, April 26, 2017 at 5:51:31 AM UTC-7, Brian Long wrote:
>
> I just cannot believe they would do this without any warning for the end 
> user community, whether open-source or commercial customers.  Look at other 
> open-source projects like Fedora and Ubuntu for an example; they would send 
> warnings at least two weeks in advance before turning off a service that 
> has been around for years.
>
> /Brian/
>
> On Monday, April 24, 2017 at 2:19:22 PM UTC-4, Christopher Wood wrote:
>>
>> Not sure about the rest of you, but since I have no contract with Puppet 
>> Inc. specifying the maintenance of rsync services I would shrug and move to 
>> using apt-mirror. I've used it before and it's nearly drop-in. 
>>
>> https://apt-mirror.github.io/ 
>> https://packages.debian.org/jessie/apt-mirror 
>> https://forge.puppet.com/jtopjian/apt_mirror 
>>
>> Pity about rsync service though. 
>>
>> On Mon, Apr 24, 2017 at 11:13:29AM -0700, Garrett Honeycutt wrote: 
>> > +1 to an alternate rsync service. 
>> > 
>> > A lot of us already have tooling built up around rsync, so this change 
>> > breaks work flows. It also comes without warning for a service that has 
>> > been around for ages. 
>> > 
>> > Best regards, 
>> > -g 
>> > 
>> > On 4/24/17 7:19 AM, Andreas Paul wrote: 
>> > > We would also be interested in an alternative server to rsync from. 
>> > > 
>> > > Best regards, 
>> > > Andreas Paul 
>> > > 
>> > > On Monday, April 24, 2017 at 2:46:24 PM UTC+2, Chris Kuehl wrote: 
>> > > 
>> > > Is there an alternative server we can rsync from? We've been 
>> using 
>> > > ftpsync (the recommended tool 
>> > > <https://www.debian.org/mirror/ftpmirror> for mirroring apt 
>> > > repositories), which worked great until this was turned off. 
>> ftpsync 
>> > > appears to be at least somewhat superior to the other options. 
>> > > 
>> > > Thanks, 
>> > > Chris 
>> > > 
>> > > On Friday, April 21, 2017 at 1:54:36 PM UTC-7, Daniel Dreier 
>> wrote: 
>> > > 
>> > > On Wednesday we put yum.puppetlabs.com 
>> > > <http://yum.puppetlabs.com> and apt.puppetlabs.com 
>> > > <http://apt.puppetlabs.com> behind the CloudFront CDN in 
>> order 
>> > > to accelerate downloads for overseas users. Both repositories 
>> > > have historically been served from the Linode Fremont 
>> > > datacenter, and download performance from Australia and Asia 
>> in 
>> > > particular are dramatically faster with the CDN than without. 
>> > > 
>> > > One side effect is that we no longer support rsync. Other 
>> tools 
>> > > like mrepo, reposync, and apt-mirror can sync to your local 
>> > > mirror via HTTP. Since you'll be accessing cached content 
>> from a 
>> > > local CloudFront edge location, HTTP mirroring should be very 
>> > > fast for most users. 
>> > > 
>> > > -- 
>> > > Daniel Dreier 
>> > > Technical Operations Engineer 
>> > > GPG: BA4379FD 
>> > > 
>> > > -- 
>> > > You received this message because you are subscribed to the Google 
>> > > Groups "Puppet Users" group. 
>> > > To unsubscribe from this group and stop receiving emails from it, 
>> send 
>> > > an email to puppet-users...@googlegroups.com 
>> > > <mailto:puppet-users+unsubscr...@googlegroups.com>. 
>> > > To view this discussion on the web visit 
>> > > 
>> https://groups.google.com/d/msgid/puppet-users/d1c9a550-cc51-48bb-8d5b-3c6d4c5477b8%40googlegroups.com
>>  
>> > > <
>> https://groups.google.com/d/msgid/puppet-users/d1c9a550-cc51-48bb-8d5b-3c6d4c5477b8%40googlegroups.com?utm_medium=email_source=footer>.

[Puppet Users] apt/yum.downloads.puppetlabs.com CDN & rsync deprecation

2017-04-21 Thread Daniel Dreier
On Wednesday we put yum.puppetlabs.com and apt.puppetlabs.com behind the
CloudFront CDN in order to accelerate downloads for overseas users. Both
repositories have historically been served from the Linode Fremont
datacenter, and download performance from Australia and Asia in particular
are dramatically faster with the CDN than without.

One side effect is that we no longer support rsync. Other tools like mrepo,
reposync, and apt-mirror can sync to your local mirror via HTTP. Since
you'll be accessing cached content from a local CloudFront edge location,
HTTP mirroring should be very fast for most users.

-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suaOotYnP11tnQu-amkZe8-HCmkCE_AuTa6FfmTdq228qA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hiera_include failing with undefined method "cached_file_data"

2017-03-13 Thread Daniel Urist
Fixed by restarting puppetserver per
https://tickets.puppetlabs.com/browse/PUP-7337

It looks like the debian packages are missing a restart trigger:
https://tickets.puppetlabs.com/browse/PA-681

On Mon, Mar 13, 2017 at 11:10 AM, Daniel Urist <dur...@ucar.edu> wrote:

> I've tried replacing the call to hiera_include() with a call to include()
> like this (per https://docs.puppet.com/puppet/latest/function.html#
> hierainclude) , but that results in the same error:
>
> include( lookup("roles::${role}", {'merge' => 'unique' }) )
>
>
> On Mon, Mar 13, 2017 at 10:53 AM, Daniel Urist <dur...@ucar.edu> wrote:
>
>> So, this just started happening on all my  nodes following upgrade to
>> puppet-agent 1.9.3-1jessie on my puppet master:
>>
>> root@nweb8:/# puppet agent -t
>>> Info: Retrieving pluginfacts
>>> Info: Retrieving plugin
>>> Info: Loading facts
>>> Error: Could not retrieve catalog from remote server: Error 500 on
>>> SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating
>>> a Function Call, undefined method `cached_file_data' for
>>> # at
>>> /etc/puppetlabs/code/environments/production/manifests/site.pp:48:3 on
>>> node nweb8.ucar.edu","issue_kind":"RUNTIME_ERROR","stacktrace":["Warning:
>>> The 'stacktrace' property is deprecated and will be removed in a future
>>> version of Puppet. For security reasons, stacktraces are not returned with
>>> Puppet HTTP Error responses."]}
>>
>>
>> The relevant code in my site.pp is this:
>>
>> node default {
>>>   hiera_include('bogusplaceholder', "roles::${role}")
>>> }
>>
>>
>> According to the docs, the hiera_include function should still be
>> supported.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYVwvp_uBP5oLzGB0WeGMvEG%2BdnZ8ZwN2cfxRdGpdGkDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hiera_include failing with undefined method "cached_file_data"

2017-03-13 Thread Daniel Urist
I've tried replacing the call to hiera_include() with a call to include()
like this (per
https://docs.puppet.com/puppet/latest/function.html#hierainclude) , but
that results in the same error:

include( lookup("roles::${role}", {'merge' => 'unique' }) )


On Mon, Mar 13, 2017 at 10:53 AM, Daniel Urist <dur...@ucar.edu> wrote:

> So, this just started happening on all my  nodes following upgrade to
> puppet-agent 1.9.3-1jessie on my puppet master:
>
> root@nweb8:/# puppet agent -t
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts
>> Error: Could not retrieve catalog from remote server: Error 500 on
>> SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating
>> a Function Call, undefined method `cached_file_data' for
>> # at /etc/puppetlabs/code/
>> environments/production/manifests/site.pp:48:3 on node nweb8.ucar.edu
>> ","issue_kind":"RUNTIME_ERROR","stacktrace":["Warning: The 'stacktrace'
>> property is deprecated and will be removed in a future version of Puppet.
>> For security reasons, stacktraces are not returned with Puppet HTTP Error
>> responses."]}
>
>
> The relevant code in my site.pp is this:
>
> node default {
>>   hiera_include('bogusplaceholder', "roles::${role}")
>> }
>
>
> According to the docs, the hiera_include function should still be
> supported.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYx3Njo54-EJ3%3D0FK1XNAgQUr78%3D8iR8qQRuzQ2mPiVVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera_include failing with undefined method "cached_file_data"

2017-03-13 Thread Daniel Urist
So, this just started happening on all my  nodes following upgrade to
puppet-agent 1.9.3-1jessie on my puppet master:

root@nweb8:/# puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
> {"message":"Server Error: Evaluation Error: Error while evaluating a
> Function Call, undefined method `cached_file_data' for
> # at
> /etc/puppetlabs/code/environments/production/manifests/site.pp:48:3 on node
> nweb8.ucar.edu","issue_kind":"RUNTIME_ERROR","stacktrace":["Warning: The
> 'stacktrace' property is deprecated and will be removed in a future version
> of Puppet. For security reasons, stacktraces are not returned with Puppet
> HTTP Error responses."]}


The relevant code in my site.pp is this:

node default {
>   hiera_include('bogusplaceholder', "roles::${role}")
> }


According to the docs, the hiera_include function should still be supported.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKaaPAP5dLvzA0c59ahwi_yAW-H901osF33eAOk74QF3KA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: hiera deep hash merges broken

2017-02-16 Thread Daniel Urist
It turns out my issue was caused by eyaml no longer supporting deep hash
merges. I've worked around my issue by separating out plain yaml and eyaml.
Fortunately none of my existing code does a deep hash merge on the eyaml
keys.

It would be great to get some reassurance that eyaml will continue to be
properly supported going forward-- my impression is that it's pretty
popular; certainly it's very useful.

On Wed, Feb 15, 2017 at 4:51 PM, Francois Lafont <
francois.lafont.1...@gmail.com> wrote:

> On 02/15/2017 09:24 PM, Eric Sorenson wrote:
>
> > That's great to hear François, thank you for testing the patch!
>
> You are welcome. :)
>
> > Our plan at
> > this point is to accumulate a couple more fixes and ship a new build by
> > Tuesday 21 Feb -
> >
> > I don't want to generate a new build containing only the fix in PUP-7215
> > because
> > (a) there is QA work underway on the current release that may turn up new
> > things that need fixing by the end of the week
> > (b) there is a simple workaround in PUP-7216 which is that you can
> > s/hiera_hash/lookup/ as the function that you call.
>
> Ok, no problem, it's better to hold your workflow.
>
> Bye.
> François Lafont
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/442a6d8a-387b-1dbc-031b-4605842b706f%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKZ%3D4LPZQJBtD8UZoNxrVS8gu_E5uZD7am8RSJu4abZ%2BUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hiera deep hash merges broken

2017-02-14 Thread Daniel Urist
Just found this issue, which seems to describe what's going on:
https://github.com/TomPoulton/hiera-eyaml/issues/222
So eyaml is broken wrt hash merges? Are there any workarounds available?


On Tue, Feb 14, 2017 at 12:35 PM, Daniel Urist <dur...@ucar.edu> wrote:

> To get deep hash merges in hiera, I have been using the following in my
> hiera.yaml:
>
>
>> ---
>> :merge_behavior: deeper
>> :backends:
>>   - eyaml
>
>
> And in one of my classes, a call to hiera_hash() like this:
>
> $if_merged = hiera_hash('profiles::pserver::interfaces')
>
>
> However, with  puppetserver version 2.7.2-1puppetlabs1, this is now broken
> and fails with this error:
>
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
>> Internal Server Error: org.jruby.exceptions.RaiseException: (Exception)
>> Hiera type mismatch: expected Hash and got Array
>
>
> I've tried commenting out ":merge_behavior: deeper" in hiera.yaml and
> using a lookup function instead:
>
> $if_merged = lookup('profiles::pserver::interfaces', Hash, 'deep')
>
>
> However, I'm not getting a merged hash when I do this.
>
> How can I get a deep merge hash?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKbeWQj9bM606fW%2BpFWeXee2guvinCJ8ffVx2%2Bxvq_PnXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera deep hash merges broken

2017-02-14 Thread Daniel Urist
To get deep hash merges in hiera, I have been using the following in my
hiera.yaml:


> ---
> :merge_behavior: deeper
> :backends:
>   - eyaml


And in one of my classes, a call to hiera_hash() like this:

$if_merged = hiera_hash('profiles::pserver::interfaces')


However, with  puppetserver version 2.7.2-1puppetlabs1, this is now broken
and fails with this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
> Internal Server Error: org.jruby.exceptions.RaiseException: (Exception)
> Hiera type mismatch: expected Hash and got Array


I've tried commenting out ":merge_behavior: deeper" in hiera.yaml and using
a lookup function instead:

$if_merged = lookup('profiles::pserver::interfaces', Hash, 'deep')


However, I'm not getting a merged hash when I do this.

How can I get a deep merge hash?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKbvqrNfMpNEHgfS%2BiTG%3Du%3D78BYMPbg83NzyOvTX%2B9ZDvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera_hash, lookup, Hiera 5

2017-02-10 Thread Daniel Urist
I have been using ":merge_behavior: deeper" in my hiera.yaml file to turn
on deep hash merges with hiera_hash, but now this appears to be broken.

The latest docs (at https://docs.puppet.com/puppet/4.9/lookup_quick.html)
suggest using the lookup() function, but then state this:

IMPORTANT: These docs are outdated, and replacement pages are coming soon.
> Puppet lookup is now called Hiera 5, and it works differently from what’s
> described on this page.


So, how do I get hiera hash merges right now? I'm on debian jessie with the
following versions:

puppetserver  2.7.2-1puppetlabs1
puppet-agent 1.9.1-1jessie

I also have clients running the puppet agent from jessie backports, version
3.8.5-2~bpo8+1, but I'm assuming this problem is on the server side.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKb8SRWC0217ZSb2J2jbpmj8VrJ1sa4As5WBRv3wDQUcPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] logrotate and puppetserver debian package

2016-09-13 Thread Daniel Urist
The release notes for puppetserver state the following (
https://docs.puppet.com/puppetserver/latest/release_notes.html):

Debian upgrade note: On Debian-based Linux distributions, logrotate will
> continue to attempt to manage your Puppet Server log files until
> /etc/logrotate.d/puppetserver is removed. These logrotate attempts are
> harmless, but will generate a duplicate archive of logs. As a best
> practice, delete puppetserver from logrotate.d after upgrading to Puppet
> Server 2.6.


However, the latest debian jessie package for puppetserver (version
2.6.0-1puppetlabs1) still contains the file /etc/logrotate.d/puppetserver.

Is this just an oversight (bug!) in the package, or is logrotate still
needed for Debian?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKbcmcGK9zc4J6KcoucC-6wg2N%2B7fHfjy1hWmVML_WsR3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver error "Service ':CaService' not found" when following puppet install guide

2016-09-09 Thread Daniel Creed
I have the same error, but even with the ca.cfg file. 



On Sunday, August 28, 2016 at 7:36:45 PM UTC-5, Alex Xu wrote:
>
> Hey Matthaus, 
>
> Thanks for the help. The problem is indeed missing ca.cfg. After I add a 
> ca.cfg file in the link you provided, the issue is gone. Really appreciated!
>
> Thanks,
> AX
>
>
> On Saturday, August 27, 2016 at 12:45:33 AM UTC+8, Matthaus Litteken wrote:
>>
>> AX,
>>
>> In puppetserver 2.5.0 some changes went in with respect our bootstrap.cfg 
>> config file. This change shouldn't affect fresh installs. It looks as 
>> though you are missing /etc/puppetlabs/puppetserver/services.d/ca.cfg, 
>> which adds the CaService. ca.cfg should look like the following for a 
>> puppet-server install that will also be a CA: 
>> https://github.com/puppetlabs/puppetserver/blob/2.5.0/ezbake/config/services.d/ca.cfg
>>
>> Also, for more details with respect to the bootstrap.cfg changes in 
>> 2.5.0, here are the docs:
>> - 
>> https://docs.puppet.com/puppetserver/2.5/release_notes.html#potential-breaking-issues-when-upgrading-with-a-modified-bootstrapcfg
>> - https://docs.puppet.com/puppetserver/2.5/bootstrap_upgrade_notes.html
>>
>> Hope that helps,
>> Matthaus
>>
>> On Fri, Aug 26, 2016 at 5:45 AM, Alex Xu  wrote:
>>
>>> Hi all, 
>>>
>>> I was following puppet install guide for puppet 4.6 puppetserver 2.5. 
>>> After I installed puppetserver and puppet-agent 
>>> from puppetlabs-release-pc1-trusty.deb in a new Ubuntu 14.04 box. 
>>>
>>> When I try running "puppet resource service puppetserver 
>>> ensure=running", I got following error 
>>> in /var/log/puppetlabs/puppetserver/puppetserver-daemon.log. 
>>>
>>> Searched on google and there is nothing about CaService. Really 
>>> appreciate any thoughts on this.
>>>
>>> Thanks,
>>> AX
>>>
>>>
>>> 20:20:10.470 [main] DEBUG puppetlabs.trapperkeeper.bootstrap - Loading 
>>> bootstrap configs:
>>> /opt/puppetlabs/server/apps/puppetserver/config/services.d/bootstrap.cfg
>>> 20:20:12.653 [main] DEBUG org.eclipse.jetty.util.log - Logging to 
>>> Logger[org.eclipse.jetty.util.log] via org.eclipse.jetty.util.log.Slf4jLog
>>> 20:20:12.658 [main] INFO  org.eclipse.jetty.util.log - Logging 
>>> initialized @14082ms
>>> 20:20:12.942 [main] INFO  p.t.services.webserver.jetty9-core - Removing 
>>> buggy security provider SunPKCS11-NSS version 1.7
>>> 20:20:17.010 [main] DEBUG puppetlabs.trapperkeeper.internal - 
>>> Initializing lifecycle worker loop.
>>> 20:20:17.096 [main] ERROR puppetlabs.trapperkeeper.internal - Error 
>>> during app buildup!
>>> java.lang.RuntimeException: Service ':CaService' not found
>>>  at 
>>> puppetlabs.trapperkeeper.internal$handle_prismatic_exception_BANG_.invoke(internal.clj:98)
>>>  
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$instantiate$fn__13793.invoke(internal.clj:139)
>>>  
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$instantiate.invoke(internal.clj:136) 
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$eval14328$build_app_STAR___14337$fn__14338.invoke(internal.clj:542)
>>>  
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$eval14328$build_app_STAR___14337.invoke(internal.clj:510)
>>>  
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$eval14430$boot_services_STAR___14439$fn__14440$fn__14441.invoke(internal.clj:610)
>>>  
>>> ~[na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$eval14430$boot_services_STAR___14439$fn__14440.invoke(internal.clj:609)
>>>  
>>> [na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.internal$eval14430$boot_services_STAR___14439.invoke(internal.clj:604)
>>>  
>>> [na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259$fn__15260.invoke(core.clj:130)
>>>  
>>> [na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259.invoke(core.clj:95)
>>>  
>>> [na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.core$eval15281$run__15286$fn__15287.invoke(core.clj:151)
>>>  
>>> [na:na]
>>>  at 
>>> puppetlabs.trapperkeeper.core$eval15281$run__15286.invoke(core.clj:145) 
>>> [na:na]
>>>  at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:173) [na:na]
>>>  at clojure.lang.RestFn.invoke(RestFn.java:457) 
>>> [puppet-server-release.jar:na]
>>>  at clojure.lang.Var.invoke(Var.java:394) [puppet-server-release.jar:na]
>>>  at clojure.lang.AFn.applyToHelper(AFn.java:165) 
>>> [puppet-server-release.jar:na]
>>>  at clojure.lang.Var.applyTo(Var.java:700) [puppet-server-release.jar:na]
>>>  at clojure.core$apply.invoke(core.clj:630) 
>>> [puppet-server-release.jar:na]
>>>  at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7) 
>>> [puppet-server-release.jar:na]
>>>  at clojure.lang.RestFn.invoke(RestFn.java:457) 
>>> [puppet-server-release.jar:na]
>>>  at clojure.lang.Var.invoke(Var.java:394) [puppet-server-release.jar:na]
>>>  at clojure.lang.AFn.applyToHelper(AFn.java:165) 
>>> [puppet-server-release.jar:na]
>>>  at clojure.lang.Var.applyTo(Var.java:700) 

[Puppet Users] Accessing puppet node facts in report processor

2016-06-14 Thread Daniel Scott
Hi,

Is there a way to access a puppet node's facts in a report processor?

We have nodes which are part of auto scaling groups in AWS, so there are, 
several nodes which are all the same 'type'. We expose this type as a fact 
on the nodes themselves, and I would like to use the type in a report 
processor to send events back to a central server. Is there a way to access 
a node's facts from the report processor?

Or is there a different/better way of obtaining additional node information 
in the report processor?

Thanks,

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b1a06591-cb24-4aa3-8952-ebc2bee621d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Logrotate module broken, string 'undef' now treated as undef

2016-05-20 Thread Daniel Urist
There doesn't seem to be an issue when I run my test code with "puppet
apply".

I've tried this under puppet agents v.4.5.0 and v.3.8.5

On Fri, May 20, 2016 at 10:56 AM, Matthaus Owens <matth...@puppet.com>
wrote:

> Daniel,
> Thanks for filing the ticket. I'll take a stab at reproducing it today.
> Did you only see it with puppet runs against a master, or also with local
> puppet apply?
>
> On Fri, May 20, 2016 at 8:20 AM, Daniel Urist <dur...@ucar.edu> wrote:
>
>> I filed a bug: https://tickets.puppetlabs.com/browse/SERVER-1356
>>
>> On Fri, May 20, 2016 at 6:41 AM, JeremyCampbell <
>> jeremycampbel...@gmail.com> wrote:
>>
>>> I can confirm the same issue on Puppetserver v2.4.0
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/62c4f502-e46b-4cef-9fc6-71767eb1d5c3%40googlegroups.com
>>> <https://groups.google.com/d/msgid/puppet-users/62c4f502-e46b-4cef-9fc6-71767eb1d5c3%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKaa43cJg%3Daddt%2B%3DTR1%2B%2BH0C8vm2eAmvYUevcqPuNkHNfg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKaa43cJg%3Daddt%2B%3DTR1%2B%2BH0C8vm2eAmvYUevcqPuNkHNfg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAfyDLQuTgOjF_UbLYB24g9KAnLYVmYybDGe6vL_iHrzdw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CACD%3DwAfyDLQuTgOjF_UbLYB24g9KAnLYVmYybDGe6vL_iHrzdw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKa2S37btXmJd7idhr4d8Prs0YMz%2BGExO0x8ZZf2HpkF%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Logrotate module broken, string 'undef' now treated as undef

2016-05-20 Thread Daniel Urist
I filed a bug: https://tickets.puppetlabs.com/browse/SERVER-1356

On Fri, May 20, 2016 at 6:41 AM, JeremyCampbell 
wrote:

> I can confirm the same issue on Puppetserver v2.4.0
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/62c4f502-e46b-4cef-9fc6-71767eb1d5c3%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKaa43cJg%3Daddt%2B%3DTR1%2B%2BH0C8vm2eAmvYUevcqPuNkHNfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Logrotate module broken, string 'undef' now treated as undef

2016-05-19 Thread Daniel Urist
Here's some code to try:

  $var1 = undef
  $var2 = "undef"
  $var3 = 'undef'
  $var4 = "'undef'"
  $var5 = '"undef"'
  notify { "VAR1: ${var1} VAR2: ${var2} VAR3: ${var3} VAR4: ${var4} VAR5:
${var5}": }

When run, this results in:

  Notice: VAR1:  VAR2:  VAR3:  VAR4: 'undef' VAR5: "undef"

On Thu, May 19, 2016 at 8:30 AM, Daniel Urist <dur...@ucar.edu> wrote:

> puppetserver: 2.3.2-1puppetlabs1
> puppet client: 3.8.5-2~bpo8+1
>
> Both server and clients are running Debian 8 (jessie); the puppet client
> is from the Debian backports repo.
>
> On Wed, May 18, 2016 at 3:40 PM, Matthaus Owens <matth...@puppet.com>
> wrote:
>
>> Daniel,
>> Which version of Puppet are you seeing this on?
>>
>> On Wed, May 18, 2016 at 2:33 PM, Daniel Urist <dur...@ucar.edu> wrote:
>>
>>> I have been using the yo61 logrotate module from puppetforge (
>>> https://forge.puppet.com/yo61/logrotate), which seems to be the most
>>> popular, but it recently stopped working, with many errors about undefined
>>> parameters.
>>>
>>> The issue seems to be the use of the string 'undef' as a default value;
>>> for example:
>>>
>>> define logrotate::rule(
>>>> $create_owner   = 'undef',
>>>>
>>>
>>> Later on in the code, there are comparisons against the actual string
>>> 'undef'; for example:
>>>
>>>
>>>   if ($create_owner != 'undef') and ($create_mode == 'undef') {
>>>> fail("Logrotate::Rule[${name}]: create_owner requires create_mode")
>>>>}
>>>
>>>
>>> Regardless of whether this is best practice, these comparisons are now
>>> failing, apparently because the string 'undef' is now treated as the value
>>> undef. I've confirmed this by printing the string with notify (prints
>>> nothing when it's 'undef'), and changing it to something else, which does
>>> print.
>>>
>>> I'm not sure exactly when this changed or if it's intended behavior or a
>>> bug, but it does seem odd that now apparently 'undef' === undef
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjAx286r9NNvKtGU3PscrAZ77H5_HXc9CXO1LLa552sg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjAx286r9NNvKtGU3PscrAZ77H5_HXc9CXO1LLa552sg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcwR0OdVsPguNNzzeqZ_LUHMoLhAyhTJP56bAZDc0J6Jw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcwR0OdVsPguNNzzeqZ_LUHMoLhAyhTJP56bAZDc0J6Jw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKZ-Ayz5pz%3Djs-EdO8%2BbkP7seQjKNBL-NSKjCnFzdhSavQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Logrotate module broken, string 'undef' now treated as undef

2016-05-19 Thread Daniel Urist
puppetserver: 2.3.2-1puppetlabs1
puppet client: 3.8.5-2~bpo8+1

Both server and clients are running Debian 8 (jessie); the puppet client is
from the Debian backports repo.

On Wed, May 18, 2016 at 3:40 PM, Matthaus Owens <matth...@puppet.com> wrote:

> Daniel,
> Which version of Puppet are you seeing this on?
>
> On Wed, May 18, 2016 at 2:33 PM, Daniel Urist <dur...@ucar.edu> wrote:
>
>> I have been using the yo61 logrotate module from puppetforge (
>> https://forge.puppet.com/yo61/logrotate), which seems to be the most
>> popular, but it recently stopped working, with many errors about undefined
>> parameters.
>>
>> The issue seems to be the use of the string 'undef' as a default value;
>> for example:
>>
>> define logrotate::rule(
>>> $create_owner   = 'undef',
>>>
>>
>> Later on in the code, there are comparisons against the actual string
>> 'undef'; for example:
>>
>>
>>   if ($create_owner != 'undef') and ($create_mode == 'undef') {
>>> fail("Logrotate::Rule[${name}]: create_owner requires create_mode")
>>>}
>>
>>
>> Regardless of whether this is best practice, these comparisons are now
>> failing, apparently because the string 'undef' is now treated as the value
>> undef. I've confirmed this by printing the string with notify (prints
>> nothing when it's 'undef'), and changing it to something else, which does
>> print.
>>
>> I'm not sure exactly when this changed or if it's intended behavior or a
>> bug, but it does seem odd that now apparently 'undef' === undef
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjAx286r9NNvKtGU3PscrAZ77H5_HXc9CXO1LLa552sg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjAx286r9NNvKtGU3PscrAZ77H5_HXc9CXO1LLa552sg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcwR0OdVsPguNNzzeqZ_LUHMoLhAyhTJP56bAZDc0J6Jw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcwR0OdVsPguNNzzeqZ_LUHMoLhAyhTJP56bAZDc0J6Jw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKa5FpwNDBXfnEACFUD0_%3Dm2efTJEnCiheN7sNhnxxEEVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Logrotate module broken, string 'undef' now treated as undef

2016-05-18 Thread Daniel Urist
I have been using the yo61 logrotate module from puppetforge (
https://forge.puppet.com/yo61/logrotate), which seems to be the most
popular, but it recently stopped working, with many errors about undefined
parameters.

The issue seems to be the use of the string 'undef' as a default value; for
example:

define logrotate::rule(
> $create_owner   = 'undef',
>

Later on in the code, there are comparisons against the actual string
'undef'; for example:


  if ($create_owner != 'undef') and ($create_mode == 'undef') {
> fail("Logrotate::Rule[${name}]: create_owner requires create_mode")
>}


Regardless of whether this is best practice, these comparisons are now
failing, apparently because the string 'undef' is now treated as the value
undef. I've confirmed this by printing the string with notify (prints
nothing when it's 'undef'), and changing it to something else, which does
print.

I'm not sure exactly when this changed or if it's intended behavior or a
bug, but it does seem odd that now apparently 'undef' === undef

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjAx286r9NNvKtGU3PscrAZ77H5_HXc9CXO1LLa552sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Variables inside variables

2016-03-31 Thread Daniel Sung
I achieve this by using the getvar function in stdlib. For example:

getvar("::network_${::gateway_dev}")

Regards,
Daniel

On Thursday, 31 March 2016 11:04:45 UTC+1, Jonathan Gazeley wrote:
>
> Hi folks, 
>
> Short version: 
>
> I want to use a variable inside a variable to access a fact. Is this 
> possible? 
>
> Long version: 
>
> Facter provides facts $::ipaddress and $::netmask which figure out which 
> is your primary interface and then return values like $::ipaddress_eth0 
> and $::netmask_eth0. However there is not a $::network fact to reflect 
> $::network_eth0. 
>
> I have a custom fact $::gateway_dev which returns the name of the 
> primary interface. Is it possible to access the variable like 
> ${::network_${::gateway_dev}} ? 
>
> Thanks, 
> Jonathan 
>
> -- 
> Jonathan Gazeley 
> Senior Systems Administrator 
> IT Services 
> University of Bristol 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/44689bb5-7eff-4a03-ac80-095c5948eaaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Avoiding duplicate exported resource

2016-03-07 Thread Daniel Urist
I've managed to solve this with query_resources() from puppedbquery to
generate an array of the resources and ensure_resource() to only create a
single instance. That seems to be the cleanest way at the moment to handle
this.

On Mon, Mar 7, 2016 at 9:25 AM, Ken Barber  wrote:

> >> Model wise, in an ideal world, the proxied/virtual address would be a
> >> 'node' of sorts, and have that entry, but if no box exists to compile
> >> that catalog, well then we're just talking crazy :-).
> >>
> >
> >
> > Well no, if the proxied / virtual address is not a property specific to
> any
> > individual node, then it is a property of the overall site configuration.
> > Puppet therefore does not need to determine this from the nodes;
> instead, it
> > needs to *apply* it to them.  As such, it ought to be recorded in the
> Hiera
> > data repository from which Puppet is working.  If it's in the data, then
> it
> > does not need to be communicated between nodes via exported resources.
> > Rather, Puppet should draw it from the same source for all nodes that
> need
> > it for any purpose.
>
> I think you've missed my modelling point or perspective, I was simply
> expressing that if you could do it, you would record the intended
> exported resource to a virtual node that maps to the virtual address,
> but this isn't possible today. Hiera isn't part of the resulting
> model, its just input that creates the graph. This is academic though,
> its not possible anyway.
>
> Irrespective of this imaginary world, one could store the data in
> hiera to be consumed, if one chose to - or somewhere else, it matters
> little for the resulting graph.
>
> ken.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAE4bNTk-D4w96-7729kOzZhx%2B4DnkR7VrR0Uat9x8HmnFribPA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKYjR2ifPKpnGeLAkv%2Bo4P2tG%2BT6kxvoJAMiCHCsWt7vgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Avoiding duplicate exported resource

2016-03-03 Thread Daniel Urist
I've created a module to configure a caching nginx proxy. I am running
several of these proxies behind a load balancer. They all proxy the same
external address. I'd like to export a nagios host/service for monitoring
the external address, which will then be collected on my nagios server. The
problem is, since I have several instances of the proxy managed by puppet,
and the exported host/service is identical on each, I end up with duplicate
resources. I could give the resources unique names (e.g. by appending the
proxy's hostname to the resource name), but then I end up with multiple
identical hosts/services in nagios, which doesn't work.

The puppet stdlib module has an "ensure_resource" function, but there
doesn't seem to be a way to use this on an exported resource collector.

I guess one workaround would be to set a parameter in the proxy module, for
example "export_address" and have that default to "false", and only set it
to "true" for one node, but that's kind of ugly since one node then needs
to be special.

Surely this isn't an uncommon use case-- what's the best way to work around
this?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKbwrCYz3ovqo-E0u7EH-Jep%2BwrxEW3FhV1v8-G%3DRr%2B80w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Announce: PuppetDB 2.3.8 has been released!

2015-10-20 Thread Daniel Urist
Is there any update on when puppetdb will be available for Debian 8
(jessie)? Puppetserver is now available according to the announcement for
v.2.1.2.


On Wed, Oct 14, 2015 at 4:34 PM, Wyatt Alt  wrote:

> PuppetDB 2.3.8  October 14, 2015
>
> PuppetDB 2.3.8 Downloads
>
> 
>
> Available in native package format in the release repositories at:
>
> http://yum.puppetlabs.com and http://apt.puppetlabs.com
>
> For information on how to enable the Puppet Labs repos, see:
>
>
> http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#open-source-repositories
>
> Binary tarball: http://downloads.puppetlabs.com/puppetdb/
>
> Source: http://github.com/puppetlabs/puppetdb
>
> Please report feedback via the Puppet Labs tickets site, using an affected
> PuppetDB version of 2.3.8: https://tickets.puppetlabs.com/browse/PDB
>
> Documentation: http://docs.puppetlabs.com/puppetdb/2.3/
>
> Puppet module: http://forge.puppetlabs.com/puppetlabs/puppetdb
>
> PuppetDB 2.3.8 Release Notes
>
> 
>
> PuppetDB 2.3.8 is a backwards-compatible bugfix release that fixes an
> issue where simultaneous updates to large numbers of fact values could
> produce a prepared statement that exceeded the max allowed by the Postgres
> JDBC driver. See https://tickets.puppetlabs.com/browse/PDB-2003 for
> details.
>
> For more information and upgrade advice, consult the detailed release
> notes here:
>
> https://docs.puppetlabs.com/puppetdb/2.3/release_notes.html
>
> Contributors
>
> 
> Ken Barber, Ryan Senior, Wyatt Alt
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAJDiH3EXsYgy_Nm5ZWkVbV%2B3Lvd1k%3DFa5H6ZwN3VryVMXe1buQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKZsJLXBkj1fgkPTAqod6qNnNk%3D%2BzGPW8tr2LEPdJ7O7jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Debian Testing and Debian Stable leaving apt.puppetlabs.com

2015-08-13 Thread Daniel Parks
On Thu, Aug 13, 2015 at 9:46 AM, Melissa Stone meli...@puppetlabs.com
wrote:

 In an effort to reduce duplication and confusion in the packages we
 provide, we will no longer be providing packages for Debian Testing or
 Debian Stable. We want to ensure we deliver tested and reliable packages,
 which includes deliberately adding new platforms that have been vetted.
 This change is part of an effort to ensure that is always the case with the
 packages we make available.


To clarify, because this has confused other people too: does this mean that
you won’t be able to run Puppet from an official package on Debian Stable?

Or is there another repo that can be added, that’s just not specific to
Debian Testing/Stable?

Thanks,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPNukCk5jhKJcy%2B5OAUN57xevu8FbX4iBGVkip-ae1Qy7-YN6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing data between hosts

2015-08-06 Thread Daniel Dreier
On Thu, Aug 6, 2015 at 5:23 PM, Matthew Ceroni matthewcer...@gmail.com
wrote:

 Scenario:

 Managing DNS via Puppet. On the master I need to be aware of slave NS
 servers so that the NS record can be put into the zone file.

 Creating a zone you supply an array with the name of all the name servers.
 Hard coding this into a hiera file (as an example) doesn't scale well as
 new servers come online.

 Also, on the slaves I need to be aware of the masters to allow for zone
 transfer (again this is passed in via an array to the class that create the
 zone).

 Is there a way I can pass, lets say a variable (ie: dns_slave = SLAVE-IP
 and dns_master = MASTER-IP) between slaves and masters? That way on the
 slaves I can compose my array of masters and pass that to the class and
 vice verse on the masters.

 I know I can use exported resources but I am not really exporting a
 resource just some data? Or would I encapsulate this in some sort of
 resource and then export that?


One option for doing this type of service discovery with puppetdb is
puppetdbquery (https://github.com/dalen/puppet-puppetdbquery). For example,
if your slave NS servers are configured using a profile called
profile::nameserver::slave and the master is configured using a profile
called profile::nameserver::master, the slave profile might query for
something like:

$dns_masters = query_nodes(Class[Profile::Nameserver::Master], ipaddress)

Conversely, the master profile might query for

$dns_slaves = query_nodes(Class[Profile::Nameserver::Slave], ipaddress)

The $dns_masters variable would end up as an array of ipaddresses, listing
all nodes which include the profile::nameserver::master profile. The
$dns_slaves array would similarly contain a list of ipaddresses listing
nodes which include profile::nameserver::slave.

There are two big caveats with this approach:

1) you have a circular dependency; when you boot new infrastructure, you'll
need to run puppet a few times in order for all the nodes to discover each
other.
2) if a node drops out of puppetdb, it will be removed from your
configuration. For example, if you configure a puppetdb node ttl and then
somebody disables puppet on one of the DNS servers, after the node ttl
expires the node will disappear from puppetdb and will consequently be
de-configured. If somebody assumes that puppetdb data is ephemeral and does
a node deactivate on a bunch of nodes it will cause configuration changes.
If you somehow generate empty catalogs, you will also have nodes drop out
of configuration.

The only workaround I'm aware of is to explicitly check the results and
either fail() if you get back an unexpectedly low number of results, or to
make management of the config files in question conditional upon the size
of the returned array. For example, you may decide that you do not wish to
manage config files for DNS slaves when there are zero masters. The
advantage of this approach is that you can still bootstrap, whereas if you
fail you have a more complicated question around bootstrapping a cluster.


-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suZ0TQ%3D2_y%2Bjbbu08r_ZpRdh2oj3a5DUi5PdRKsiWTJKFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] ripienaar/puppet-module-data Not working with the Vagrant puppet provisioner.

2015-07-26 Thread Daniel Dreier
On Sun, Jul 26, 2015 at 12:16 PM, Fraser Goffin goff...@gmail.com wrote:

 For some time I have been using the excellent ripienaar/puppet-module-data
 module. This provides a very familiar way to use Hiera but at the
 individual module level.

 I have recently upgrade to Puppet v4 and this module still works
 successfully when run with 'puppet apply' (I am using masterless puppet).

 It also works successfully if I use the Vagrant shell provisioner with an
 inline 'puppet apply'

 However, when using Vagrant (I'm using the latest 1.7.4 version) with
 Puppet v4 installed on the VM and the Vagrant puppet provisioner, the
 module is NOT called (it 'injects' itself after traversing the site level
 hierarchy), and therefore none of the Hiera values get resolved whether
 using automatic parameter binding or direct calls.

 Given that this works happily outside of Vagrant, or indeed, inside a
 Vagrant image using puppet apply, and using the Shell provisioner, I am
 *assuming* (but I could be wrong) that the Vagrant puppet provisioner is
 where the issue is.

 Can anyone shed any light on why this might be and, ideally, what could be
 done. I'm happy to help ?


This is a bit of a side note, but Puppet 4 now has a native data-in-modules
pattern, which you can read about on Henrik's blog at:
http://puppet-on-the-edge.blogspot.com/2015/01/puppet-40-data-in-modules-and.html
http://puppet-on-the-edge.blogspot.be/2015/02/puppet-40-data-in-modules-part-ii.html

I haven't personally used the Puppet 4 data in modules providers, but it
looks like a good way to natively get the functionality RI implemented in
puppet-module-data.

-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suawgO8d3z6ZsPOrb9PiKkouPcDjQ-T4f06vDS6zuana3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Ordering without dependencies

2015-07-03 Thread Daniel Dreier

 On Jul 3, 2015, at 7:42 AM, R.I.Pienaar r...@devco.net wrote:
 
 
 
 - Original Message -
 From: Christopher Wood christopher_w...@pobox.com
 To: puppet-users puppet-users@googlegroups.com
 Sent: Friday, July 3, 2015 3:34:29 PM
 Subject: Re: [Puppet Users] Ordering without dependencies
 
 On Fri, Jul 03, 2015 at 02:10:55PM +0100, R.I.Pienaar wrote:
 hello,
 
 I am looking for a way to influence run order without also doing 
 dependencies.
 
 I have a case where I am removing a bit of software from my system and so 
 as is
 typical things need to be done in a different order from creation, 
 crucially I
 also do not really care if removal fails.  It should just try to remove
 everything
 independent of each other - but at least in a given order so there's some 
 chance
 of it working.
 
 I couldn't say about doing things without dependencies, but for uninstalling
 stuff I have wrapped everything in a giant if/then or had two different 
 classes
 doing different things.
 
 class c1 ($un = false) {
 if str2bool($un) {
   service { 'mys': ensure = stopped, enable = false }
   package { 'myp': ensure = absent, }
 }
 else {
   package { 'myp': }
   service { 'mys': ensure = running, enable = true, require = 
 Package['myp'] }
 
 }
 }
 
 Once managing the service resource fails on every host (due to a lack of init
 script from package removal) I amend the manifests. Filthy but it works.
 
 There seems to be no way to influence order which does not also imply a
 requirement
 and so today the only way this is achieved is by invoking puppet 3 times 
 with 3
 different manifest files which seems horrible but that's the only way I can 
 find
 to achieve this as well.
 
 If you don't care about the service maybe just kill it?
 
 class c2 {
 exec {'k': command = 'killall -9 mys || true', path = ['/bin', 
 '/usr/bin'], }
 package { 'myp': ensure = absent, require = Exec['k'], }
 }
 
 (Using true because an exec fails on a non-zero exit status iirc.)
 
 Yeah it's a bit more complex than just a service.  This manifest builds an 
 entire
 hyperv cluster with n dependant servers, storage volumes, dns entries and so 
 forth
 and so on, even virtual machine deployment.
 
 On teardown I don't care what stays and go, just want to try my best to kill 
 things
 
 So the resources in question are varied and custom and spread over multiple 
 hosts.
 
 So rather than a specific solution that involves just killing this or that I 
 am 
 after ideas for how to do so in a generic way with any kind of resource
 
One relatively generic option would be to switch the ordering mode to use 
manifest ordering. I've never used it but it's been possible since 3.3ish. I 
believe you just set ordering=manifest in the agent's puppet.conf. A blog post 
introducing the functionality is at 
https://puppetlabs.com/blog/introducing-manifest-ordered-resources.

That would allow you to simply order the resources sequentially in the manifest 
without establishing hard dependencies, while retaining the option to set 
dependencies if needed. 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/918D0F8F-A584-4A1F-8285-7AEBF3453440%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Announce: Puppet Agent 1.2, Facter 3, Puppet 4.2, Hiera 3

2015-06-29 Thread Daniel Urist
Are there up-to-date instructions for how to install from the apt repos for
jessie?

On Fri, Jun 26, 2015 at 12:13 PM, Eric Sorenson 
eric.soren...@puppetlabs.com wrote:


 Last night we rolled a patch release which includes a fix for FACT-1055, a
 regression which inadvertently broke backward compatibility for external
 facts
 that are not pluginsync'ed from modules:
 https://tickets.puppetlabs.com/browse/FACT-1055

 The new AIO bundle (puppet-agent-1.2.1) is available in all of the Puppet
 Collection 1 repositories.

 I also neglected to mention in the original announcement that we now have
 package repositories for Debian Jessie and Mac OS X Mavericks (10.9) and
 Yosemite (10.10) and these OSes will be part of the regular release
 pipelines
 going forward.


 On Wed, 24 Jun 2015, Eric Sorenson wrote:

  There's a new All-in-One Puppet Agent release available! This release
 bundles
 new versions of several component projects and is downloadable now
 through the Puppet Collection 1 repository.

 * Puppet 4.2 includes several features and bug fixes, and officially
 deprecates
   Windows 2003. Release notes here:
 http://docs.puppetlabs.com/puppet/4.2/reference/release_notes.html
 * Facter 3, the rewritten C++-based facter, is now the baseline Facter
   implementation. Read more here:
 https://puppetlabs.com/blog/speeding-up-puppet-on-windows
 * Hiera 3 is included, which contains a change to the default
   hierarchy and datadir location. This is technically a semver break, so
 it's
   a new major version. The gory details:
 http://docs.puppetlabs.com/hiera/3.0/release_notes.html

 Get installation instructions and read about Puppet Collections, our
 Linux-distribution-style repositories for Puppet related projects, here:
 https://puppetlabs.com/blog/welcome-puppet-collections

 Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
 puppet platform // coffee // techno // bicycles


 Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
 puppet platform // coffee // techno // bicycles


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKZKZ9%2BPvoOtyfbw5cNgn%3D7OwM2VcpmOJSzbEtLtoaj7MQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent won't start

2015-06-28 Thread Daniel Dreier
On Sun, Jun 28, 2015 at 3:15 PM, adaryl.l.wakefi...@gmail.com wrote:

   When I go to start my puppet agent using:
 sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running
 enable=true.

 I get:

 sh: 0: getcwd() failed: No such file or directory

 When I try again, I discover that the /opt directory has magically
 disappeared. Any ideas?



I'd have an easier time trying to reproduce the problem if you include
information on what platform you're running on, what version of puppet you
installed, and any other setup steps you may have taken. Ideally, if you
can reproduce this consistently via a shell script in a vagrant environment
it'll be much easier to troubleshoot and you'll get faster feedback.



-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suY5XZ7b1dVf2Ap5Xv9%3DhDBgoQo2%2B%2BACRjqec-QjD00_Lg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent won't start

2015-06-28 Thread Daniel Dreier
Here are the steps I've taken to try and reproduce the issue you're
describing:

vagrant init ubuntu/trusty64
vagrant ssh
wget http://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
sudo dpkg -i puppetlabs-release-pc1-trusty.deb
sudo apt-get update
sudo apt-get install puppet-agent -y
sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running
enable=true

When I run it, I get the following output:

Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
service { 'puppet':
  ensure = 'running',
  enable = 'true',
}

I'd encourage you to try out vagrant to simplify troubleshooting -- it
really is just a matter of installing virtualbox, vagrant, and running
vagrant init ubuntu/trusty64, vagrant up and vagrant ssh and you're
in a VM. It'll save hours compared to reprovisioning bare metal hardware.

Can you suggest any major configuration differences we might have between
the plain-vanilla ubuntu 14.04 vagrant environment and what you're running?

On Sun, Jun 28, 2015 at 4:00 PM, adaryl.l.wakefi...@gmail.com wrote:

   Unfortunately I’m not sophisticated enough to use Vagrant top of which
 I’m not installing in a VM. I’m using a cluster of 3 bare metal machines
 running Ubuntu 14.4. I’ve followed every step prescribed to the letter in
 this link:
 http://docs.puppetlabs.com/puppet/4.2/reference/install_linux.html

 What other information can I pass along?


 Adaryl Bob Wakefield, MBA
 Principal
 Mass Street Analytics, LLC
 913.938.6685
 www.linkedin.com/in/bobwakefieldmba
 Twitter: @BobLovesData

  *From:* Daniel Dreier d...@puppetlabs.com
 *Sent:* Sunday, June 28, 2015 5:52 PM
 *To:* puppet-users@googlegroups.com
 *Subject:* Re: [Puppet Users] puppet agent won't start

   On Sun, Jun 28, 2015 at 3:15 PM, adaryl.l.wakefi...@gmail.com wrote:

   When I go to start my puppet agent using:
 sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running
 enable=true.

 I get:

 sh: 0: getcwd() failed: No such file or directory

 When I try again, I discover that the /opt directory has magically
 disappeared. Any ideas?



 I'd have an easier time trying to reproduce the problem if you include
 information on what platform you're running on, what version of puppet you
 installed, and any other setup steps you may have taken. Ideally, if you
 can reproduce this consistently via a shell script in a vagrant environment
 it'll be much easier to troubleshoot and you'll get faster feedback.



 --
  Daniel Dreier
 Technical Operations Engineer
 GPG: BA4379FD
 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAGk8suY5XZ7b1dVf2Ap5Xv9%3DhDBgoQo2%2B%2BACRjqec-QjD00_Lg%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAGk8suY5XZ7b1dVf2Ap5Xv9%3DhDBgoQo2%2B%2BACRjqec-QjD00_Lg%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/658471AFB4DB4129A648119DD8F5E03D%40NewLaptop
 https://groups.google.com/d/msgid/puppet-users/658471AFB4DB4129A648119DD8F5E03D%40NewLaptop?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.




-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8sua22r-%2BYDgmTX_VOF8zJzBKm9qrr%3DkH9rCNFK-xtEvKVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent won't start

2015-06-28 Thread Daniel Dreier
I hope this doesn't sound pedantic, but when you say you get the same
output do you mean you got the same output as I did, or the same error
output as you originally posted about?

Also, could you please run apt --installed list | grep puppet and
copy-paste the output, just to confirm which puppet packages you ended up
with?

That said, I'm stumped. The only advice I can give is to start from a
known, clean environment, and script 100% of the setup needed to reproduce
the problem, in order to make it feasible for somebody on this list to see
the problem first-hand. That may be as easy as installing vagrant and
converting part of your bash history from the old box into a setup shell
script to run on the vagrant environment.

On Sun, Jun 28, 2015 at 4:46 PM, adaryl.l.wakefi...@gmail.com wrote:

   When I run your commands, I get the same out put. There are a few
 difference between what you wrote and my initial work.
 1. sudo apt-get install puppet-agent –y —I didn’t use the –y
 2. It asked me to install puppet-common which I did.
 3. I changed the configuration settings in /etc/puppet/puppet.conf so
 that, in the main section, I have a line server=[master hostname]
 4. I went back through my command history and discovered that I tried to
 apt-get install before I apt-get update. I had to go back and update then I
 apt-get install again.
 5. I’m logged in as root and I don’t use sudo in my commands.

 Those are the only differences.

 Adaryl Bob Wakefield, MBA
 Principal
 Mass Street Analytics, LLC
 913.938.6685
 www.linkedin.com/in/bobwakefieldmba
 Twitter: @BobLovesData

  *From:* Daniel Dreier d...@puppetlabs.com
 *Sent:* Sunday, June 28, 2015 6:29 PM
 *To:* puppet-users@googlegroups.com
 *Subject:* Re: [Puppet Users] puppet agent won't start

  Here are the steps I've taken to try and reproduce the issue you're
 describing:

 vagrant init ubuntu/trusty64
 vagrant ssh
 wget http://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
 sudo dpkg -i puppetlabs-release-pc1-trusty.deb
 sudo apt-get update
 sudo apt-get install puppet-agent -y
  sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running
 enable=true

 When I run it, I get the following output:

 Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
 service { 'puppet':
   ensure = 'running',
   enable = 'true',
 }

 I'd encourage you to try out vagrant to simplify troubleshooting -- it
 really is just a matter of installing virtualbox, vagrant, and running
 vagrant init ubuntu/trusty64, vagrant up and vagrant ssh and you're
 in a VM. It'll save hours compared to reprovisioning bare metal hardware.

 Can you suggest any major configuration differences we might have between
 the plain-vanilla ubuntu 14.04 vagrant environment and what you're running?

 On Sun, Jun 28, 2015 at 4:00 PM, adaryl.l.wakefi...@gmail.com wrote:

   Unfortunately I’m not sophisticated enough to use Vagrant top of which
 I’m not installing in a VM. I’m using a cluster of 3 bare metal machines
 running Ubuntu 14.4. I’ve followed every step prescribed to the letter in
 this link:
 http://docs.puppetlabs.com/puppet/4.2/reference/install_linux.html

 What other information can I pass along?


 Adaryl Bob Wakefield, MBA
 Principal
 Mass Street Analytics, LLC
 913.938.6685
 www.linkedin.com/in/bobwakefieldmba
 Twitter: @BobLovesData

  *From:* Daniel Dreier d...@puppetlabs.com
 *Sent:* Sunday, June 28, 2015 5:52 PM
 *To:* puppet-users@googlegroups.com
 *Subject:* Re: [Puppet Users] puppet agent won't start

On Sun, Jun 28, 2015 at 3:15 PM, adaryl.l.wakefi...@gmail.com wrote:

   When I go to start my puppet agent using:
 sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running
 enable=true.

 I get:

 sh: 0: getcwd() failed: No such file or directory

 When I try again, I discover that the /opt directory has magically
 disappeared. Any ideas?



 I'd have an easier time trying to reproduce the problem if you include
 information on what platform you're running on, what version of puppet you
 installed, and any other setup steps you may have taken. Ideally, if you
 can reproduce this consistently via a shell script in a vagrant environment
 it'll be much easier to troubleshoot and you'll get faster feedback.



 --
  Daniel Dreier
 Technical Operations Engineer
 GPG: BA4379FD
 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAGk8suY5XZ7b1dVf2Ap5Xv9%3DhDBgoQo2%2B%2BACRjqec-QjD00_Lg%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAGk8suY5XZ7b1dVf2Ap5Xv9%3DhDBgoQo2%2B%2BACRjqec-QjD00_Lg%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.
 --
 You received this message because you

[Puppet Users] Quoting keys in hiera lookups

2015-06-25 Thread Daniel Urist
Is there any way to quote keys in hiera lookups so hiera doesn't interpret
periods as further lookups?

For example, if I have yaml that looks like this:

myservertype:
  host1.domain:
  somekey: somevalue
  host2.domain:
  somekey.somevalue

The periods in the keys host1.domain and host2.domain are valid YAML, but
If I attempt to do a hiera lookup with
hiera(myservertype.host1domain.somekey'), hiera complains that the data
object doesn't exist, because (I surmise) it's interpreting the periods
'host1.domain' as further lookups. If the key doesn't have a period, the
lookup succeeds. I've tried quoting the keys in both the yaml file and the
hiera lookup, but that doesn't help.

I can work around this by doing hiera(myservertype) and then pulling out
the value with a puppet array lookup, which is what I'm doing now, but this
seems pretty inefficient.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEo6%3DKZu4E-oMzPL_%3DT%3DMhtZFZfLtTo%2Bxzbmxq-_Hgwhf2uY%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Slow Mirror

2015-06-16 Thread Daniel Parks
On Tue, Jun 16, 2015 at 3:53 PM, Xav Paice xavpa...@gmail.com wrote:

 When we go to http://apt.puppetlabs.com/pool/trusty/main/p/puppet/
 there's no files at all - although the server responds pretty quickly - is
 this a known thing?


I guess serving no files might help with load issues. :)

It shows files for me… I believe it’s updated via rsync, and so the files
shouldn’t just disappear, but maybe I’m wrong. I’ll have to look into it,
but it’s not the first thing on my list unless other people are running
into this.

Thanks for the heads up, though!

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPNukCnfnLD9MinqZbniOSteU3QW315zL_wFhDF61A%3DdzDvMvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Slow Mirror

2015-06-16 Thread Daniel Parks
On Tuesday, June 16, 2015, Xav Paice xavpa...@gmail.com wrote:

 When we go to http://apt.puppetlabs.com/pool/trusty/main/p/puppet/
 there's no files at all - although the server responds pretty quickly - is
 this a known thing?


Turns out we messed up an exclude when rsyncing the other day, and lost
those while moving from one server to another. Oops.

Sorry about that!

And thanks for letting me know.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPNukCk8iqShSF_GpAFGuxiXnpm3o_Gfqrd-bdppJFQuHpvuoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Slow Mirror

2015-06-11 Thread Daniel Parks
On Thu, Jun 11, 2015 at 3:25 AM, Denny B bortfeldtde...@gmail.com wrote:

 We can't download faster than 1mb/s. When I use another Server from other
 network everything works fine.
 Can you check if there is a speedlimit active for 217.79.215.0/24 ?
 To other mirrors (such as debian) we can download as fast as possible
 (~30-50mb/s)


We don’t do any kind of bandwidth limiting for that box, and our hosting
provider reports that there shouldn’t be any problems. Looks like there’s a
problem between our networks. Could you open a ticket with your hosting
provider to see what they can do? Feel free to give them my email (
d...@puppetlabs.com) and I’ll do whatever I can to help.

Here’s a traceroute, which may be useful to them:

traceroute to 217.79.215.252 (217.79.215.252), 30 hops max, 60 byte packets
 1  router2-dal.linode.com (67.18.7.162)  89.761 ms  89.752 ms  89.739 ms
 2  ae2.car02.dllstx2.networklayer.com (67.18.7.93)  88.928 ms  112.495 ms
 112.474 ms
 3  po102.dsr01.dllstx2.networklayer.com (70.87.254.81)  89.601 ms  89.579
ms  90.085 ms
 4  po21.dsr01.dllstx3.networklayer.com (70.87.255.65)  90.022 ms  89.993
ms  89.959 ms
 5  ae17.bbr01.eq01.dal03.networklayer.com (173.192.18.226)  89.320 ms
 89.290 ms ae17.bbr02.eq01.dal03.networklayer.com (173.192.18.230)  89.202
ms
 6  ae7.bbr02.eq01.dal03.networklayer.com (173.192.18.209)  89.192 ms
ae1.bbr01.tl01.atl01.networklayer.com (173.192.18.135)  74.128 ms  77.054 ms
 7  ae0.bbr01.eq01.wdc02.networklayer.com (173.192.18.152)  91.707 ms
ae1.bbr01.tl01.atl01.networklayer.com (173.192.18.135)  77.037 ms  73.739 ms
 8  ae7.bbr02.eq01.wdc02.networklayer.com (173.192.18.195)  83.151 ms
 84.234 ms ae0.bbr01.eq01.wdc02.networklayer.com (173.192.18.152)  85.741 ms
 9  ae7.bbr02.eq01.wdc02.networklayer.com (173.192.18.195)  83.301 ms
ae0.bbr01.eq01.ams02.networklayer.com (50.97.18.215)  164.310 ms
ae7.bbr02.eq01.wdc02.networklayer.com (173.192.18.195)  84.078 ms
10  ae0.bbr01.eq01.ams02.networklayer.com (50.97.18.215)  161.824 ms
 161.688 ms  163.396 ms
11  ae7.bbr01.xn01.fra01.networklayer.com (50.97.18.218)  168.007 ms
ae0.bbr02.xn01.fra01.networklayer.com (50.97.18.217)  168.363 ms  206.595 ms
12  ae7.bbr01.xn01.fra01.networklayer.com (50.97.18.218)  208.187 ms
 207.047 ms  206.973 ms
13  decix-2.eu.equinix.net (80.81.193.234)  185.045 ms  184.852 ms
ge-2-2-22-ed2.ixsolutions.net (217.79.208.25)  193.202 ms
14  ge-2-2-22-ed2.ixsolutions.net (217.79.208.25)  193.112 ms  193.140 ms
 193.050 ms
15  * * *

Thanks,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPNukC%3DzAkYoPLtqZ_yEcnZ2EoF7NzQT%3D8SigWXYL%2BY15bKNuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Slow Mirror

2015-06-10 Thread Daniel Dreier
On Wed, Jun 10, 2015 at 3:07 AM, Denny B bortfeldtde...@gmail.com wrote:

 Hello everyone,

 since two days we aren't able to synchronize our local mirror with
 apt.puppetlabs.com.
 The maximum speed to download everything is about 50-100kb/s which is
 really really slow for our whole datacenter.
 Are there any problems with your mirror? Did you maybe blocked us?

 Currently it takes ages to get a synchron mirror.


Denny -

Thanks for the heads-up. I'm on the operations team responsible for
apt.puppetlabs.com, and I've created a ticket internally to track the
issue. We'll try and reproduce the issue and reach out to you directly as
needed, at the very least to confirm a fix.

-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suZGCmGJEn715eF7o73MHm8D45RNhc-NNM6n%2BJ%2BDVeyXoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Slow Mirror

2015-06-10 Thread Daniel Parks
On Wednesday, June 10, 2015 at 4:30:33 AM UTC-7, Denny B wrote:

 since two days we aren't able to synchronize our local mirror with 
 apt.puppetlabs.com.
 The maximum speed to download everything is about 50-100kb/s which is 
 really really slow for our whole datacenter.


Hi Denny,

I'm the other Daniel on the ops team at Puppet. :)

I can rsync from my house, so it is probably a network problem. Traceroute 
looks okay. Could you try downloading a large file over HTTP and see how 
fast it is?

For example, I get:
$ curl -o /dev/null 
http://yum.puppetlabs.com/fedora/f21/products/SRPMS/razor-torquebox-3.1.1.5-1.fc21.src.rpm
  % Total% Received % Xferd  Average Speed   TimeTime Time 
 Current
 Dload  Upload   Total   SpentLeft 
 Speed
100 61.8M  100 61.8M0 0  5976k  0  0:00:10  0:00:10 --:--:-- 
6320k

(Sorry, I'm posting this from Google Groups and I can't tell if this is 
going to turn out as HTML or just plain text.)

Thanks,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/107ab3ca-0b23-4b7c-9968-378b4941d5cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5

2015-05-20 Thread Daniel
Yep, use descr = 'blah' instead of name = 'blah'


On Friday, 4 December 2009 18:50:31 UTC, Bryan Schneiders wrote:

 I'm using puppet-0.24.8-4.el5 on CentOS 5.4. 

 My problem is yumrepo isn't writing the name= field to the 
 repository files which causes yum to complain with the error: 

 Repository 'local-CentOS-5.4-x86_64' is missing name in configuration, 
 using id 

 I get this behavior on all of my yumrepo definitions.  One of them 
 looks like this: 

 yumrepo { 
 local-$lsbdistid-$release-$architecture: 
 name = local-$lsbdistid-$release-$architecture, 
 baseurl = http://hostname.changed.com:80/cobbler/ks_mirror/ 
 $lsbdistid-$release-$architecture 
 http://hostname.changed.com:80/cobbler/ks_mirror/$lsbdistid-$release-$architecture,
  

 enabled = 1, 
 gpgcheck = 0, 
 priority = 10; 
 } 

 and the resulting file contents are: 

 [local-CentOS-5.4-x86_64] 
 baseurl=http://hostname.changed.com:80/cobbler/ks_mirror/CentOS-5.4- 
 x86_64 
 http://hostname.changed.com:80/cobbler/ks_mirror/CentOS-5.4-x86_64 
 enabled=1 
 gpgcheck=0 
 priority=10 

 I can't find any mailing list discussions or bug reports on this.  Can 
 anyone verify this behavior on other versions of puppet? 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c4bb2137-aab0-4d91-9127-a21f4cb36246%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Manage /etc/fstab option with Puppet and Augeas

2015-04-03 Thread Daniel Dreier
On Fri, Apr 3, 2015 at 10:15 AM, Mitja Mihelič mmihe...@gmail.com wrote:

 Hi!

 I am trying to accomplish a seemigly simple task, currently without any
 success. And so multiple questions come to mind.

 A line in fstab should be checked each puppet runs and set it back to it's
 predefined state.
 gluster1:/gvol   /mnt/glusterglusterfs defaults,transport=tcp,backup-
 volfile-servers=gluster2:gluster3  0 0

 This should change the mountpoint (file) value back to whatever was set in
 $mountpoint.
 augeas { gluster-fstab-mod-mountpoint:
 context = /files/etc/fstab,
 changes = [
 set *[file = '/mnt/gluster']/file '$mountpoint',
 ],
 onlyif = [
 match *[spec = '$server:/$volume'],
 match *[file = '$mountpoint'],
 match *[vfstype = 'glusterfs'],
 ]
 }
 I could do this by having such a block for each of the options (spec,
 file, vfstype). Can it be done any other way?

 How do I go about changing the mount options (
 defaults,transport=tcp,backup-volfile-servers=gluster2:gluster3)?
 If someone adds options to /etc/fstab manually, I'd like to remove them.
 If options are changed, I'd like to reset them. If deleted, add them.
 How can I do that?


Mitja -

Can you use the native mount type (
https://docs.puppetlabs.com/references/latest/type.html#mount) for this? If
you manage all mount points using puppet's mount type and then enable purge
on mount resources (dangerous! test first - not in production) it should do
what you're looking for, if I understand what you're looking to accomplish.


-- 
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGk8suZxRdwB%2BNO%3DLweq3%2BizFsoCJw7TxVtnLMck_%3DtP2dfk6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Error: Could not request certificate: Find /devops/certificate/ca?fail_on_404=true

2014-10-30 Thread Daniel Obi
Even if the puppetmaster webserver is shutdown, i still get the same error

Am Donnerstag, 30. Oktober 2014 15:21:48 UTC+1 schrieb Daniel Obi:

 Greetings,

 we just installed puppetmaster 3.7.1 and trying to join a new agent 3.7.1 
 with the following error:



 puppet agent -t --trace --debug

 Error: Could not request certificate: Find 
 /devops/certificate/ca?fail_on_404=true resulted in 404 with the message: 
 Not Found: Could not find environment 'devops'


 if i try to join with production environment all is fine


 puppet.conf on server:

 ### File managed with puppet ###
 ## Module:   'puppet'

 [main]
 # The Puppet log directory.
 # The default value is '$vardir/log'.
 logdir = /var/log/puppet

 # Where Puppet PID files are kept.
 # The default value is '$vardir/run'.
 rundir = /var/run/puppet

 # Where SSL certificates are kept.
 # The default value is '$confdir/ssl'.
 ssldir = $vardir/ssl

 # Allow services in the 'puppet' group to access key (Foreman + proxy)
 privatekeydir = $ssldir/private_keys { group = service }
 hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

 # Puppet 3.0.x requires this in both [main] and [master] - harmless on 
 agents
 autosign   = $confdir/autosign.conf { mode = 664 }

 show_diff = false

 # Use specified CA server
 ca_server = 
 hiera_config = $confdir/hiera.yaml

 ### Next part of the file is managed by a different template ###
 ## Module:   'puppet'

 [master]
 autosign   = $confdir/autosign.conf { mode = 664 }
 reports= foreman
 external_nodes = /etc/puppet/node.rb
 node_terminus  = exec
 ca = false
 ssldir = /var/lib/puppet/ssl
 certname   = xxx
 environmentpath  = /etc/puppet/environments
 basemodulepath   = 
 /etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules



 /etc/puppet lokks like:

 .
 ├── auth.conf
 ├── auth.conf.rpmnew
 ├── environments
 │   ├── development
 │   │   ├── manifests
 │   │   │   └── site.pp
 │   │   └── modules
 │   ├── devops
 │   │   ├── environment.conf
 │   │   ├── manifests
 │   │   │   └── site.pp
 │   │   └── modules
 │   ├── example_env
 │   │   ├── manifests
 │   │   ├── modules
 │   │   └── README.environment
 │   ├── production
 │   │   ├── manifests
 │   │   │   └── site.pp
 │   │   └── modules
 │   ├── quality
 │   │   ├── manifests
 │   │   │   └── site.pp
 │   │   └── modules
 │   └── testing
 │   ├── manifests
 │   │   └── site.pp
 │   └── modules
 ├── fileserver.conf
 ├── foreman.yaml
 ├── manifests
 │   └── site.pp
 ├── modules
 ├── node.rb
 ├── puppet.conf
 ├── puppet.conf.install
 └── rack
 ├── config.ru
 ├── public
 └── tmp
 └── restart.txt







-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/18b8e473-3d28-4300-8e73-9fb3b146abcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error: Could not request certificate: Find /devops/certificate/ca?fail_on_404=true

2014-10-30 Thread Daniel Obi
Greetings,

we just installed puppetmaster 3.7.1 and trying to join a new agent 3.7.1 
with the following error:



puppet agent -t --trace --debug

Error: Could not request certificate: Find 
/devops/certificate/ca?fail_on_404=true resulted in 404 with the message: 
Not Found: Could not find environment 'devops'


if i try to join with production environment all is fine


puppet.conf on server:

### File managed with puppet ###
## Module:   'puppet'

[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

# Allow services in the 'puppet' group to access key (Foreman + proxy)
privatekeydir = $ssldir/private_keys { group = service }
hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

# Puppet 3.0.x requires this in both [main] and [master] - harmless on 
agents
autosign   = $confdir/autosign.conf { mode = 664 }

show_diff = false

# Use specified CA server
ca_server = 
hiera_config = $confdir/hiera.yaml

### Next part of the file is managed by a different template ###
## Module:   'puppet'

[master]
autosign   = $confdir/autosign.conf { mode = 664 }
reports= foreman
external_nodes = /etc/puppet/node.rb
node_terminus  = exec
ca = false
ssldir = /var/lib/puppet/ssl
certname   = xxx
environmentpath  = /etc/puppet/environments
basemodulepath   = 
/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules



/etc/puppet lokks like:

.
├── auth.conf
├── auth.conf.rpmnew
├── environments
│   ├── development
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── devops
│   │   ├── environment.conf
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── example_env
│   │   ├── manifests
│   │   ├── modules
│   │   └── README.environment
│   ├── production
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── quality
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   └── testing
│   ├── manifests
│   │   └── site.pp
│   └── modules
├── fileserver.conf
├── foreman.yaml
├── manifests
│   └── site.pp
├── modules
├── node.rb
├── puppet.conf
├── puppet.conf.install
└── rack
├── config.ru
├── public
└── tmp
└── restart.txt





-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4f4cf242-4e5a-4b69-b51a-73f481b819d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Example of how to use require with hiera?

2014-09-22 Thread Daniel Johnson
 Does this actually work Nan??

It does work. At least in the latest version of puppet.

 Can somebody point me to any page where this is documented?

If I could find documentation for it I wouldn't have asked here.

-- 
teknotus (Take Notice)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BnDE0iqZzFn6-UKwEa4tQTKPEgJdj5f%2BTZfUGE%2Bu8s--UtmFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Example of how to use require with hiera?

2014-09-18 Thread Daniel Johnson
Things like

require: File['somefile']

or

require:
  File: somefile

both crash, and burn.

Not having a require also causes failure as it tries to do things it
can't without the prerequisite.

After hours of searching I couldn't find any examples to work from.

-- 
teknotus (Take Notice)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BnDE0gpiOywMoEth4OJSG-aYOOB%2BZ17LOy1_YhQ6u8L5NiAcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Using exported resources as data containers?

2014-09-10 Thread Daniel Siechniewicz
Hi,

Sounds like a job for https://github.com/dalen/puppet-puppetdbquery 
potentially? pdbresourcequery or maybe even the hiera backend.


Regards,
Daniel


On Tuesday, September 9, 2014 11:49:21 PM UTC+1, mpou...@afilias.info wrote:

 I have a difficult-to-manage application which does not implement a conf.d 
 or include syntax in its configuration, but requires a bunch of config 
 snippets that contain information only on groups of other servers.   I've 
 been dealing with this by generating the config snippets from templates on 
 some servers as exported resources, realizing them on the central server, 
 and then executing an external script to compile these snippets into the 
 final config.

 This has a couple of drawbacks.  First, it requires puppet to stat nearly 
 15,000 little tiny config snippets every run that are not actually used 
 directly, and shouldn't need to exist.  Second, the final config file, 
 because it's compiled by an external script, isn't under the control of 
 puppet, so it has no idea if that file gets modified by something outside.. 
 so it can't know to update it. 

 I've been mulling over a better way to manage this config file, and I 
 think I've hit on an idea, but I have no idea if it will actually work, or 
 what the syntax would look like if it could.

 I'm thinking of replacing the @@file resources on the remote servers with 
 a defined type .. say .. @@data_container.   Then, on the server where the 
 data is needed I could use a collector to iterate over the exported 
 resources reading data from them to use in the single template for the 
 final config file.

 Where the data is defined:
 @@data_container { 'mydata':
someparameter = 'foo'
 }

 And then in the template on the other host, somehow get a collection of 
 those resources into an array, and make use of their parameters as 
 variables to be referenced in the template.. 

 %- collection.each do |data| -%
 %= data.someparameter %
 %- end -%

 Would this work at all?  Is there syntax to support something like this?




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/59ba639d-441a-41f9-bcf4-93ac45fe209f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Using exported resources as data containers?

2014-09-10 Thread Daniel Siechniewicz
Hi,

This particular hiera backend, from what I understand, is extracting
values from puppetdb on the fly, so you don't have to put any values
in hiera yaml/json files save for a relevant puppetdb query. This
would centralize data gathering and localize it to a data component.
Otherwise you end up with puppetdb queries within your manifests which
could be not what you want. Then again, this really depends on your
preferences. Good luck and tell us if this worked for you.


Regards,
Daniel


On 10 September 2014 13:03, Matthew Pounsett mpouns...@afilias.info wrote:


 On 10 September 2014 07:30, Daniel Siechniewicz dan...@siechniewicz.com
 wrote:

 Hi,

 Sounds like a job for https://github.com/dalen/puppet-puppetdbquery
 potentially? pdbresourcequery or maybe even the hiera backend.


 Hiera doesn't apply here, because it's data gathered from the servers
 (mostly from facts) where the config snippets are defined.  Putting that
 sort of thing in Hiera violates Don't Repeat Yourself.  I'll have a look at
 the others though.. I'm not familiar with them.  Thanks for the suggestions.

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Puppet Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/puppet-users/VzW7ZODB7hQ/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAKZ22fLmwD0eqXs7DttKydpZjPBTJMJq0PcQY28vpnbO%3D7mxGg%40mail.gmail.com.

 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BSnNS-XdeWFXeJy75LAnn5Smb9u1R0vvBSJz_ZUB3Ta-paOkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Announce: Facter 2.2.0

2014-08-27 Thread Daniel Schaefer
I've opened a bug here: https://tickets.puppetlabs.com/browse/FACT-686

  

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/369b7edc-b65c-47a9-9b9a-1b613900822a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera-mysql working with hiera cli but not through puppet agent

2014-08-08 Thread Daniel Kinon
 

Hello,

   I'm running opensource hiera 1.3.4 and puppet 3.6.2.  I'm attempting to 
use hiera-yaml and hiera-mysql backends at the same time.  When I run hiera 
on the command line I retrieve the values I expected from both yaml and 
mysql but when an agent checks in (daemon or manual), it isn't retrieving 
values from mysql.  Any ideas on why command line works but agent checkin 
doesn't?


Here are the pertinent details:

   1. /etc/puppet/hiera.yaml:
   2. ~
   3. ---
   4. :backends:
   5.   - yaml
   6.   - mysql
   7.  
   8. :mysql:
   9.   :host: 
   10.   :user: puppet
   11.   :pass: X
   12.   :database: hieradata
   13.   :query:
   14. - SELECT hieraValue FROM deployment WHERE hieraKey='%{key}' AND 
   datacenter='%{::aws_vpc_name}' AND organization='%{::aws_tag_merchant}' AND 
   environment='%{::aws_tag_cluster}' AND puppetEnv='%{env}'
   15.  
   16. :logger: console
   17.  
   18. :yaml:
   19.   :datadir: '/etc/puppet/hieradata'
   20.  
   21. :hierarchy:
   22.   - certs/%{clientcert}
   23.   - hosts/%{fqdn}
   24.   - 
   deployment/%{::aws_vpc_name}/%{::aws_tag_merchant}-%{::aws_tag_cluster}
   25.   - common
   26. 
   27.  
   28. output from hiera:
   29. 
   30. $ hiera -c /etc/puppet/hiera.yaml testmodule::deploy::latest_build 
   nothing ::aws_vpc_name=mc2 ::aws_tag_merchant=test 
   ::aws_tag_cluster=testcluster env=production
   31. 514
   32. 
   33.  
   34. output from puppet agent checkin:
   35. 
   36. # puppet agent -t
   37. Info: Retrieving pluginfacts
   38. Info: Retrieving plugin
   39. Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
   40. Info: Loading facts in /var/lib/puppet/lib/facter/aws-metadata.rb
   41. Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
   42. Info: Loading facts in /var/lib/puppet/lib/facter/staging_http_get.rb
   43. Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
   44. Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
   45. Info: Loading facts in /var/lib/puppet/lib/facter/staging_windir.rb
   46. Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
   47. Error: Could not retrieve catalog from remote server: Error 400 on 
   SERVER: Could not find data item testmodule::deploy::latest_build in any 
   Hiera data file and no default supplied at 
   /etc/puppet/modules/testmodule/manifests/init.pp:79 on node testnode1.local
   48. Warning: Not using cache on failed catalog
   49. Error: Could not retrieve catalog; skipping run
   50. 
   

Thanks,

-Dan


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ea214f6c-b81b-4eda-8646-ca68ac959d7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet catalog transfer often gets truncated (Could not intern from pson: error)

2014-07-15 Thread Daniel
I am also getting this problem. Did running the puppet master 
within Apache/Passenger or nginx/Passenger help at all?

I was thinking it could be to do with a non ascii character making its way 
into my code somewhere as that seems to cause dodgy stuff but that's not 
it. I've seen lots of suggestions but I get the feeling it must be a bug 
with puppet.

Not able to view the ticket as it looks like projects.puppetlabs.com is 
down currently.

I am using opensource:

ruby-1.8.7.352-13.el6.x86_64
puppet-2.7.25-2.el6.noarch
puppet-server-2.7.25-2.el6.noarch

Dan



On Tuesday, 23 April 2013 16:31:06 UTC+1, Jeff B wrote:



 On Tuesday, April 23, 2013 9:38:34 AM UTC-4, jcbollinger wrote:



 On Monday, April 22, 2013 3:03:13 PM UTC-5, Matthew Burgess wrote:

 On Mon, Apr 22, 2013 at 4:56 PM, Jeff B jeffb...@gmail.com wrote:

 I've been hitting this issue for a long time. well over a year and I 
 guess it's time to start pushing it to try to find the root cause.  I've 
 seen this reported several times in the past but I've never seen a 
 resolution found for this exact problems.  There are other root causes for 
 pson errors that have been resolved, but not for the ones describing my 
 problem.

 What we're finding is that often times the catalog is getting chopped 
 off at some seemingly random point in the file.  If you run puppet agent 
 multiple times in a row each time it will cut off at always different 
 parts.


 Hi Jeff,

 At the risk of this looking like a when all you have is a hammer, 
 everything looks like a nail type response, whenever I've seen random 
 failures like this, it's because the puppetmaster can't cope with the load 
 being driven to it.  Are you running your puppetmaster behind a web server 
 such as Apache/Passenger or nginx/Passenger?  If not, and dependent on the 
 number of clients and their runinterval, you may be hitting a bottleneck 
 caused by Puppet's internal webserver's (Webrick's) single-threaded nature.


 A fundamental characteristic of being single-threaded is that Puppet / 
 webrick always finishes processing any current request before it starts 
 work on the next. Therefore, if Puppet's responses are truncated when it 
 has additional requests queued then that is not merely a loading issue -- 
 it is a genuine and fairly serious bug.  It probably indicates that Puppet 
 does not properly flush / close the response stream when it reaches the end 
 of the response (or the like), though I cannot guess whether that would be 
 a flaw in Puppet's own code or one in webrick.  If in Puppet itself, then 
 it may manifest in other ways and in other contexts, too, so I urge you to 
 file a ticket.


 John


 Thanks John,

 Ticket has been created:  https://projects.puppetlabs.com/issues/20350  

 I'll be happy to help debug this problem as needed.
  


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f628c268-1927-40bf-89f4-e5999de98518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Issue with Role-Profile implementation

2014-07-09 Thread Daniel De Marco
Varun,

the files directory under siler should be named files, not file.

Daniel.

* Varun Utagikar varun.utagi...@gmail.com [07/09/2014 08:30]:
Hello
I am trying to implement role-profile structure . I have referred below
mentioned docs/links :

 https://ask.puppetlabs.com/question/1655/an-end-to-end-roleprofile-example-using-hiera/
https://projects.puppetlabs.com/issues/16667
I have hit a brick wall. I am trying to pull a file on an agent from a
master where I have defined a sample role and profile structure. I have
tested using Puppet 3.6.2 , Puppet 3.6.1 and the free enterprise version
of Puppet. I am getting the same error :
agentsnip
Error: /Stage[main]/Siler/File[/tmp/a]: Could not evaluate: Could not
retrieve file metadata for puppet:///puppet/modules/siler/a: Error 400 on
SERVER: Not authorized to call find on
/file_metadata/puppet/modules/siler/a with {:links=follow,
:source_permissions=ignore}
Wrapped exception:
Error 400 on SERVER: Not authorized to call find on
/file_metadata/puppet/modules/siler/a with {:links=follow,
:source_permissions=ignore}
/agentsnip
mastersnip
Debug: Evaluating match for Route /^\/v2\.0/
Debug: Did not match path
(/production/file_metadata/puppet/modules/siler/a)
Debug: Evaluating match for Route /.*/
Error: Not authorized to call find on
/file_metadata/puppet/modules/siler/a with {:links=follow,
:source_permissions=ignore}
Debug: Routes Registered:
Debug: Route /^\/v2\.0/
/mastersnip
My puppet dir. hierarchy :
puppet/
├── auth.conf
├── environments
│   └── example_env
│       ├── manifests
│       ├── modules
│       └── README.environment
├── fileserver.conf
├── manifests
│   ├── nodes
│   │   └── pu.pp
│   └── site.pp
├── modules
│   ├── profile
│   │   └── manifests
│   │       └── init.pp
│   ├── role
│   │   └── manifests
│   │       └── init.pp
│   ├── siler
│   │   ├── file
│   │   │   ├── a
│   │   │   ├── b
│   │   │   ├── c
│   │   │   ├── d
│   │   │   └── e
│   │   └── manifests
│   │       └── init.pp
│   └── xyz
│       ├── files
│       │   └── xyz
│       └── manifests
│           └── init.pp
└── puppet.conf
I am attaching my sample manifest files. 
I am using CentOS 6.3 x86_64 on both master and agent.
# uname -a
Linux puppet.example.in 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.3 (Final)
I am using /etc/hosts file for name resolution.
I tried in vain all the troubleshooting steps that i could find . I am not
sure whether its just a simple configuration issue or a bug. I am unable
to troubleshoot further due to non availability of documentation on
role-profile definitions.I request you to help me in sorting this out.
Varun A Utagikar
p.s. - Sorry for the long mail.

--
You received this message because you are subscribed to the Google Groups
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [1]puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit

 [2]https://groups.google.com/d/msgid/puppet-users/acba6f33-34da-420b-a638-9837ca0d16d4%40googlegroups.com.
For more options, visit [3]https://groups.google.com/d/optout.

 References

Visible links
1. mailto:puppet-users+unsubscr...@googlegroups.com
2. 
 https://groups.google.com/d/msgid/puppet-users/acba6f33-34da-420b-a638-9837ca0d16d4%40googlegroups.com?utm_medium=emailutm_source=footer
3. https://groups.google.com/d/optout

 -rw-r--r-- puppet/puppet20 2014-07-07 05:35 etc/puppet/manifests/site.pp
 -rw-r--r-- puppet/puppet   124 2014-07-08 08:23 
 etc/puppet/manifests/nodes/pu.pp
 -rw-r--r-- root/root42 2014-07-08 08:23 
 etc/puppet/modules/profile/manifests/init.pp
 -rw-r--r-- root/root41 2014-07-08 08:22 
 etc/puppet/modules/role/manifests/init.pp
 -rwxrwxrwx root/root   152 2014-07-08 08:42 
 etc/puppet/modules/siler/manifests/init.pp

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20140709123855.GA26279%40yakko.bartol.udel.edu.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Get subdirectories by fact

2014-02-20 Thread Daniel K.
Hello everyone,

i am trying to write my first custom fact but i don't know how. I didn't 
find any good instructions or list of functions i can use.

What i want to do is the following:

On our machines we have the directory /work, There is a list of all 
possible subdirectories, but no machine has all of them.
Depending on the existence of the subdirectories i have to create files. 
Now all i need is a fact that gives me all subdirectories of /work but 
only depth=1.

e.g.
/work
   |_ Sub_a
   |_ Sub_b
|_ Sub_b_c

I would only need Sub_a and Sub_b returned by the fact.

Does anyone know how to do it?
   
Thanks Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/462f3de1-202d-4493-80b2-6118625b83b3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Error: undefined method `gsub' for nil:NilClass

2014-01-31 Thread Juan Pablo Daniel
Hi guys, can you give me a hint on this?

Thanks!

Debug: Executing '/sbin/sysctl -n net.ipv4.ip_local_port_range'
Error: undefined method `gsub' for nil:NilClass
Error:
/Stage[main]/Spotflux_pweb::Sysctl/Sysctl[net.ipv4.ip_local_port_range]/value:
change from  to 5000 65000 failed: undefined method `gsub' for nil:NilClass
# /sbin/sysctl -n net.ipv4.ip_local_port_range
1024 65535

Debug: Executing '/sbin/sysctl -n net.core.rmem_max'
Error: undefined method `gsub' for nil:NilClass
Error: /Stage[main]/Spotflux_pweb::Sysctl/Sysctl[net.core.rmem_max]/value:
change from  to 8388608 failed: undefined method `gsub' for nil:NilClass
# /sbin/sysctl -n net.core.rmem_max
16777216

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CADBsajaOmbFHkwHh7jnkpk95GycJhFVAiK%3D4M0_muZApnyS1Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] ldap puppetVar not set.

2014-01-13 Thread Daniel Kupfer
Hi,
I'm migrating from puppet 2.x to 3.3.2, but i'm having trouble with the 
puppetvar from ldap.
In puppet 2 i could do:

if $nagios {
   include nagios
}

But in puppet 3 this does not seem to work anymore. Now i didn't set up the 
former puppetmaster. Am i missing something?

The ldap puppetnode looks like so and works with puppet 2:

dn: cn=myhost.int-tp.here.local,ou=productie,ou=hosts,dc=here,dc=local
objectClass: puppetClient
objectClass: top
objectClass: ipHost
objectClass: device
environment: productie
ipHostNumber: 192.99.22.69
puppetVar: ldap
puppetVar: ntp
puppetVar: nagios
puppetVar: vmwaretools
cn: myhost.int-tp.here.local

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5273f6d1-5f99-42c5-b9a3-eb05ced9b876%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ldap puppetVar not set.

2014-01-13 Thread Daniel Kupfer
Johan,
(dank) thanks for your reply, i will have a look at that.

Regards,
Daniel.

On Monday, January 13, 2014 10:53:26 AM UTC+1, Johan De Wit wrote:

 Any raeson why not using puppetClass in ldap instead ? Then that class 
 will be included and is that kind of code not needed. 

 I assume the ldap configuration in yout puppet.conf is OK concerning the 
 ldap part ? 

 Grts 

 Johan 


 On 01/13/2014 10:26 AM, Daniel Kupfer wrote: 
  Hi, 
  I'm migrating from puppet 2.x to 3.3.2, but i'm having trouble with 
  the puppetvar from ldap. 
  In puppet 2 i could do: 
  
  if $nagios { 
 include nagios 
  } 
  
  But in puppet 3 this does not seem to work anymore. Now i didn't set 
  up the former puppetmaster. Am i missing something? 
  
  The ldap puppetnode looks like so and works with puppet 2: 
  
  dn: cn=myhost.int-tp.here.local,ou=productie,ou=hosts,dc=here,dc=local 
  objectClass: puppetClient 
  objectClass: top 
  objectClass: ipHost 
  objectClass: device 
  environment: productie 
  ipHostNumber: 192.99.22.69 
  puppetVar: ldap 
  puppetVar: ntp 
  puppetVar: nagios 
  puppetVar: vmwaretools 
  cn: myhost.int-tp.here.local 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Puppet Users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
  an email to puppet-users...@googlegroups.com javascript:. 
  To view this discussion on the web visit 
  
 https://groups.google.com/d/msgid/puppet-users/5273f6d1-5f99-42c5-b9a3-eb05ced9b876%40googlegroups.com.
  

  For more options, visit https://groups.google.com/groups/opt_out. 


 -- 
 Johan De Wit 

 Open Source Consultant 

 Red Hat Certified Engineer (805008667232363) 
 Puppet Certified Professional 2013 (PCP006) 
 _ 
   
 Open-Future Phone +32 (0)2/255 70 70 
 Zavelstraat 72  Fax   +32 (0)2/255 70 71 
 3071 KORTENBERG Mobile+32 (0)474/42 40 73 
 BELGIUM http://www.open-future.be 
 _ 
   

 Next Events: 
 Puppet Fundamentals Training | 
 http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february 
 Puppet Intruction Course | 
 http://www.open-future.be/puppet-introduction-course-7th-february 
 Zabbix Certified Training | 
 http://www.open-future.be/zabbix-certified-training-10-till-12th-february 
 Zabbix for Large Environments Training | 
 http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february
  
 Subscribe to our newsletter | http://eepurl.com/BUG8H 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/403ac895-f562-477b-a8a0-f82f99d0798e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: ldap puppetVar not set.

2014-01-13 Thread Daniel Kupfer
Johan,

I use the puppetVar's for more then just including classes. Do you perhaps 
happen to know why the 'if' statement doesn't work?

Kind regards,
Daniel.

On Monday, January 13, 2014 10:26:02 AM UTC+1, Daniel Kupfer wrote:

 Hi,
 I'm migrating from puppet 2.x to 3.3.2, but i'm having trouble with the 
 puppetvar from ldap.
 In puppet 2 i could do:

 if $nagios {
include nagios
 }

 But in puppet 3 this does not seem to work anymore. Now i didn't set up 
 the former puppetmaster. Am i missing something?

 The ldap puppetnode looks like so and works with puppet 2:

 dn: cn=myhost.int-tp.here.local,ou=productie,ou=hosts,dc=here,dc=local
 objectClass: puppetClient
 objectClass: top
 objectClass: ipHost
 objectClass: device
 environment: productie
 ipHostNumber: 192.99.22.69
 puppetVar: ldap
 puppetVar: ntp
 puppetVar: nagios
 puppetVar: vmwaretools
 cn: myhost.int-tp.here.local



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5575e6f1-def7-4478-bcc2-1a0f69500af2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppet doens't look up all my hiera data sources.

2014-01-03 Thread Daniel Kupfer
Hello,

question: why is the hiera data source 'location' not looked up for the 
class 'autofs'?

For some reason some of my 'parametered' classes are not looked up in all 
my hiera data sources:

As you can see in the following log exampt the location hiera source is 
not looked up for the class autofs but it is looked up for the class ntp:

Debug: Automatically imported autofs from autofs into test
Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up autofs::stage_nfsserver in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up autofs::home_nfsserver in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up autofs::stage_nfsshare in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up autofs::home_nfsshare in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source common
Debug: importing '/etc/puppet/modules/autofs/manifests/install.pp' in 
environment test
Debug: Automatically imported autofs::install from autofs/install into test
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -ql rpm'
Debug: importing '/etc/puppet/modules/autofs/manifests/setupdir.pp' in 
environment test
Debug: Automatically imported autofs::setupdir from autofs/setupdir into 
test
Debug: importing '/etc/puppet/modules/autofs/manifests/confmaster.pp' in 
environment test
Debug: Automatically imported autofs::confmaster from autofs/confmaster 
into test
Debug: importing '/etc/puppet/modules/autofs/manifests/virtual.pp' in 
environment test
Debug: Automatically imported autofs::virtual::conf_master from 
autofs/virtual into test
Debug: importing '/etc/puppet/modules/autofs/manifests/service.pp' in 
environment test
Debug: Automatically imported autofs::service from autofs/service into test
Debug: importing '/etc/puppet/modules/ntp/manifests/init.pp' in environment 
test
Debug: Automatically imported ntp from ntp into test
Debug: hiera(): Looking up ntp::start in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source location/int
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up ntp::enable in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source location/int
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up ntp::ntpservers in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source location/int
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up ntp::version in YAML backend
Debug: hiera(): Looking for data source nodes/nwr-itvl-dak003
Debug: hiera(): Cannot find datafile 
/etc/puppet/hiera/nodes/nwr-itvl-dak003.yaml, skipping
Debug: hiera(): Looking for data source server_profile/int-3a
Debug: hiera(): Looking for data source location/int
Debug: hiera(): Looking for data source common

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b4431fb5-bc91-4612-9c8f-45002cb8707a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet and scripts.

2013-11-21 Thread Daniel Lyons
Hello,
So I realize one of the main points of puppet is moving way from .sh 
scripts but I'm at a point where I need to use one until I can get 
everything figured out. The problem I'm having is that my scripts dont seem 
to run properly if I have puppet call them.
 
We've got a decently complicated .sh script used to set up oracle database, 
inlcuding partioning and the like. If I attempt to run it through puppet 
the script will end after 300 seconds as timed out. To test a simpler case 
I just made a little script as such:
 
#!/bin/sh
echo Something
 
Then if I try to use it with this (as a puppet agent run):
 
exec { Thing:

provider = shell,
command = sh /testscript.sh,
path = (my path) 

}
 
I notice through --debug it says it executes the script but I don't see the 
actual echo command comming out. I've read about logoutput = true and that 
will give me the Somthing in the puppet information but if I run the big 
script I still dont see anything. The install script opens with defining a 
bunch of functions and then heading into a main, so I'm wondering if there 
is something with puppet and scripts that doesn't want to just run? It 
seems like it should just let the script run though. I have verified the 
script works correctly when simply run straight in the shell.
 
Again, as I've moved some other programs and installs to puppet I realize 
I'm kind of going against the puppet grain on this and eventually plan to 
do away with sh scripts but for now, due to time constraints and having a 
lot of this script written before I arrived here, I sort of need to put a 
temporary fix on this one by running the script we've used for a while.
 
Thanks for the help, and double thanks if this is something out of my range 
of understanding for scripts and puppet that I'm unaware of. I'm a bit of a 
newbie to all this and have run through the tutorials and such but I think 
there's a piece I'm blind to here. :)
 
-Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1bc22825-abb8-4fb8-b200-b620b61742e9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet and scripts.

2013-11-21 Thread Daniel Lyons
So I knew the script took a while but I thought to myself: No way does it 
take 5 minutes. Sure enough I dropped the timeout and it finishes. 312 
seconds...
 
Also I understand now that the log is posted in full AFTER the script runs, 
so that's why I wasn't seeing any of the echo outputs at all after the 
timeout fail.
 
I needed that second brain to see a goof like that, highly appriciate 
it Andreas.

On Thursday, November 21, 2013 10:33:41 AM UTC-8, Andreas Ntaflos wrote:

 On 2013-11-21 19:08, Daniel Lyons wrote: 
  We've got a decently complicated .sh script used to set up oracle 
  database, inlcuding partioning and the like. If I attempt to run it 
  through puppet the script will end after 300 seconds as timed out. To 
  test a simpler case I just made a little script as such: 

 Exec has a timeout parameter: 

 http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-timeouthttp://www.google.com/url?q=http%3A%2F%2Fdocs.puppetlabs.com%2Freferences%2Flatest%2Ftype.html%23exec-attribute-timeoutsa=Dsntz=1usg=AFQjCNGXNhLCTWLV4cHSmCXtjIt0gosWQA
  

 HTH 

 Andreas 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/aef74b71-7690-4bf2-b2ff-6b63b633d34a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] NFS Mount: Still the error Could not evaluate: Field 'device' is required

2013-11-18 Thread Daniel K
Hi there!
I have still a problem in using the pupppet mount-module.

Master 3.3.2 on Ubuntu 12.04 LTS 64 bit.
Agent with problem: 
SLES 10 SP2 64 Bit with Agent 2.7.21

The mount should be created by the following:
















*  file { '/opt/Logfiles':ensure = directory,notify = Mount 
['/opt/Logfiles'],}  mount { /opt/Logfiles:name= 
/opt/Logfiles,ensure  =  present,atboot  = true,
blockdevice = -,device  = logserver1:/LOG1/Logfiles,
fstype  = nfs,options = defaults,require = File 
['/opt/Logfiles'],  }*
On the client the following error is shown:












*puppet agent --verbose --onetime --no-daemonizeinfo: Retrieving 
plugininfo: Loading facts in 
/var/lib/puppet/lib/facter/facter_dot_d.rbinfo: Loading facts in 
/var/lib/puppet/lib/facter/pe_version.rbinfo: Loading facts in 
/var/lib/puppet/lib/facter/root_home.rbinfo: Loading facts in 
/var/lib/puppet/lib/facter/puppet_vardir.rbinfo: Caching catalog for 
XXX.locinfo: Applying configuration version '1384768567'notice: 
/Stage[main]//Node[XXX.loc]/Mount[/opt/Logfiles]/ensure: defined 'ensure' 
as 'defined'info: FileBucket got a duplicate file 
{md5}842588410211eba6cce2b68cecec5cf4err: 
/Stage[main]//Node[XXX.loc]/Mount[/opt/Logfiles]: Could not evaluate: Field 
'device' is requirednotice: Finished catalog run in 0.06 seconds*

I thought that bug should be removed, see here: 
https://github.com/puppetlabs/puppet/commit/67e1ff6

The strange is, that a SLES 11 has no problem with this with an 2.6 agent...

Kind regards,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/173c9b38-7a5c-4fb6-a32b-2e068cd2c1e1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Own Package Installscript

2013-11-12 Thread daniel . richardt89
Hi,
i want to use Puppet to install all packages from a webserver (no 
repository) .
Therefore I wrote following Script:

class install_package {
case $operatingsystem {
SLES: {

notify {${operatingsystem} 
${operatingsystemrelease} detected:}
notify {Installing $packagename now::}
exec { 'installing $packagename':
command = rpm -iv 
${repopath}${packagename},
path = [/usr/bin, /usr/sbin, /bin]
}

}
}
}

The Script works perfekt if the Variables are inside the Script.
Now I want to use this class for Building a tomcat server.
In this case I have to use the class 2 times.
I tried to change the contend of the variable , but I only get error. 

I see no functioning possibility to use the class 2 times and to give them 
the Variables  $packagename and $repopath.(packagename changing ) 

I tried to use it in a parametrezied class as following: 

class tomcat {
class {'install_package':
packagename = mypackage.rpm,
repopath = http://www.something.de;,
}

class {'install_package':
packagename = mypackagename2.rpm,
repopath = http://www.something.de;,
}

}

class install_package {
case $operatingsystem {
SLES: {

notify {${operatingsystem} 
${operatingsystemrelease} detected:}
notify {Installing $packagename now::}
exec { 'installing $packagename':
command = rpm -iv 
${repopath}${packagename},
path = [/usr/bin, /usr/sbin, /bin]
}

}
}
}

that wars also not possible. I
I have no idea anymore. Pls help me

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ff6c1dcb-3787-4e78-b472-fc2e7f6c62ec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Issues referencing a class from another module

2013-10-29 Thread Daniel Sage
Hey all,

Thanks for the links posted, I'll take a look at them. My immediate problem 
however is if I run the code I included above, I get this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class acme_inc::workstation for puppet-agent.example.com on 
node
puppet-master.example.com

Now, if I comment out the following lines

class {'nfs':
  class = client,
  domain = acme.example.com,
}

Then the catalog will be applied successfully, so I know puppet knows where 
to find the acme_inc::workstation class. Is there a better way to reference 
the nfs class/module? Or is there a flaw with the acme_inc::workstation 
class that's causing puppet to look for it in the wrong place when 
attempting to load the nfs module?

Regards,
Daniel Sage

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1c1b2aa8-4116-4a51-a02e-32e025faca39%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Issues referencing a class from another module

2013-10-29 Thread Daniel Sage
I just realised that there is a typo in my example. But the problem remains 
the same, if I've got the following code in acme_inc::workstation

# install and set up the nfs client
class {'nfs':
  class = client,
  domain = acme.example.com,
}

then I get the following error

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class acme_inc::workstation for puppet-agent-dev.example.com 
on node puppet-agent-dev.example.com

The two classes are in the correct position, with acme_inc::workstation 
being /etc/puppet/modules/acme_inc/manifests/workstation.pp and the nfs 
class is in /etc/puppet/modules/nfs/manifests/init.pp

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8ad31c90-a70d-431a-a3f1-20b4e6ca1699%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Issues referencing a class from another module

2013-10-28 Thread Daniel Sage
Hi all,

I'm currently experiencing an issue where a module cannot reference a class 
from another module.

Currently, I've got two modules, workstation and nfs and I'm attempting to 
use a class from the nfs module inside the workstation module, like so:

Workstation module:

class acme_inc::workstation {

# ensure the local acme user exists
user { acme:
ensure  = present,
uid = '1234',
gid = 'acme',
shell   = '/bin/bash',
home= '/home/$user_name',
managehome = true,
}

... SNIP ...

# install and set up the nfs client
class {'nfs':
  class = client,
  domain = acme.example.com,
}
}

NFS Module:

class nfs ($class = 'client', $domain = '') {

   # install the class specific packages
if $class == 'client' {

# install client NFS packages
package { 'nfs-common':
ensure = installed,
}

} else {

# install server NFS packages
package { 'nfs-kernel-server':
ensure = installed,
}
}

# make sure that idmapd is running
service { 'idmapd':
name  = $service_name,
ensure= running,
enable= true,
subscribe = File['idmapd.conf'],
}

# generate and send the config file
file { 'idmapd.conf':
path= '/etc/idmapd.conf',
ensure  = file,
require = Package['nfs-common'],
content = template(nfs/idmapd.conf.erb),
}
}

Is what I intend to do something supported by puppet? or do I have to load 
the NFS module in the site manifest? Because my end goal is to create a 
module for each of my clients, where each module can then load say 
nginx::vhost to build that clients nginx virtual host.

That way my server entry in site.pp is just:

node 'server.example.com' {

class {'ntp':
  servers = [ 0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org, ],
}

include client1
include client2

}

Again, is this possible in puppet, or do I have to scrap this idea and 
simply include all the client stuff inside the node definition?

Any advise would be appreciated.

Regards,
Daniel Sage

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cbdbfb44-643f-4eb4-bb73-f4db8c03c6c1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Can't find a supported method of using storeconfigs on AWS

2013-10-18 Thread Daniel Friesen
I can't seem to find a sane way of running storeconfigs on the new AWS 
server environment I'm working on.


   - SQLite is not an option. It becomes unusable far too quickly.
   - Using a mysql adapter doesn't seem to work properly.
  - I quickly run into bug 
#9290http://projects.puppetlabs.com/issues/9290again and again. Which after 2 
years STILL hasn't been fixed.
  - The top of 
thishttp://projects.puppetlabs.com/projects/1/wiki/using_stored_configurationseems
 to imply that these ActiveRecord storeconfigs adapters are being 
  deprecated.
   - The recommendation seems to be to use PuppetDB however from the looks 
   of it, I can't even use PuppetDB.
  - I'm not going to use the embedded DB and fall right back into the 
  trap with SQLite again.
  - PuppetDB only appears to support PostgreSQL and does not support 
  MySQL.
  - I already have a MySQL database in AWS' RDS I would like to use. 
  And RDS does not support PostgreSQL.
  - And I am NOT going to go right back to going and installing a 
  separate database server on the local node. That kind of thing has given 
me 
  problem after problem.
   
Please tell me I'm missing something and there's a way I can get this to 
work in this AWS environment. Cause otherwise the idea of puppet running 
any type of server at all – rather than simply working as a local 
filesystem `puppet apply` – looks so unreliable (as I've also had some 
issues with the puppetmaster) that I should just dump every bit of 
server/client software puppetlabs has and write my own custom way of 
distributing configs and data.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Problem retreiving catalog

2013-09-30 Thread Binoy Daniel
Hi Nikolay,

I too facing same issue, but i could not find external_node.rb, where as we 
have /etc/puppet/nodes.rb but that file does not have any database related 
info...

How to proceed..please help

(I think create mysql replica with different name and update the file which 
you specified ?)

Thanks in advance
Binoy

On Thursday, 11 July 2013 00:32:13 UTC+1, Nikolay Georgieff wrote:

 I solved my issue. Cloned the shared db for Foreman (emptied the type 
 column @ hosts table)  and updated the external_node.rb with the latest one.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Is it possible to install actual OS using puppet?

2013-09-12 Thread Daniel Pittman
On Thu, Sep 12, 2013 at 4:03 AM, Steven Nemetz snem...@hotmail.com wrote:
 Take a look at razor
 https://puppetlabs.com/solutions/next-generation-provisioning
 https://github.com/puppetlabs/razor
 http://www.slideshare.net/PuppetLabs/puppetandrazor
 http://www.slideshare.net/PuppetLabs/razor-puppet

You should probably also be aware that Razor is currently being
rewritten to provide a more stable base for future work; we hope to
have that out soon™, but I can't make promises about the schedule
there.  There are more details on why in the first message of this
thread: https://groups.google.com/forum/#!topic/puppet-razor/q4uCVMmUop0

Razor is awesome, but I would caution that you should expect to roll
up your sleeves, pull on your developer hat, and at least be ready to
diagnose and report bugs -- if not fix them -- if you plan on using
it.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Resource chaining not working

2013-07-11 Thread Daniel Siechniewicz
Hi,

I have a seemingly simple situation, it can't really get simpler than that 
when it comes to resource chaining:

node 'redis' {
  class { 'os::repo::misc': }
  class { 'redis': }
  Class['os::repo::misc'] - Class['redis']
}

This doesn't work:

Info: Applying configuration version '1373529981'
Error: Could not find package redis
Error: /Stage[main]/Redis::Package/Package[redis]/ensure: change from 
absent to present failed: Could not find package redis
Notice: /Stage[main]/Redis::Config/File[redis_config]: Dependency 
Package[redis] has failures: true
Warning: /Stage[main]/Redis::Config/File[redis_config]: Skipping because of 
failed dependencies
Notice: /Stage[main]/Redis::Config/File[/apps/redis]: Dependency 
Package[redis] has failures: true
Warning: /Stage[main]/Redis::Config/File[/apps/redis]: Skipping because of 
failed dependencies
Notice: /Stage[main]/Redis::Service/Service[redis]: Dependency 
Package[redis] has failures: true
Warning: /Stage[main]/Redis::Service/Service[redis]: Skipping because of 
failed dependencies
Notice: /Stage[main]/Os::Repo::Misc/File[sp-misc.mirrors.list]/ensure: 
defined content as '{md5}09676e55c31e92aa2090199f5b06423a'
Info: create new repo misc in file /etc/yum.repos.d/misc.repo
Notice: /Stage[main]/Os::Repo::Misc/Yumrepo[misc]/mirrorlist: mirrorlist 
changed '' to 'file:///etc/yum.repos.d/sp-misc.mirrors.list'
Notice: /Stage[main]/Os::Repo::Misc/Yumrepo[misc]/enabled: enabled changed 
'' to '1'
Notice: /Stage[main]/Os::Repo::Misc/Yumrepo[misc]/gpgcheck: gpgcheck 
changed '' to '0'
Info: changing mode of /etc/yum.repos.d/misc.repo from 600 to 644
Notice: Finished catalog run in 3.07 seconds


Of course, since the repo is deployed, it will work on second puppet run.

There are no internal dependencies between redis and os::repo::misc. I've 
had the same problem recently with other repositories.

This: Yumrepo['misc'] - Class['redis'] also doesn't work.

Here's the os::repo::misc

class os::repo::misc {
  file { 'sp-misc.mirrors.list':
ensure = present,
source = 'puppet:///modules/os/repo/sp-misc.mirrors.list',
mode   = 0644,
path   = '/etc/yum.repos.d/sp-misc.mirrors.list',
  }

  yumrepo { 'misc':
name   = 'misc',
mirrorlist = 'file:///etc/yum.repos.d/sp-misc.mirrors.list',
enabled= 1,
gpgcheck   = 0,
require= File['sp-misc.mirrors.list'],
  }
}

Redis module is more complicated (I cloned this: 
https://github.com/electrical/puppet-redis), but I've had the same problem 
with other modules, completely unrelated to one another, so it doesn't seem 
like there's any pattern there, other than repo + something just doesn't 
work.

Any thoughts? Could this be a bug, or am I doing something wrong?


Regards,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Deploy config file for custom reports

2013-07-03 Thread Daniel Scott
Hi,

I've written a custom report which just makes an HTTP call to one of my 
servers so that I can log the event.

The report installs itself when the puppetmaster puppets itself. The report 
script is copied from $MODULE_NAME/lib/puppet/reports/callback.rb into the 
puppetmaster's /var/lib/puppet/lib/puppet/reports directory.

The problem is the config file. Is there a nice way for puppet to deploy 
this itself? We build puppetmasters automatically and it's annoying to have 
to copy the config file in each time. The puppetmaster has a heira file 
containing the necessary values, and I have a template and rule to put it 
in place:

file { callback_report_processor_config:
name = /etc/puppet/callback.yaml,
content = template(${module_name}/etc/puppet/callback.yaml.erb),
ensure = file,
owner = puppet,
group = puppet,
}

But this does not run early enough when the puppetmaster is puppeting 
itself. Is there a special location in the catalogue I can put the config 
file so that it is installed properly like the report script. I'm running 
puppet 2.7.

Thanks,

Dan

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] PostgreSQL module and createlang

2013-07-02 Thread Daniel Londero
Hi! Is there a way to run createlang when creating a database using 
PostgreSQL module? Or should I use an exec?

Thanks in advance
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] scope for templates that is called from a class that includes the class that calls the template.

2013-07-01 Thread Daniel Jung
hi,

trying to understand the scope for templates -- after reading 
http://docs.puppetlabs.com/guides/templating.html, got a question about the 
following,


class test::foo {

 file {
   snip


   content = template (footemplate.erb), 
 }

}


class test::foo2 {
  $var = blah, 
  class {'test::foo' : 
  } 
}

so the question is if footemplate.erb uses variable $var as @var, is there 
a need for me to pass it as a argument within class {'test::foo': var = 
$var ?   My interpretation of templating.html is that all the variables 
that are in scope of the called class would be passed/available in the 
template hence i would need to pass it as an argument. 

Can anyone shed some lights on this?

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Mcollective + ActiveMQ 5.8.0 - direct addressing problems

2013-05-30 Thread Daniel Siechniewicz
Hi,

I've decided to try the new shiny and installed ActiveMQ 5.8.0 (my own rpm 
for Centos 5). It seems that Mcollective (2.2.3 in this case) doesn't play 
nice with ActiveMQ 5.8.0. It causes problems with direct addressing. In 
fact, it mostly stops working, but occasionally, rarely, does go through. 
If I disable direct addressing or downgrade activemq, it all springs back 
to life. Indirect addressing is still OK, regardless of the version. I 
haven't gone as far as updating stomp gem, and I don't see anything in 
mcollective 2.2.4 to believe it would help if I upgraded. 

I will need to rebuild those servers soon, but while I still have logs 
(mcollective and activemq debug logs), does anyone want those, or some 
other info?


Regards,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: custom type and provider testing

2013-05-28 Thread Daniel Kerwin
Hi Corey,

you would basically test it like normal ruby code. Here's a example for a 
type test. You could check out one of my type tests 
here: https://gist.github.com/anonymous/5662336
Hope this helps!

Cheers,
Daniel


Am Dienstag, 28. Mai 2013 04:06:59 UTC+2 schrieb Corey Osman:

 Hi, 

 I am writing a custom native type/ provider and want to perform some rspec 
 testing but I can't seem to find any documentation on how to test native 
 types and providers.  Can someone point me in the right direction.   



 Corey

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Need a puppet manifest to initialize a puppetmaster

2013-03-22 Thread Daniel Schaefer
I found the answer to my search keyword question:
http://lmgtfy.com/?q=bootstrap+puppetmaster

The solutions range from bash scripts to puppet manifests that can be run 
by puppet apply. I hope this helps others.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Need a puppet manifest to initialize a puppetmaster

2013-03-21 Thread Daniel Schaefer
What I am looking for is something along the lines of this:

- Install fresh OS
- Install puppet and git
- Clone a git repo (remote or local) containing my puppetmaster 
configuration
- Run a puppet command (or commands) with a manifest from the repo to 
install and configure a puppetmaster
  - Basically, I'm asking for example manifests, classes, modules, and 
templates that will do this
  - Whenever a commit occurs, a hook will automatically update the 
puppetmaster config. This part is a nice to have, but is not necessary, as 
long as I have the ability to sync manually or via cron.


I wasn't really sure how to Google the answer to my question. I've seen a 
few incomplete examples of each, but not a combined solution. If anyone has 
a lmgtfy.com link or actual links to real examples, that would be greatly 
appreciated. Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Need a puppet manifest to initialize a puppetmaster

2013-03-21 Thread Daniel Schaefer
I guess I should also mention that I am using Ubuntu 12.04. Also, when I 
say run a puppet command, I'm referring to puppet apply

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Installing Operating systems

2013-02-04 Thread Daniel Pittman
Razor is still pretty experimental, so I wouldn't recommend it unless
you are comfortable with alpha software.

It does integrate with provisioning, in the sense that it will hand
off through a broker to Puppet (or Chef, or other tools), so it should
have a smooth transition between provisioning and configuration.

If you are interested there is a Razor mailing list,
puppet-ra...@googlegroups.com, where you would be welcome to join us.
We would love more feedback on if, and how, Razor helps solve your
problems - or how it falls short!

On Mon, Feb 4, 2013 at 10:32 AM, joe lava...@gmail.com wrote:
 There is also razor
 (https://puppetlabs.com/solutions/next-generation-provisioning/). It is only
 for provisioning (not assigning classes) and is the future of provisioning
 and puppet.


 On Monday, February 4, 2013 11:29:33 AM UTC-7, joe wrote:

 Puppet doesn't do OS provisioning itself. You'd need a separate system to
 do that part, then hand off to puppet after a minimal install has been
 completed.

 You can use a tool like Foreman (http://theforeman.org/). It will handle
 the provisioning of the systems and also integrates with puppet to assign
 classes and handle ssl certs.


 On Monday, February 4, 2013 4:28:53 AM UTC-7, Manish Singh wrote:

 Hello All,

 I am new to puppet and was trying to figure out whether puppet can handle
 the requirement I had.

 The requirement is to reinstall an OS (Windows, distributions of Linux)
 on slave machines before a job is executed. This is needed as we need a
 clean OS before executing the jobs on the nodes..

 Is there a way using puppet that I plugin a machine to the puppet
 network, I can install a OS of my choice on the node and then that node gets
 added as a puppet node for further job execution?

 -Manish


 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.





-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Terrible exported resources performance

2013-01-25 Thread Daniel
On Thursday, January 24, 2013 2:41:53 PM UTC, jcbollinger wrote:

 On Thursday, January 24, 2013 5:24:58 AM UTC-6, Daniel wrote:

 Seems that chaining exported resources might not be too efficient and 
 produces lots of data that could be the reason for puppetdb crashing.

 The culprits being these two lines in two manifest files:

 ./nsca/server.pp:  #File | tag == $get_tag | - Nagios_host | tag == 
 $get_tag |
 ./nrpe/server.pp:  #File | tag == $get_tag | - Nagios_host | tag == 
 $get_tag | 



 And there may be your combinatorial problem.  Supposing that the tags are 
 not specific to the exporting node, the numbers of Files and Nagios_hosts 
 increase linearly with the number of nodes, but the number of relationships 
 among them increases with the square of the number of nodes.

Do you in fact need the order of application constraints that the chaining 
 declared?  All of them?


I don't need all of them. The reason I added it was to fix problems with 
files not being created when puppet tried to realize services, etc., thus 
producing an incorrect nagios setup. It worked in my small environment and 
only gave me a pause after days of trying to figure out what the hell is 
going on in the larger one. 

Looks like I didn't understand implications of this configuration, but to 
be honest I haven't found much in terms of documentation on chaining 
exported resources, potential implications and problems. Now I know, so 
I've learnt something today :). 

One suggestion - I would have a WFT? moment a lot sooner if --summarize 
displayed a number of relationships generated by my crazy config. I don't 
know if it's possible/easy to implement, but may be worth having a look at.

Depending on what relationships you actually need, you have various options:

 1) If it doesn't actually matter whether Puppet syncs given Files before 
 or after it syncs any particular Nagios_host, then you never needed any 
 relationships at all, and simply removing the chaining as you did is the 
 best solution.

 
As stated above, I've added it after failures, so I do need some sort of 
relationships.


2) If specific Files must be synced before specific Nagios_hosts, then you 
 should express those relationships and not any others.  In particular, if 
 you only need relationships among Files and Nagios_hosts exported by the 
 same node, then you should declare the relationships on the exporting side 
 instead of on the collecting side.  (And if they always come in such pairs 
 then perhaps you should wrap then in a defined type and export that 
 instead).


That's the most likely approach I'm going to implement in the next 
iteration of this module. 


3) If you really need something along the lines that the chaining expressed 
 -- all Files with a given tag synced before all Nagios_hosts bearing that 
 tag -- then you can break the combinatorial problem by introducing an 
 artificial barrier resource for each tag:


I most likely don't need this, but will have it in mind for future 
experiments with exported resources.

Thanks for your comprehensive answer. 


Regards,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Terrible exported resources performance

2013-01-24 Thread Daniel
Seems that chaining exported resources might not be too efficient and 
produces lots of data that could be the reason for puppetdb crashing.

The culprits being these two lines in two manifest files:

./nsca/server.pp:  #File | tag == $get_tag | - Nagios_host | tag == 
$get_tag |
./nrpe/server.pp:  #File | tag == $get_tag | - Nagios_host | tag == 
$get_tag | 

replacing them with unchained:

File | tag == $get_tag |
Nagios_host | tag == $get_tag |

causes it to run even with 1GB for puppetdb (still a 16GB vm) in under 10 
mins, which is acceptable.

This is tracked under bug #18804

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/S-md_OBZEF8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



  1   2   3   4   5   6   7   >