Re: [Puppet Users] Need hide execution window on Windows Scheduled Tasks

2016-03-23 Thread Felix Frank

Hi,

if Puppet does not allow you to specify this preference, you could file 
it as a feature request.


https://tickets.puppetlabs.com/

The Windows devs at PL are quite crafty, you might get a patch faster 
than you think ;-)


Cheers,
Felix ( - throwing friends under the bus since 2013 )

On 03/15/2016 12:16 PM, Jesus Vte. Vila wrote:

Hi, I'm using Puppet Agent 1.3.5 on Windows Server 2008 and 2012.

When I create a Scheduled Task, it creates correctly but every time 
task is running, it shows the task screen. If the task is running 
every 5 minutes it's annoying.


I've observed Puppet Agent, create task and in the properties, in the 
part "Configure for" is selected "Windows Server 2003, Windows XP o 
Windows 2000"


If i change this for "Windows Vista or Windows 2008" the window of the 
running task is hidden :-) but when agent run again, it changes again 
to Windows 2003 


What can i do?

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/56F32A21.3020102%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Henrik Lindberg

On 23/03/16 21:04, Hunter Haugen wrote:

Given the resource you want to apply this pattern to, it can be turned
into a one-liner with a collector:

file { '/tmp/something':
   ensure => file,
}
File['/tmp/something'] ~> Service <| title == 'apache2' |>

This means that if there is a service with a title of apache2 EVER added
to the catalog, it'll be refreshed on file changes. If the service
doesn't exist, then the dependency does nothing.

Now, this isn't exactly what you asked since you wanted the variable
$services_to_notify and didn't say what you're going to do with it, but
I assume this is what you want? Because collectors are not parse-order
specific, you can't do variable assignments like $services_to_notify =
Service <| title == 'apache2' |> (because variables are evaluated in
parse order and collectors are not).

If you really want to make a function that searches the catalog and
returns references, it can be done with something like
`scope.catalog.resource('Service[apache2]')` inside the function I
believe, though that may not be the exact call.




That route will make you discover things that you cannot do. Functions 
are called in "evaluation order", and all defaults, collections, 
overrides have not yet been applied to resources at the point where a 
function is called.


IMO you will be better off by using collectors or rethink the design.

- henrik


--

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/msgid/puppet-users/56F307E2.2090903%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Henrik Lindberg

On 23/03/16 21:56, Matt Zagrabelny wrote:

On Wed, Mar 23, 2016 at 3:04 PM, Hunter Haugen  wrote:

Given the resource you want to apply this pattern to, it can be turned into
a one-liner with a collector:

file { '/tmp/something':
   ensure => file,
}
File['/tmp/something'] ~> Service <| title == 'apache2' |>


Can you combine the two steps?

file { '/tmp/something':
 ensure => file,
} ~> Service <| title == 'apache2' |>

or is that frowned upon, or just not possible?



That should work.

- henrik

--

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/msgid/puppet-users/56F30705.8090701%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Matt Zagrabelny
On Wed, Mar 23, 2016 at 3:04 PM, Hunter Haugen  wrote:
> Given the resource you want to apply this pattern to, it can be turned into
> a one-liner with a collector:
>
> file { '/tmp/something':
>   ensure => file,
> }
> File['/tmp/something'] ~> Service <| title == 'apache2' |>

Can you combine the two steps?

file { '/tmp/something':
ensure => file,
} ~> Service <| title == 'apache2' |>

or is that frowned upon, or just not possible?

-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/CAOLfK3WNnW8p09_Da88VcC5oPXMaKt4rV1R4QL3Verva8ap%2BNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Matt Zagrabelny
On Wed, Mar 23, 2016 at 3:04 PM, Hunter Haugen  wrote:
> Given the resource you want to apply this pattern to, it can be turned into
> a one-liner with a collector:
>
> file { '/tmp/something':
>   ensure => file,
> }
> File['/tmp/something'] ~> Service <| title == 'apache2' |>
>
> This means that if there is a service with a title of apache2 EVER added to
> the catalog, it'll be refreshed on file changes. If the service doesn't
> exist, then the dependency does nothing.
>
> Now, this isn't exactly what you asked since you wanted the variable
> $services_to_notify and didn't say what you're going to do with it, but I
> assume this is what you want? Because collectors are not parse-order
> specific, you can't do variable assignments like $services_to_notify =
> Service <| title == 'apache2' |> (because variables are evaluated in parse
> order and collectors are not).
>
> If you really want to make a function that searches the catalog and returns
> references, it can be done with something like
> `scope.catalog.resource('Service[apache2]')` inside the function I believe,
> though that may not be the exact call.

Thanks for the reply, Hunter. I'll dig in and report back if I've got issues.

Cheers!

-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/CAOLfK3XuVMK_xSWvCQ33qmR0Bywyo5xPaa6fJDannH%2BL5ymBZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Hunter Haugen
Given the resource you want to apply this pattern to, it can be turned into
a one-liner with a collector:

file { '/tmp/something':
  ensure => file,
}
File['/tmp/something'] ~> Service <| title == 'apache2' |>

This means that if there is a service with a title of apache2 EVER added to
the catalog, it'll be refreshed on file changes. If the service doesn't
exist, then the dependency does nothing.

Now, this isn't exactly what you asked since you wanted the variable
$services_to_notify and didn't say what you're going to do with it, but I
assume this is what you want? Because collectors are not parse-order
specific, you can't do variable assignments like $services_to_notify =
Service <| title == 'apache2' |> (because variables are evaluated in parse
order and collectors are not).

If you really want to make a function that searches the catalog and returns
references, it can be done with something like
`scope.catalog.resource('Service[apache2]')` inside the function I believe,
though that may not be the exact call.



-Hunter

On Wed, Mar 23, 2016 at 12:40 PM, Matt Zagrabelny 
wrote:

> Greetings Puppet Users,
>
> I have a chuck of code I'd like to centralize - you know DRY.
>
> I've looked into a custom function, but I'm uncertain how to get at
> the the puppet resources inside of ruby.
>
> Here is the verbatim copy of the chuck in a puppet manifest:
>
> if defined(Service['apache2']) {
> $services_to_notify = [
> Service['apache2'],
> ]
> }
> else {
> $services_to_notify = []
> }
>
> and here is some hand-wavy pseudocode:
>
> function return_service_array_if_defined($service) {
> if defined(Service[$service]) {
> return [
> Service[$service],
> ]
> }
> else {
> return []
> }
> }
>
> Any suggestions or ideas for implementation?
>
> Thanks!
>
> -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/CAOLfK3V6i82smoDO2kwOYJTiurqdD3O_bt%2BaR4RYUGMsqCPgSw%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/CAJaQvGDdEGF8mdSt2b8pxdX49YaY3vg9pnSgnHQJ4d%3D3dQXDxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: forge module metadata: dependencies

2016-03-23 Thread Anderson Mills
Hello Gabriel,

The ticket that you reference has a link on it to a pull request which was 
merged into Puppet 4.x.

https://github.com/puppetlabs/puppet/pull/3310

It is not intended that this will be fixed in Puppet 3.x.

As for deprecation, though it is a thorn in our side, removing support for 
slashes is not on a roadmap. We do recommend always using dashes starting 
with Puppet 4.0, though.

Anderson

On Tuesday, March 22, 2016 at 10:55:44 PM UTC-7, Gabriel Filion wrote:
>
> Hello, 
>
> recently, a user of a module I wrote reported a bug with dependencies. 
> after some discussions on the IRC channel, it turned out that there was 
> a bug in the 3.x series which is not scheduled to be fixed: 
>
> https://tickets.puppetlabs.com/browse/PUP-3121 
>
> It seems as though using user-module and user/module both work, and the 
> latter works around the puppet 3.x issue. 
>
> Now I'm wondering if using slashes to split user name from module name 
> in dependency specifications in the metadata.json file is a thing that 
> will stick around. or is it planned to be deprecated somewhat soon? 
>
> documentation still mentions using slashes is OK 
>
>
> https://docs.puppetlabs.com/puppet/latest/reference/modules_metadata.html#specifying-dependencies
>  
>
> and puppetlabs' modules seem to be doing this too. 
>
> it's a bit counterintuitive to specify module name with user-module and 
> then dependencies with user/module though. 
>
>

-- 
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/877b4009-ca11-43fc-a8c3-87852bba25d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] DRY duplicated manifest code

2016-03-23 Thread Matt Zagrabelny
Greetings Puppet Users,

I have a chuck of code I'd like to centralize - you know DRY.

I've looked into a custom function, but I'm uncertain how to get at
the the puppet resources inside of ruby.

Here is the verbatim copy of the chuck in a puppet manifest:

if defined(Service['apache2']) {
$services_to_notify = [
Service['apache2'],
]
}
else {
$services_to_notify = []
}

and here is some hand-wavy pseudocode:

function return_service_array_if_defined($service) {
if defined(Service[$service]) {
return [
Service[$service],
]
}
else {
return []
}
}

Any suggestions or ideas for implementation?

Thanks!

-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/CAOLfK3V6i82smoDO2kwOYJTiurqdD3O_bt%2BaR4RYUGMsqCPgSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Puppet Server 2.3.1 is now available

2016-03-23 Thread Joe Pinsonault
Puppet Server 2.3.1 is now available.
This is a bug-fix release that resolves a disruptive logging configuration 
issue.

SERVER-1215 - If its Logback service is configured to log to syslog, Puppet 
Server 2.3.0 fails to start. Puppet Server 2.3.1 fixes this regression, 
which did not affect prior versions of Puppet Server.

See the complete release notes for details about these changes:
https://docs.puppetlabs.com/puppetserver/2.3/release_notes.html

For a list of all changes in this release, check out the JIRA page:
https://tickets.puppetlabs.com/browse/SERVER/fixforversion/17402

-- 
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/22794011-96f6-4ad3-94a3-4eb95b7a9e56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Auth.conf alsways overwritten

2016-03-23 Thread eornely
Hello,

I'm trying to use the PE API to sign a server cert.

I know how to use /puppet-ca/v1/certificate_status but I have problems to 
allow a specific user to sign.

I generated certs that I use in my curl/nodejs API calls and I have to 
change the /etc/puppetlabs/puppetserver/conf.d/auth.conf. I changed :
{
"allow" : [
"pe-internal-dashboard"
],
"match-request" : {
"method" : [
"get",
"put",
"delete"
],
"path" : "/puppet-ca/v1/certificate_status",
"query-params" : {},
"type" : "path"
},
"name" : "puppetlabs certificate status",
"sort-order" : 500
}

To : 
{
"allow" : [
"pe-internal-dashboard", "sign_user"
],
"match-request" : {
"method" : [
"get",
"put",
"delete"
],
"path" : "/puppet-ca/v1/certificate_status",
"query-params" : {},
"type" : "path"
},
"name" : "puppetlabs certificate status",
"sort-order" : 500
}

The problem is that after a moment, it always come back to the previous 
value. I suppose the file is generated by PE but then where should I put 
the value sign_user so that he has access to the rule named "puppetlabs 
certificate status" ?

-- 
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/89b1b8c9-5033-47b9-805f-de2084c58c73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 4 on Debian Jessie amd64

2016-03-23 Thread Melissa Stone
On Wed, Mar 23, 2016 at 5:19 AM <4nu...@gmail.com> wrote:

> Hi!
>
> Yes they enabled according to the guide. I forgot to tell. sorry!
>
> With the policy i found out that i need the arm-packages. Thats because i
> want to run it on raspberry pi.
>
>  500 http://apt.puppetlabs.com/ jessie/PC1 *armhf* Packages
>  release o=Puppetlabs,a=jessie,n=jessie,l=Puppetlabs,c=PC1
>  origin apt.puppetlabs.com
>
> Do you know how to get this stuff via sources?
>
Ah, that's the issue then. We don't compile or provide sources for ARM,
unfortunately. For more information about that, check out
https://tickets.puppetlabs.com/browse/CPR-108. We also don't provide
sources for the puppet-agent package. You can see some discussion on that
at https://tickets.puppetlabs.com/browse/CPR-191.

We have made the automation we use to build the puppet-agent package open
source. The two repos you'll want for building puppet-agent are
https://github.com/puppetlabs/vanagon and
https://github.com/puppetlabs/puppet-agent.

I hope that helps!

>
> Thanks!
>
> On Wednesday, March 23, 2016 at 12:22:32 AM UTC+1, Melissa Stone wrote:
>
>> Hi Friedhelm,
>>
>> Have you enabled the PC1 repos?
>>
>> I can't tell what repos you have enabled or where you got the
>> puppetserver packages you're using, but you'll have to enable the PC1
>> jessie repo to access puppet-agent.
>>
>> https://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html has
>> a lot more information on that.
>>
>> As a summary, you'll want to run:
>>
>> wget http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb ; dpkg
>> -i puppetlabs-release-pc1-jessie.deb ; apt-get update
>>
>>
>> You can do a check to make sure you have the puppetlabs PC1 repo enabled
>> by running `apt-cache policy`. You'll get a bunch of output, but the piece
>> you want to make sure is there should be:
>>
>>  500 http://apt.puppetlabs.com/ jessie/PC1 amd64 Packages
>>  release o=Puppetlabs,a=jessie,n=jessie,l=Puppetlabs,c=PC1
>>  origin apt.puppetlabs.com
>>
>> Once you've verified you have the PC1 repo enabled, apt-get install
>> puppet-agent should just work.
>>
>> I hope that helps!
>>
> On Tue, Mar 22, 2016 at 3:52 PM <4nu...@gmail.com> wrote:
>>
> Hi!
>>>
>>> I have the same problem. But puppet-agent is not available.
>>>
>>> apt-get -y install puppetserver
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Some packages could not be installed. This may mean that you have
 requested an impossible situation or if you are using the unstable
 distribution that some required packages have not yet been created
 or been moved out of Incoming.
 The following information may help to resolve the situation:

 The following packages have unmet dependencies:
  puppetserver : Depends: puppet-agent (>= 1.4.0) but it is not
 installable
 E: Unable to correct problems, you have held broken packages.

 sudo apt-get -y install puppet-agent
>>> Reading package lists... Done
>>> Building dependency tree
>>> Reading state information... Done
>>> Package puppet-agent is not available, but is referred to by another
>>> package.
>>> This may mean that the package is missing, has been obsoleted, or
>>> is only available from another source
>>>
>>> *# uname -a*
>>> Linux puppet 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
>>>
>>> *cat /etc/os-release*
>>> PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
>>> NAME="Raspbian GNU/Linux"
>>> VERSION_ID="8"
>>> VERSION="8 (jessie)"
>>> ID=raspbian
>>> ID_LIKE=debian
>>> HOME_URL="http://www.raspbian.org/;
>>> SUPPORT_URL="http://www.raspbian.org/RaspbianForums;
>>> BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs;
>>>
>>>
>>> but here i find packages:
>>> http://apt.puppetlabs.com/pool/jessie/PC1/p/puppet-agent/
>>>
>>> does anybody know why i cant install them?
>>>
>>> Cheers,
>>> Friedhelm
>>>
>>> On Monday, July 27, 2015 at 7:17:17 PM UTC+2, Melissa Stone wrote:

 On Mon, Jul 27, 2015 at 2:43 AM, Richard Wales 
 wrote:
 > Hi folks,
 >
 > Apparently PC1 is available on Debian Jessie now. Unfortunately, I
 can't get
 > it to work. I've attached a vagrant file to facilitate reproduction
 (remove
 > the .txt extension that I had to add to upload it).
 >
 > Here are the relevant commands I am running (as per the docs at
 >
 https://docs.puppetlabs.com/puppet/latest/reference/install_linux.html
 ):
 >
 > # wget https://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb
 > # dpkg -i puppetlabs-release-pc1-jessie.deb
 > # apt-get update
 > # apt-get install puppetserver -y # This fails

 We have puppet-agent packages available for Debian Jessie, but not
 Puppet Server packages[1]. Those should be available with the next
 Puppet Server release. So, you can't yet run Debian Jessie as a
 master, but you can run it as an agent 

[Puppet Users] Wierd Puppet Master issue

2016-03-23 Thread Peter Berghold
Luckily this doesn't happen all  the time, but I've seen in twice now in
about a year's time on two different Puppet masters.  Here's some
background.

I have in a central location a "Grand Master" that serves only the "Remote
Masters" each located in a different data center.  On the remote masters is
a copy of the Puppet modules and site.pp as it exists on the Grand Master.
Also on each remote master is an RPM repository containing RPMs developed
in house as well as supporting RPMs for Puppet since nothing in production
can talk over the network to anything outside the data center with
exception of the remote master.

These two sets of data get updated during the normal Puppet agent run on
the remote master. Here is a sanitized version of the Puppet classes doing
the work:

file { '/data/repos':
source =>$repo_src,
backup => false,
source_permissions => use,
purge  => true,
recurse=> true,
ignore => '*/repodata/*',
force  => true,
}

file {'/data/puppet-modules':
   source => $src_uri,
backup => false,
purge  => true,
source_permissions => use,
recurse=> true,
force  => true
}

Here's where things get weird.  For the second time this has failed and the
transfer between the grand master and the remote master has hung in mid
session.  In this last case it wasn't until it started to process the RPM
tree that it hung.

Restarting the master process on the grand master did not help. However,
when I stopped the master process and manually started it in debug mode the
problem went away.  This just doesn't make sense to me.


Has anybody else observed this behavior and were you able to resolve 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/CAArvnv1GM3XT1gsQacWWiDT-ZEvxOZ%2BwKwYDJTrULEn3L7vOcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] look up hiera hash's subkey within yaml

2016-03-23 Thread Brett Swift
fact parsing was a problem with a template not the hiera code. 

The only way I get this working is if I do a lookup in a profile manifest 
of the main hash,  then reference that variable back in hiera. 

This seems wrong, and coupled,  and flakey,  which is why it's listed as a 
bad practice on the puppetlabs documentation. 

However,  apparently we did this another time trying to solve the same 
problem. 

In software, seeming to be forced into an anti-pattern twice would indicate 
there is a better design.   If anyone has any thoughts here - we want to 
hear it!   Either that or we need a different hiera function for this. 



On Tuesday, 22 March 2016 16:33:57 UTC-6, Brett Swift wrote:
>
> Well that's what I've been going off, but I haven't figured out the right 
> syntax. 
>
> I've tried escaping the nested single quotes.. no luck. 
>
> One strange thing right now is I can't even interpolate facts.
>
> ---
> test: "%{::hostname}" 
>
>  is failing on a lookup.  hmm. 
>
>
>
> On Tuesday, 22 March 2016 16:00:12 UTC-6, Carthik Sharma wrote:
>>
>> This might help:
>>
>> https://docs.puppetlabs.com/hiera/3.1/variables.html#interpolating-hash-or-array-elements
>>
>> Thanks.
>>
>> On Tue, Mar 22, 2016 at 2:14 PM, Brett Swift  wrote:
>>
>>> This is a bit nutty, but hopefully there's a way to do this.
>>>
>>> So far I have only been able to get the parent hash, not the nested one. 
>>>   
>>>
>>> The reason I don't want to do this in a manifest,  is because I'd like 
>>> to use pieces of this hash within hiera itself.
>>>
>>> This gist is what I'm trying to do: 
>>> https://gist.github.com/brettswift/560af53d379e0d86730c
>>>
>>> pasted here: 
>>> group_allocation:
>>> devcoreoeml030.matrix.sjrb.ad: smokestack
>>> devcorebrml030.matrix.sjrb.ad: smokestack
>>> devcoreesbl030.matrix.sjrb.ad: smokestack
>>> devcoreoeml091.matrix.sjrb.ad: the091
>>> devcorebrml091.matrix.sjrb.ad: the091
>>> devcoreesbl091.matrix.sjrb.ad: the091
>>> devcorepptl003.matrix.sjrb.ad: dev_master
>>> tstcorepptl003.matrix.sjrb.ad: tst_master
>>> devcorepptl918.matrix.sjrb.ad: brett_sandbox
>>> devcorepptl919.matrix.sjrb.ad: brett_sandbox
>>> groups:
>>> core030:
>>> data:
>>> tag: smokestack
>>> owner: bcornies
>>> the091:
>>> data:
>>> tag: brettstack
>>> owner: bswift
>>> brett_sandbox:
>>> data:
>>> tag: brett
>>> owner: bswift
>>> my_group_name: "%{hiera('group_allocation')}.%{::fqdn}"
>>> my_group: "%{hiera('groups[%{hiera('my_group_name')}]')}"
>>> #my_tag: ... 
>>>
>>>
>>> My goal is to find access to the tag, owner, etc.   This is a bit nutty 
>>> as it's kind of relational data in hieradata, but we're hoping we can do 
>>> this.
>>>
>>> Right now the two lookups at the bottom do not work.   I can get the top 
>>> level lookup, but beyond that - it's not working.  Has someone done this? I 
>>> can only seem to find examples to compare with this being done in a 
>>> manifest file, not in a yaml file. 
>>>
>>> -- 
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/0695140c-1d59-4708-9e35-f6020bcf3345%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/56954e39-0130-4f58-9164-5b38b73347e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Henrik Lindberg

On 23/03/16 12:37, Martin Alfke wrote:


On 23 Mar 2016, at 12:23, Henrik Lindberg  
wrote:


On 23/03/16 11:24, Martin Alfke wrote:


On 22 Mar 2016, at 22:53, Carthik Sharma  wrote:


To answer the question in the subject, you're correct, as documented here for 
Puppet 3.8

https://docs.puppetlabs.com/puppet/3.8/reference/environments_classic.html#allowed-names


Is this only for Puppet 3.8 or is this also valid for Puppet 4.x?



Only versions < 4 has those restriction.

 From 4.0.0 the name "environment" should not be used as the actual name of an 
environment.


should not or must not?



The consequences of using it is not known, so: Must not.

- henrik


-Martin




--

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/msgid/puppet-users/56F28EA2.2020503%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 4 on Debian Jessie amd64

2016-03-23 Thread 4null4
Hi!

Yes they enabled according to the guide. I forgot to tell. sorry!

With the policy i found out that i need the arm-packages. Thats because i 
want to run it on raspberry pi.

 500 http://apt.puppetlabs.com/ jessie/PC1 *armhf* Packages
 release o=Puppetlabs,a=jessie,n=jessie,l=Puppetlabs,c=PC1
 origin apt.puppetlabs.com

Do you know how to get this stuff via sources?

Thanks!

On Wednesday, March 23, 2016 at 12:22:32 AM UTC+1, Melissa Stone wrote:
>
> Hi Friedhelm,
>
> Have you enabled the PC1 repos?
>
> I can't tell what repos you have enabled or where you got the puppetserver 
> packages you're using, but you'll have to enable the PC1 jessie repo to 
> access puppet-agent.
>
> https://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html has 
> a lot more information on that.
>
> As a summary, you'll want to run:
>
> wget http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb ; dpkg 
> -i puppetlabs-release-pc1-jessie.deb ; apt-get update
>
>
> You can do a check to make sure you have the puppetlabs PC1 repo enabled 
> by running `apt-cache policy`. You'll get a bunch of output, but the piece 
> you want to make sure is there should be:
>
>  500 http://apt.puppetlabs.com/ jessie/PC1 amd64 Packages
>  release o=Puppetlabs,a=jessie,n=jessie,l=Puppetlabs,c=PC1
>  origin apt.puppetlabs.com
>
> Once you've verified you have the PC1 repo enabled, apt-get install 
> puppet-agent should just work.
>
> I hope that helps!
>
> On Tue, Mar 22, 2016 at 3:52 PM <4nu...@gmail.com > wrote:
>
>> Hi!
>>
>> I have the same problem. But puppet-agent is not available.
>>
>> apt-get -y install puppetserver
>>> Reading package lists... Done
>>> Building dependency tree   
>>> Reading state information... Done
>>> Some packages could not be installed. This may mean that you have
>>> requested an impossible situation or if you are using the unstable
>>> distribution that some required packages have not yet been created
>>> or been moved out of Incoming.
>>> The following information may help to resolve the situation:
>>>
>>> The following packages have unmet dependencies:
>>>  puppetserver : Depends: puppet-agent (>= 1.4.0) but it is not 
>>> installable
>>> E: Unable to correct problems, you have held broken packages.
>>>
>>> sudo apt-get -y install puppet-agent
>> Reading package lists... Done
>> Building dependency tree   
>> Reading state information... Done
>> Package puppet-agent is not available, but is referred to by another 
>> package.
>> This may mean that the package is missing, has been obsoleted, or
>> is only available from another source
>>
>> *# uname -a*
>> Linux puppet 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
>>
>> *cat /etc/os-release*
>> PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
>> NAME="Raspbian GNU/Linux"
>> VERSION_ID="8"
>> VERSION="8 (jessie)"
>> ID=raspbian
>> ID_LIKE=debian
>> HOME_URL="http://www.raspbian.org/;
>> SUPPORT_URL="http://www.raspbian.org/RaspbianForums;
>> BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs;
>>
>>
>> but here i find packages: 
>> http://apt.puppetlabs.com/pool/jessie/PC1/p/puppet-agent/
>>
>> does anybody know why i cant install them?
>>
>> Cheers, 
>> Friedhelm
>>
>> On Monday, July 27, 2015 at 7:17:17 PM UTC+2, Melissa Stone wrote:
>>>
>>> On Mon, Jul 27, 2015 at 2:43 AM, Richard Wales  
>>> wrote: 
>>> > Hi folks, 
>>> > 
>>> > Apparently PC1 is available on Debian Jessie now. Unfortunately, I 
>>> can't get 
>>> > it to work. I've attached a vagrant file to facilitate reproduction 
>>> (remove 
>>> > the .txt extension that I had to add to upload it). 
>>> > 
>>> > Here are the relevant commands I am running (as per the docs at 
>>> > https://docs.puppetlabs.com/puppet/latest/reference/install_linux.html 
>>> ): 
>>> > 
>>> > # wget https://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb 
>>> > # dpkg -i puppetlabs-release-pc1-jessie.deb 
>>> > # apt-get update 
>>> > # apt-get install puppetserver -y # This fails 
>>>
>>> We have puppet-agent packages available for Debian Jessie, but not 
>>> Puppet Server packages[1]. Those should be available with the next 
>>> Puppet Server release. So, you can't yet run Debian Jessie as a 
>>> master, but you can run it as an agent with the puppet-agent package 
>>> against a master on a different platform. 
>>>
>>> [1] - http://apt.puppetlabs.com/pool/jessie/PC1/p/ 
>>> > 
>>> > The bottom line is the new packages aren't available; only the old 
>>> (puppet 
>>> > 3.7.x packages). Can anyone shed any light? Where am I going wrong 
>>> guys? 
>>> > 
>>> > Cheers, 
>>> > Richard 
>>> > 
>>> > P.S. Here are some diagnostic commands for the curious: 
>>> > 
>>> > # apt-cache search puppet | grep ^puppet 
>>> > 
>>> > ==> default: puppet - configuration management system, agent 
>>> > 
>>> > ==> default: puppet-common - configuration management system 
>>> > 
>>> > ==> default: puppet-el - syntax highlighting for puppet manifests in 
>>> emacs 

Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Martin Alfke

On 23 Mar 2016, at 12:23, Henrik Lindberg  
wrote:

> On 23/03/16 11:24, Martin Alfke wrote:
>> 
>> On 22 Mar 2016, at 22:53, Carthik Sharma  wrote:
>> 
>>> To answer the question in the subject, you're correct, as documented here 
>>> for Puppet 3.8
>>> 
>>> https://docs.puppetlabs.com/puppet/3.8/reference/environments_classic.html#allowed-names
>> 
>> Is this only for Puppet 3.8 or is this also valid for Puppet 4.x?
>> 
> 
> Only versions < 4 has those restriction.
> 
> From 4.0.0 the name "environment" should not be used as the actual name of an 
> environment.

should not or must not?

-Martin

-- 
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/BFD3351D-E707-4E13-8E52-6EED8B0E3730%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Henrik Lindberg

On 23/03/16 11:24, Martin Alfke wrote:


On 22 Mar 2016, at 22:53, Carthik Sharma  wrote:


To answer the question in the subject, you're correct, as documented here for 
Puppet 3.8

https://docs.puppetlabs.com/puppet/3.8/reference/environments_classic.html#allowed-names


Is this only for Puppet 3.8 or is this also valid for Puppet 4.x?



Only versions < 4 has those restriction.

From 4.0.0 the name "environment" should not be used as the actual name 
of an environment.


- henrik







On Tue, Mar 22, 2016 at 1:41 AM, 'Robert Heinzmann' via Puppet Users 
 wrote:
Hello,

I'm using PuppetServer 1.1.3 and want to use directory environments (I can not 
update to puppet 4 because of http://projects.theforeman.org/issues/8447, 
Foreman is used for reporting and facts only (CMDB like)).

The main puppet repo has 2 branches:
• master (production)
• development (test)
I use r10k to manage the environments under /etc/puppet/environments

--- o<
:sources:
   example:
 basedir: /etc/puppet/environments
 prefix: false
 remote: 
--- o<

The following master setup has worked for both "master" and "development"

 o<  
# file /etc/puppet/puppet.conf
[master]

 # insecure not via server_facts ...
 environment = ...
 # PuppetDB Enabled
 storeconfigs = true
 storeconfigs_backend = ...
 reports = ...

 # Hiera Config File
 hiera_config = ...
 default_manifest = /etc/puppet/environments/$environment/manifests/site.pp
 manifestdir = /etc/puppet/environments/$environment/manifests
 manifest = /etc/puppet/environments/$environment/manifests/site.pp
 modulepath = 
/etc/puppet/modules:/etc/puppet/environments/$environment/modules:/etc/puppet/environments/$environment/forge:/etc/puppet/environments/$environment/3rdparty
 # ENC Enabled
 node_terminus = exec
 external_nodes = ...
 ## see 
https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#serverfacts-variable
 trusted_server_facts = true
 trusted_node_data = true
 ## Make sure master uses another directory so master can be agent of 
someone else
 ssldir = ...
 certname = ...
 server = ...

 ## Add extra DNS Names
 dns_alt_names = ...
 o<  

Now I want to switch to directory environments changed configuration as follows:

Puppet master config is as follows:

 o<  
# file /etc/puppet/puppet.conf
[master]

 environment = ...
 # PuppetDB Enabled
 storeconfigs = true
 storeconfigs_backend = ...
 reports = ...

 # Hiera Config File
 hiera_config = ...
 ## Directory Environments enabled
 default_manifest = /etc/puppet/manifests/site.pp
 environmentpath = /etc/puppet/environments
 environment_timeout = 0
 basemodulepath = /etc/puppet/modules
 disable_per_environment_manifest = false
 # ENC Enabled
 node_terminus = exec
 external_nodes = ...
 ## see 
https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#serverfacts-variable
 trusted_server_facts = true
 trusted_node_data = true
 ## Make sure master uses another directory so master can be agent of 
someone else
 ssldir = ...
 certname = ...
 server = ...

 ## Add extra DNS Names
 dns_alt_names = ...
 o<  

The environment.conf is

 o<  
# file /etc/puppet/environments/master/environment.conf and
# file /etc/puppet/environments/development/environment.conf
## See 
https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html

# The module path
modulepath = ./modules/:./forge/:./3rdparty/:$basemodulepath

# Manifest
manifest = manifests/site.pp

# current or future (3.8 only)
# parser = current

## Path to custom script
# config_version=

## Timeout for cache
environment_timeout = unlimited
 o<  

This setup works for environment "development" but not "master".

agent shell# puppet agent --onetime --test --environment master => Fail with 404
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class my_webserver for webserver-test1 on node webserver-test1

agent shell# puppet agent --onetime --test --environment development => OK

If I do "mv /etc/puppet/environments/master /etc/puppet/environments/mytest123" 
and restart the puppetserver mytest123 environment works

agent shell# puppet agent --onetime --test --environment mytest123 => OK

If I do "mv /etc/puppet/environments/mytest123 /etc/puppet/environments/master" 
and restart the puppetserver master environment FAILES again

agent shell# puppet agent --onetime --test --environment master => Fail with 404
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class my_webserver for webserver-test1 on node webserver-test1

So it is not the repo content but the name of the environment causing the 
problem 

Re: [Puppet Users] Please Confirm: Puppet Directory Environments can not be named "master" ?

2016-03-23 Thread Martin Alfke

On 22 Mar 2016, at 22:53, Carthik Sharma  wrote:

> To answer the question in the subject, you're correct, as documented here for 
> Puppet 3.8
> 
> https://docs.puppetlabs.com/puppet/3.8/reference/environments_classic.html#allowed-names

Is this only for Puppet 3.8 or is this also valid for Puppet 4.x?


> 
> 
> 
> On Tue, Mar 22, 2016 at 1:41 AM, 'Robert Heinzmann' via Puppet Users 
>  wrote:
> Hello, 
> 
> I'm using PuppetServer 1.1.3 and want to use directory environments (I can 
> not update to puppet 4 because of http://projects.theforeman.org/issues/8447, 
> Foreman is used for reporting and facts only (CMDB like)).
> 
> The main puppet repo has 2 branches: 
>   • master (production)
>   • development (test)
> I use r10k to manage the environments under /etc/puppet/environments
> 
> --- o<
> :sources:
>   example:
> basedir: /etc/puppet/environments
> prefix: false
> remote: 
> --- o<
> 
> The following master setup has worked for both "master" and "development"
> 
>  o<  
> # file /etc/puppet/puppet.conf 
> [master]
> 
> # insecure not via server_facts ...
> environment = ...
> # PuppetDB Enabled
> storeconfigs = true
> storeconfigs_backend = ...
> reports = ...
> 
> # Hiera Config File
> hiera_config = ...
> default_manifest = /etc/puppet/environments/$environment/manifests/site.pp
> manifestdir = /etc/puppet/environments/$environment/manifests
> manifest = /etc/puppet/environments/$environment/manifests/site.pp
> modulepath = 
> /etc/puppet/modules:/etc/puppet/environments/$environment/modules:/etc/puppet/environments/$environment/forge:/etc/puppet/environments/$environment/3rdparty
> # ENC Enabled
> node_terminus = exec
> external_nodes = ...
> ## see 
> https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#serverfacts-variable
> trusted_server_facts = true
> trusted_node_data = true
> ## Make sure master uses another directory so master can be agent of 
> someone else
> ssldir = ...
> certname = ...
> server = ...
> 
> ## Add extra DNS Names
> dns_alt_names = ...
>  o<  
> 
> Now I want to switch to directory environments changed configuration as 
> follows:
> 
> Puppet master config is as follows: 
> 
>  o<  
> # file /etc/puppet/puppet.conf 
> [master]
> 
> environment = ...
> # PuppetDB Enabled
> storeconfigs = true
> storeconfigs_backend = ...
> reports = ...
> 
> # Hiera Config File
> hiera_config = ...
> ## Directory Environments enabled
> default_manifest = /etc/puppet/manifests/site.pp
> environmentpath = /etc/puppet/environments
> environment_timeout = 0
> basemodulepath = /etc/puppet/modules
> disable_per_environment_manifest = false
> # ENC Enabled
> node_terminus = exec
> external_nodes = ...
> ## see 
> https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#serverfacts-variable
> trusted_server_facts = true
> trusted_node_data = true
> ## Make sure master uses another directory so master can be agent of 
> someone else
> ssldir = ...
> certname = ...
> server = ...
> 
> ## Add extra DNS Names
> dns_alt_names = ...
>  o<  
> 
> The environment.conf is 
> 
>  o<  
> # file /etc/puppet/environments/master/environment.conf and
> # file /etc/puppet/environments/development/environment.conf
> ## See 
> https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html
> 
> # The module path
> modulepath = ./modules/:./forge/:./3rdparty/:$basemodulepath
> 
> # Manifest
> manifest = manifests/site.pp
> 
> # current or future (3.8 only)
> # parser = current
> 
> ## Path to custom script
> # config_version=
> 
> ## Timeout for cache
> environment_timeout = unlimited
>  o<  
> 
> This setup works for environment "development" but not "master".
> 
> agent shell# puppet agent --onetime --test --environment master => Fail with 
> 404
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class my_webserver for webserver-test1 on node webserver-test1
> 
> agent shell# puppet agent --onetime --test --environment development => OK
> 
> If I do "mv /etc/puppet/environments/master 
> /etc/puppet/environments/mytest123" and restart the puppetserver mytest123 
> environment works
> 
> agent shell# puppet agent --onetime --test --environment mytest123 => OK
> 
> If I do "mv /etc/puppet/environments/mytest123 
> /etc/puppet/environments/master" and restart the puppetserver master 
> environment FAILES again
> 
> agent shell# puppet agent --onetime --test --environment master => Fail with 
> 404
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class my_webserver for webserver-test1 on node webserver-test1
> 
> So it is not