[Puppet Users] Hiera question

2016-06-30 Thread Alex Samad
Hi

I have in my common.yaml

---
classes: 
  - ssh



How do I say if the OS is linux then add that class ?

Thanks
Alex

-- 
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/dec0f7bf-b7cc-4f5e-8d90-3e49c4759e56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: BROKEN PUPPETDB

2016-06-30 Thread Virat
var/log/puppetlabs/puppetdb/puppetdb.log


2016-06-30 17:13:54,355 INFO  [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT
2016-06-30 17:13:54,448 INFO  [o.e.j.s.h.ContextHandler] Started 
o.e.j.s.h.ContextHandler@1818e640{/metrics,null,AVAILABLE}
2016-06-30 17:13:54,448 INFO  [o.e.j.s.h.ContextHandler] Started 
o.e.j.s.h.ContextHandler@764fa2b{/pdb,null,AVAILABLE}
2016-06-30 17:13:54,476 INFO  [o.e.j.s.ServerConnector] Started 
ServerConnector@3190dd7d{HTTP/1.1}{localhost:8080}
2016-06-30 17:13:54,559 INFO  [o.e.j.s.ServerConnector] Started 
ServerConnector@ec72d9d{SSL-HTTP/1.1}{0.0.0.0:8081}
2016-06-30 17:13:54,559 INFO  [o.e.j.s.Server] Started @35894ms
2016-06-30 17:13:54,563 INFO  [p.t.s.s.status-service] Registering status 
callback function for status-service service
2016-06-30 17:13:54,563 INFO  [p.t.s.s.status-service] Registering status 
service HTTP API at /status
2016-06-30 17:13:54,579 INFO  [o.e.j.s.h.ContextHandler] Started 
o.e.j.s.h.ContextHandler@3117fc4a{/status,null,AVAILABLE}
2016-06-30 17:13:54,580 INFO  [p.p.dashboard] Redirecting / to the PuppetDB 
dashboard
2016-06-30 17:13:54,583 INFO  [o.e.j.s.h.ContextHandler] Started 
o.e.j.s.h.ContextHandler@22f9954d{/,null,AVAILABLE}
2016-06-30 17:13:54,599 INFO  [c.z.h.HikariDataSource] PDBWritePool - is 
starting.
2016-06-30 17:13:54,627 INFO  [c.z.h.HikariDataSource] PDBReadPool - is 
starting.
2016-06-30 17:13:54,630 INFO  [p.p.c.services] PuppetDB version 4.1.2
2016-06-30 17:13:54,631 INFO  [c.z.h.HikariDataSource] PDBMigrationsPool - 
is starting.
2016-06-30 17:13:54,781 ERROR [p.p.s.storage] 
*
* PostgreSQL DB versions older than 9.4 are no longer supported.  Please 
upgrade Postgres and restart PuppetDB.
*

2016-06-30 17:13:54,856 INFO  [p.t.internal] Shutting down due to JVM 
shutdown hook.
2016-06-30 17:13:54,873 INFO  [p.t.internal] Beginning shutdown sequence
2016-06-30 17:14:25,081 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:14:35,223 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:14:35,239 WARN  [o.e.j.h.HttpParser] badMessage: 
java.lang.IllegalStateException: too much data after closed for 
HttpChannelOverHttp@2858fdef{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:14:35,525 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:26:03,970 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:26:14,264 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:26:14,269 WARN  [o.e.j.h.HttpParser] badMessage: 
java.lang.IllegalStateException: too much data after closed for 
HttpChannelOverHttp@2ccb809{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:26:14,620 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:33:08,545 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:33:14,898 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:33:17,978 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:33:18,361 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:52:04,005 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:52:13,959 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:58:57,482 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:59:07,073 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode
2016-06-30 17:59:07,076 WARN  [o.e.j.h.HttpParser] badMessage: 
java.lang.IllegalStateException: too much data after closed for 
HttpChannelOverHttp@53a9e726{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:59:07,333 INFO  [p.p.pdb-routing] HTTP request received while 
in maintenance mode

-- 
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/10f0d695-3284-4fa1-bf74-70048d7f27b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Installing PuppetDB on Debian 8 with Puppet 3.7

2016-06-30 Thread Melissa Stone
On Thu, Jun 30, 2016 at 1:56 PM John Naggets 
wrote:

> Hi Melissa,
>
> So do I understand you correctly here: there is no way that I can run
> PuppetDB on a Debian 8 server using the official Debian Puppet version 3.7
> package?
>
You can run it with the wheezy package like Wyatt suggests, it should still
work. It's just not the best way to run puppet on jessie. And you'll be
running old code that probably has bugs and/or security issues. If you can
switch over to puppetserver, puppet-agent, and puppetdb from the official
puppetlabs repo, I'd strongly suggest that. You'll be able to access the
latest packages for all three packages whenever we make new releases
available.

>
> Regards
> John
>
> On Thursday, June 30, 2016 at 7:28:34 PM UTC+2, Melissa Stone wrote:
>>
>>
>>
>> On Thu, Jun 30, 2016 at 9:12 AM Wyatt Alt  wrote:
>>
>>>
>>>
>>>
>>> On 06/29/2016 10:30 PM, John Naggets wrote:
>>> > Hi Wyatt,
>>> >
>>> > Any ideas where I can find PuppetDB v2.x? In the APT repository of
>>> > PuppetLabs the oldest I can find is version 3.2.
>>> Those are in the non-PC1 repos at apt.puppetlabs.com, but is no 2.3.x
>>> package for Jessie there. The wheezy ones appear to work on jessie but I
>>> haven't tested it thoroughly.
>>>
>> I wouldn't recommend running Wheezy packages on Jessie.  SystemD was
>> introduced in Debian 8, and I believe last I heard there were some issues
>> with running sysv services in the systemd environment. The Wheezy PDB
>> packages are configured to run services as sysv. That being said, I have
>> heard it does work for some people. Just know it's not recommended.
>>
>
>>> Wyatt
>>>
>>> --
>>> 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/6535d91b-d881-15ec-b36c-9ff93a35d6a4%40puppet.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> Melissa Stone
>> Release Engineer, Puppet Labs
>> --
>>
>> PuppetConf 2016 , October 17-21, San Diego,
>> California
>> *Early Birds save $350*
>> 
>>  -
>> Register by June 30th
>>
> --
> 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/21f2e831-1152-48cf-9574-e735bffe9d7f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Melissa Stone
Release Engineer, Puppet Labs
--

PuppetConf 2016 , October 17-21, San Diego,
California
*Early Birds save $350*

-
Register by June 30th

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


Re: [Puppet Users] BROKEN PUPPETDB

2016-06-30 Thread Wyatt Alt

Virat,

Please describe what is going wrong with puppetdb. If there is an error 
in the puppetdb log, share it in a gist.


Wyatt

On 06/30/2016 02:45 PM, Virat wrote:

Hello All,

I have configured opensource puppet master 4.5.2 & puppetdb 4.1.2. 
Then started connecting master and db servers as below.


puppet master
/etc/puppetlabs/puppet/puppet.conf
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
server = puppetmaster.com
dns_alt_names = puppetmaster.com, puppetmaster
reports = store,puppetdb
storeconfigs_backend = puppetdb
storeconfigs = true
environment_timeout = unlimited

[main]
certname = puppetmaster.com
server = puppetmaster.com
environment = production
runinterval = 1h
strict_variables = true
#pluginsync = true
#trusted

/etc/puppetlabs/puppet/puppetdb.conf
[main]
server_urls = https://puppetdb.com:8081

/etc/puppetlabs/puppet/routes.yaml
---
master:
  facts:
terminus: puppetdb
cache: yaml
/etc/puppetlabs/puppetdb/conf.d/jetty.ini
[jetty]
# IP address or hostname to listen for clear-text HTTP. To avoid 
resolution

# issues, IP addresses are recommended over hostnames.
# Default is `localhost`.
# host = 
host = puppetmaster ip

# Port to listen on for clear-text HTTP.
port = 8080

# The following are SSL specific settings. They can be configured
# automatically with the tool `puppetdb ssl-setup`, which is normally
# ran during package installation.

# IP address to listen on for HTTPS connections. Hostnames can also be 
used

# but are not recommended to avoid DNS resolution issues. To listen on all
# interfaces, use `0.0.0.0`.
ssl-host = 0.0.0.0

# The port to listen on for HTTPS connections
ssl-port = 8081

# Private key path
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem

# Public certificate path
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem

# Certificate authority path
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem

# Access logging configuration path. To turn off access logging
# comment out the line with `access-log-config=...`
access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml



Is there any wrong in configuration ?


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/3ef56b7f-4195-4df5-bf75-d072d675b148%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/1bccc831-3eb7-47a6-01ee-d2af98aa09d6%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] BROKEN PUPPETDB

2016-06-30 Thread Virat
Hello All,

I have configured opensource puppet master 4.5.2 & puppetdb 4.1.2. Then 
started connecting master and db servers as below.

puppet master
/etc/puppetlabs/puppet/puppet.conf
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
server = puppetmaster.com 
dns_alt_names = puppetmaster.com, puppetmaster
reports = store,puppetdb
storeconfigs_backend = puppetdb
storeconfigs = true
environment_timeout = unlimited

[main]
certname = puppetmaster.com
server = puppetmaster.com
environment = production
runinterval = 1h
strict_variables = true
#pluginsync = true
#trusted

/etc/puppetlabs/puppet/puppetdb.conf
[main]
server_urls = https://puppetdb.com:8081

/etc/puppetlabs/puppet/routes.yaml
---
master:
  facts:
terminus: puppetdb
cache: yaml
/etc/puppetlabs/puppetdb/conf.d/jetty.ini
[jetty]
# IP address or hostname to listen for clear-text HTTP. To avoid resolution
# issues, IP addresses are recommended over hostnames.
# Default is `localhost`.
# host = 
host = puppetmaster ip

# Port to listen on for clear-text HTTP.
port = 8080

# The following are SSL specific settings. They can be configured
# automatically with the tool `puppetdb ssl-setup`, which is normally
# ran during package installation.

# IP address to listen on for HTTPS connections. Hostnames can also be used
# but are not recommended to avoid DNS resolution issues. To listen on all
# interfaces, use `0.0.0.0`.
ssl-host = 0.0.0.0

# The port to listen on for HTTPS connections
ssl-port = 8081

# Private key path
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem

# Public certificate path
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem

# Certificate authority path
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem

# Access logging configuration path. To turn off access logging
# comment out the line with `access-log-config=...`
access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml


ERROR on AGENT

 /opt/puppetlabs/bin/puppet agent --test
Warning: Unable to fetch my node definition, but the agent run will 
continue:
Warning: Error 400 on SERVER: Could not retrieve facts for puppetagent.com: 
Failed to find facts from PuppetDB at puppetmaster.com:8140: Failed to 
execute '/pdb/query/v4/nodes/puppetagent.com/facts' on at least 1 of the 
following 'server_urls': https://:puppetdb.com:8081
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to execute 
'/pdb/cmd/v1?checksum=33498fqe6c08ba9b5of47o406cfba9ace2fd9e9=4=puppetagent.com=replace_facts'
 
on at least 1 of the following 'server_urls': https://puppetdb.com:8081
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run




Is there any wrong in configuration ? 


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/85fd884b-37c8-48fc-83ea-44290cf322f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] BROKEN PUPPETDB

2016-06-30 Thread Virat
Hello All,

I have configured opensource puppet master 4.5.2 & puppetdb 4.1.2. Then 
started connecting master and db servers as below.

puppet master
/etc/puppetlabs/puppet/puppet.conf
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
server = puppetmaster.com 
dns_alt_names = puppetmaster.com, puppetmaster
reports = store,puppetdb
storeconfigs_backend = puppetdb
storeconfigs = true
environment_timeout = unlimited

[main]
certname = puppetmaster.com
server = puppetmaster.com
environment = production
runinterval = 1h
strict_variables = true
#pluginsync = true
#trusted

/etc/puppetlabs/puppet/puppetdb.conf
[main]
server_urls = https://puppetdb.com:8081

/etc/puppetlabs/puppet/routes.yaml
---
master:
  facts:
terminus: puppetdb
cache: yaml
/etc/puppetlabs/puppetdb/conf.d/jetty.ini
[jetty]
# IP address or hostname to listen for clear-text HTTP. To avoid resolution
# issues, IP addresses are recommended over hostnames.
# Default is `localhost`.
# host = 
host = puppetmaster ip

# Port to listen on for clear-text HTTP.
port = 8080

# The following are SSL specific settings. They can be configured
# automatically with the tool `puppetdb ssl-setup`, which is normally
# ran during package installation.

# IP address to listen on for HTTPS connections. Hostnames can also be used
# but are not recommended to avoid DNS resolution issues. To listen on all
# interfaces, use `0.0.0.0`.
ssl-host = 0.0.0.0

# The port to listen on for HTTPS connections
ssl-port = 8081

# Private key path
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem

# Public certificate path
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem

# Certificate authority path
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem

# Access logging configuration path. To turn off access logging
# comment out the line with `access-log-config=...`
access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml



Is there any wrong in configuration ? 


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/3ef56b7f-4195-4df5-bf75-d072d675b148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Installing PuppetDB on Debian 8 with Puppet 3.7

2016-06-30 Thread John Naggets
Hi Melissa,

So do I understand you correctly here: there is no way that I can run 
PuppetDB on a Debian 8 server using the official Debian Puppet version 3.7 
package?

Regards
John

On Thursday, June 30, 2016 at 7:28:34 PM UTC+2, Melissa Stone wrote:
>
>
>
> On Thu, Jun 30, 2016 at 9:12 AM Wyatt Alt  
> wrote:
>
>>
>>
>>
>> On 06/29/2016 10:30 PM, John Naggets wrote:
>> > Hi Wyatt,
>> >
>> > Any ideas where I can find PuppetDB v2.x? In the APT repository of
>> > PuppetLabs the oldest I can find is version 3.2.
>> Those are in the non-PC1 repos at apt.puppetlabs.com, but is no 2.3.x
>> package for Jessie there. The wheezy ones appear to work on jessie but I
>> haven't tested it thoroughly.
>>
> I wouldn't recommend running Wheezy packages on Jessie.  SystemD was 
> introduced in Debian 8, and I believe last I heard there were some issues 
> with running sysv services in the systemd environment. The Wheezy PDB 
> packages are configured to run services as sysv. That being said, I have 
> heard it does work for some people. Just know it's not recommended.
>
>>
>> Wyatt
>>
>> --
>> 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/6535d91b-d881-15ec-b36c-9ff93a35d6a4%40puppet.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Melissa Stone
> Release Engineer, Puppet Labs
> --
>
> PuppetConf 2016 , October 17-21, San Diego, 
> California
> *Early Birds save $350* 
> 
>  - 
> Register by June 30th
>

-- 
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/21f2e831-1152-48cf-9574-e735bffe9d7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] R10k Post Recieve Hook Git/Github

2016-06-30 Thread Rob Nelson
I've written some articles on r10k, including setting up a webhook -
https://rnelson0.com/2015/05/03/configuring-an-r10k-webhook-on-your-puppet-master/
It's from 2015 so you should probably use newer versions of zack/r10k and
the r10k gem but it's otherwise the same as what I'm using to this day.


Rob Nelson
rnels...@gmail.com

On Thu, Jun 30, 2016 at 1:50 PM, broncosd183  wrote:

> Hello,
>
> I am currently using the open source version of puppet and am looking to
> automate the deployment of environments whenever a change is pushed to the
> control repo (containing the Puppetfile, etc). I am interested in finding
> the simplest solution possible and have come across some solutions like
> reaktor, and other custom hooks, though I haven't gotten any fully
> functioning. Is anyone able to share their setup / potential steps towards
> implementing such a hook? I am only running a single master as well.
>
> --
> 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/dca083c5-fc00-4719-b862-31a91481966d%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/CAC76iT_OAVi9UsnZbv9gp8nDwerVExCQq1w4NWxpcXO%2BqOqoQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] R10k Post Recieve Hook Git/Github

2016-06-30 Thread broncosd183
Hello,

I am currently using the open source version of puppet and am looking to 
automate the deployment of environments whenever a change is pushed to the 
control repo (containing the Puppetfile, etc). I am interested in finding 
the simplest solution possible and have come across some solutions like 
reaktor, and other custom hooks, though I haven't gotten any fully 
functioning. Is anyone able to share their setup / potential steps towards 
implementing such a hook? I am only running a single master as well. 

-- 
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/dca083c5-fc00-4719-b862-31a91481966d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Installing PuppetDB on Debian 8 with Puppet 3.7

2016-06-30 Thread Melissa Stone
On Thu, Jun 30, 2016 at 9:12 AM Wyatt Alt  wrote:

>
>
>
> On 06/29/2016 10:30 PM, John Naggets wrote:
> > Hi Wyatt,
> >
> > Any ideas where I can find PuppetDB v2.x? In the APT repository of
> > PuppetLabs the oldest I can find is version 3.2.
> Those are in the non-PC1 repos at apt.puppetlabs.com, but is no 2.3.x
> package for Jessie there. The wheezy ones appear to work on jessie but I
> haven't tested it thoroughly.
>
I wouldn't recommend running Wheezy packages on Jessie.  SystemD was
introduced in Debian 8, and I believe last I heard there were some issues
with running sysv services in the systemd environment. The Wheezy PDB
packages are configured to run services as sysv. That being said, I have
heard it does work for some people. Just know it's not recommended.

>
> Wyatt
>
> --
> 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/6535d91b-d881-15ec-b36c-9ff93a35d6a4%40puppet.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Melissa Stone
Release Engineer, Puppet Labs
--

PuppetConf 2016 , October 17-21, San Diego,
California
*Early Birds save $350*

-
Register by June 30th

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


Re: [Puppet Users] Installing PuppetDB on Debian 8 with Puppet 3.7

2016-06-30 Thread Wyatt Alt




On 06/29/2016 10:30 PM, John Naggets wrote:

Hi Wyatt,

Any ideas where I can find PuppetDB v2.x? In the APT repository of 
PuppetLabs the oldest I can find is version 3.2.
Those are in the non-PC1 repos at apt.puppetlabs.com, but is no 2.3.x 
package for Jessie there. The wheezy ones appear to work on jessie but I 
haven't tested it thoroughly.


Wyatt

--
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/6535d91b-d881-15ec-b36c-9ff93a35d6a4%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Question about custom exported resource

2016-06-30 Thread Bret Wortman
Nope. I'm good. This is working like a champ now.

Thanks, John!



*Bret Wortman*
http://wrapbuddies.co/


On Thu, Jun 30, 2016 at 9:05 AM, jcbollinger 
wrote:

>
>
> On Wednesday, June 29, 2016 at 8:57:51 AM UTC-5, Bret Wortman wrote:
>>
>> I like that, John. Titles are guaranteed to be unique or the catalog
>> won't compile, right? This is absolutely supposed to be a one-and-only-one
>> kind of thing, so using title makes much more sense.
>>
>
>
> Yes, all resource titles used in a single catalog-building run must be
> unique for their types(*) with respect to that catalog-building run --
> those of ordinary resources, those of virtual resources (even if not
> realized), those of exported resources declared (even if not collected),
> and those of other nodes' exported resources that are collected into the
> catalog.  A parallel uniqueness requirement applies to resource names,
> which are not always the same as their resources' titles.  A duplicate
> resource (type, title) or (type, name) will cause catalog compilation to
> fail.  If you want to be certain, however, then by all means write a test
> for that case.
>
> (*) Except for the Exec resource type.
>
>
> John
>
> --
> 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/x7DmiOtbrTY/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/abff9c5e-27c9-4f32-8bb2-6135046cdb17%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/CAN9oxgRFuMPHZmkKHWKc-TaTaxeyNY3to%3DV1FAKBXtfO8S6TLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet exec to test if pattern exist in file

2016-06-30 Thread Andrew Morgan
Thank you , my solution works, but will use yours as it is best practice.

On Thursday, 30 June 2016 06:49:09 UTC-4, Martin Alfke wrote:
>
> Hi Alonso, 
>
> On 29 Jun 2016, at 19:06, Andrew Morgan  
> wrote: 
>
> > Thank you very much for your prompt reply... 
> > 
> > Will this work?? 
> > 
> > class environment { 
> > 
> > exec{'oe_run': 
> > path=>'/usr/bin', 
> >  command => 'echo  PATH=\$PATH:/opt/logstash/bin >> 
> /etc/profile', 
> >   unless => "grep -qFx 'PATH=\$PATH:/opt/logstash/bin' 
> /etc/profile", 
> > } 
> > 
> as Peter already mentioned: 
> this is not a Puppet style approach on declaring your system state. 
> You do workflow based configuration. 
>
> It would be better to either use the file_line or augeas resource type. 
>
> With file_line you would do the following: 
>
> file_line { 'logstash path to profile’: 
>   ensure => present, 
>   path => ‘/etc/profile’, 
>   line  => ‘PATH=$PATH:/opt/logstash/bin’, 
> } 
>
> By using the file_line resource type you will make use of puppet built in 
> idempotency (checking whether a change is required - change only in case 
> that the actual state does not comply with desired state). 
> When using an exec resource type you are required to: 
> - verify behavior in case of errors and 
> - perform idempotency checks 
>
> Best, 
> Martin 
>
>
> > On Wednesday, 29 June 2016 12:38:35 UTC-4, Peter Kristolaitis wrote: 
> > First of all, I will say that this is probably a sledgehammer approach 
> to accomplishing your goal.  Many modern platforms have, in their default 
> /etc/profile, support for /etc/profile.d/ that works like a run-parts for 
> building the environment.  The Puppet Agent package installs its own $PATH 
> entry in this way on both CentOS and Ubuntu. So you're probably better 
> off managing a file in that location so that it gets auto-included by 
> /etc/profile. 
> > 
> > Secondly, your problem is variable interpolation.   Because you're using 
> double quotes around the command and onlyif statments, Puppet is 
> interpolating $PATH to be (probably) an empty string, rather than a literal 
> "$PATH".  You need to either change to single quotes (and then adjust the 
> quoting around your grep match string) or escape the $ with \$. 
> > 
> > Finally, if you were to use the above solution, it's still a bit of a 
> sledgehammer because you're not really modeling state.  The best solution 
> would actually be to use something like Augeas to examine the file and 
> modify as necessary.  "exec / onlyif" and "exec / unless" are kind of 
> measures-of-last-resort in the Puppet world (now, having said that, I must 
> admit that I'm completely guilty of using it myself on occasion  :p  ). 
> > 
> > 
> > On 2016-06-29 12:19 PM, Andrew Morgan wrote: 
> >> I want to check if pattern exist in a file and then if it doesn;t echo 
>  the pattern in the file. 
> >> 
> >> class environment { 
> >> 
> >> exec{'one_run': 
> >> path=>'/usr/bin', 
> >> command => "echo  'PATH=$PATH:/opt/logstash/bin' >> 
> /etc/profile", 
> >> onlyif => "grep -qFx 'PATH=$PATH:/opt/logstash/bin' 
> /etc/profile", 
> >> } 
> >> } 
> >> 
> >> The above doesn't work,can anyone help with this please? I want to 
> check if PATH=$PATH:/opt/logstash/bin' exists in /etc/profile and if not 
> input it only once. 
> >> -- 
> >> 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/1b36ab52-29ee-455f-8efb-8d647fbd6c9c%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...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/8d014b64-242d-4ef5-bc27-dfad20418c23%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/89694631-142f-46b8-af31-b9ab9bd7ce11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Question about custom exported resource

2016-06-30 Thread jcbollinger


On Wednesday, June 29, 2016 at 8:57:51 AM UTC-5, Bret Wortman wrote:
>
> I like that, John. Titles are guaranteed to be unique or the catalog won't 
> compile, right? This is absolutely supposed to be a one-and-only-one kind 
> of thing, so using title makes much more sense.
>


Yes, all resource titles used in a single catalog-building run must be 
unique for their types(*) with respect to that catalog-building run -- 
those of ordinary resources, those of virtual resources (even if not 
realized), those of exported resources declared (even if not collected), 
and those of other nodes' exported resources that are collected into the 
catalog.  A parallel uniqueness requirement applies to resource names, 
which are not always the same as their resources' titles.  A duplicate 
resource (type, title) or (type, name) will cause catalog compilation to 
fail.  If you want to be certain, however, then by all means write a test 
for that case.

(*) Except for the Exec resource type.


John

-- 
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/abff9c5e-27c9-4f32-8bb2-6135046cdb17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet exec to test if pattern exist in file

2016-06-30 Thread Martin Alfke
Hi Alonso,

On 29 Jun 2016, at 19:06, Andrew Morgan  wrote:

> Thank you very much for your prompt reply...
> 
> Will this work??
> 
> class environment {
> 
> exec{'oe_run':
> path=>'/usr/bin',
>  command => 'echo  PATH=\$PATH:/opt/logstash/bin >> 
> /etc/profile',
>   unless => "grep -qFx 'PATH=\$PATH:/opt/logstash/bin' 
> /etc/profile",
> }
> 
as Peter already mentioned:
this is not a Puppet style approach on declaring your system state.
You do workflow based configuration.

It would be better to either use the file_line or augeas resource type.

With file_line you would do the following:

file_line { 'logstash path to profile’:
  ensure => present,
  path => ‘/etc/profile’,
  line  => ‘PATH=$PATH:/opt/logstash/bin’,
}

By using the file_line resource type you will make use of puppet built in 
idempotency (checking whether a change is required - change only in case that 
the actual state does not comply with desired state).
When using an exec resource type you are required to:
- verify behavior in case of errors and
- perform idempotency checks

Best,
Martin


> On Wednesday, 29 June 2016 12:38:35 UTC-4, Peter Kristolaitis wrote:
> First of all, I will say that this is probably a sledgehammer approach to 
> accomplishing your goal.  Many modern platforms have, in their default 
> /etc/profile, support for /etc/profile.d/ that works like a run-parts for 
> building the environment.  The Puppet Agent package installs its own $PATH 
> entry in this way on both CentOS and Ubuntu. So you're probably better 
> off managing a file in that location so that it gets auto-included by 
> /etc/profile.
> 
> Secondly, your problem is variable interpolation.   Because you're using 
> double quotes around the command and onlyif statments, Puppet is 
> interpolating $PATH to be (probably) an empty string, rather than a literal 
> "$PATH".  You need to either change to single quotes (and then adjust the 
> quoting around your grep match string) or escape the $ with \$.
> 
> Finally, if you were to use the above solution, it's still a bit of a 
> sledgehammer because you're not really modeling state.  The best solution 
> would actually be to use something like Augeas to examine the file and modify 
> as necessary.  "exec / onlyif" and "exec / unless" are kind of 
> measures-of-last-resort in the Puppet world (now, having said that, I must 
> admit that I'm completely guilty of using it myself on occasion  :p  ).
> 
> 
> On 2016-06-29 12:19 PM, Andrew Morgan wrote:
>> I want to check if pattern exist in a file and then if it doesn;t echo  the 
>> pattern in the file.
>> 
>> class environment {
>> 
>> exec{'one_run':
>> path=>'/usr/bin',
>> command => "echo  'PATH=$PATH:/opt/logstash/bin' >> 
>> /etc/profile",
>> onlyif => "grep -qFx 'PATH=$PATH:/opt/logstash/bin' 
>> /etc/profile",
>> }
>> }
>> 
>> The above doesn't work,can anyone help with this please? I want to check if 
>> PATH=$PATH:/opt/logstash/bin' exists in /etc/profile and if not input it 
>> only once.
>> -- 
>> 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/1b36ab52-29ee-455f-8efb-8d647fbd6c9c%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/8d014b64-242d-4ef5-bc27-dfad20418c23%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/8A2D6E50-6E51-43EE-91D2-88C4255FB52D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Loading predefined docker image

2016-06-30 Thread Gareth Rushgrove
Hi

On 29 June 2016 at 03:51, Fuad P T  wrote:
> hi,
> I am using Puppet open source to configure my nodes. I want to configure my
> nodes as docker engines. I achieved this by this by using 'garathe-docker'
> module. But i am unable to load my predefined docker image to nodes. What i
> mean is, i am having 'image.tar' which was created by using 'docker save'
> command from another machine and copied to puppet master. I want to load
> 'image.tar' as my docker image. I tried to to extract the tar file. But not
> working. Please help.

You should be able to pass docker_tar to docker::image based on:

https://github.com/garethr/garethr-docker/blob/master/manifests/image.pp#L20

If that's what you're trying and it's not working then please do post
a gist of the code you're running and the error messages you're
seeing.

Thanks

Gareth

>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/5866416e-a31e-4b58-89ed-28445a81fe59%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.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/CAFi_6yLGa6qngDv%3D3Ru%2BHvUE8gBgadBv_dBCoUqrssnj7ikRKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.