[Puppet Users] Re: Custom Facts using awk

2017-03-22 Thread Michael Watters
You can do everything you need entirely in ruby.  For example, here's a 
custom fact that returns the number of screens reported by the X server.

Facter.add(:screen_count) do
confine :kernel => 'Linux'
setcode do
@screens = Facter::Core::Execution.exec("/usr/bin/xrandr -display 
:0").split("\n")
@screens.count { |x| x =~ /connected/ }
end
end

Note that this only counts screens currently in use by X which may not 
match the graphics card's total capabilities.  A second option would be to 
look at /sys/class/drm directly for any devices detected by the kernel. 
 For example:

Facter.add(:screen_count2) do
> confine :kernel => 'Linux'
> setcode "ls -d /sys/class/drm/*-DP-* | /usr/bin/wc -w"
> end

 


On Wednesday, March 22, 2017 at 6:25:10 PM UTC-4, Warron French wrote:
>
> Hello, I have finally learned how to write a Custom Fact; and duplicated 
> the syntax several times over inside the same .rb file.
>
> I am using syntax that looks like the following:
>
> Facter.add('qty_monitors_total') do
>   setcode  do
>  Facter::Util::Resolution.exec('/bin/grep " connected" 
> /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
>   end
> end
>
> I don't know of any other way to do this yet; but that's not my concern 
> yet.
>
> What I would like to know is how can I use an awk command within the 
> Facter::Util::Resolution.exec('.') line.
>
> I have a need to essentially reproduce the line above *but drop   wc -l 
> and add awk '{ print $2"_"$3"_on_"$1$4 }'*
>
> I need the awk command to pretty much look like this; the problem is awk 
> uses its own single quotes (') and it will break the ruby code.
>
> I am not a ruby developer; so if someone could either tell me:
>
>1. It's just not possible; or
>2. *do it this way*
>
>
> That would be greatly appreciated.  Thank you,
> --
> Warron French
>
>

-- 
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/8097a0bc-5709-45c8-a140-3a673b68dd31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Custom Facts using awk

2017-03-22 Thread warron.french
Thanks Rob.  I will try both approaches; for me there is more appeal in
simply using a shell script.

Peter, can I generate multiple key=value pairs inside the same shell
script?  I don't explicitly have to do it the way you presented with

key="key_name"
value="evaluated_expression"

echo "${key}=${value}" Do I?

Can I simple skip the key="key_name" part and just do the
expression_evaluation assigned to a variable and then echo them together?

Perhaps I can write shell functions and execute them all?

--
Warron French


On Wed, Mar 22, 2017 at 7:35 PM, Rob Nelson  wrote:

> That's probably one of the best ways to do this. But...
>
> You CAN use double quotes around a string. You will need to escape
> characters that will otherwise be interpolated like double quotes and
> dollar signs. I'm going off memory but I think `"awk '{print \$1_\$2}'"`
> should interpolate to `awk '{print $1_$2}'` properly. This is often tedious
> and may require some trial and error to ensure both the double quotes and
> the system call that uses it don't interpolate too much but it can work.
>
> On Wed, Mar 22, 2017 at 7:07 PM Peter Bukowinski  wrote:
>
>> Hi Warron,
>>
>> I'd consider using an external, executable fact to avoid ruby altogether.
>>
>>   https://docs.puppet.com/facter/3.6/custom_facts.html#
>> executable-facts-unix
>>
>> Basically, you can write a bash script (or use any language you want),
>> drop it into '//facts.d/' on your puppet server,
>> and it will be synced to all your nodes (assuming you use pluginsync).
>>
>> The only requirement for executable fact scripts is that they must
>> return key/value pairs in the format 'key=value'. Multiple keys/values
>> get their own line. In your case, you could do something like this:
>>
>> -
>> #!/bin/bash
>>
>> key="qty_monitors_total"
>> value=$(your parsing command for /var/log/Xorg.0.log here)
>>
>> echo "${key}=${value}"
>> -
>>
>> Save the file as an executable script in the above mentioned path and
>> it should be available on the next puppet run.
>>
>> On Wed, Mar 22, 2017 at 3:24 PM, warron.french 
>> wrote:
>> > Hello, I have finally learned how to write a Custom Fact; and
>> duplicated the
>> > syntax several times over inside the same .rb file.
>> >
>> > I am using syntax that looks like the following:
>> >
>> > Facter.add('qty_monitors_total') do
>> >   setcode  do
>> >  Facter::Util::Resolution.exec('/bin/grep " connected"
>> > /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
>> >   end
>> > end
>> >
>> > I don't know of any other way to do this yet; but that's not my concern
>> yet.
>> >
>> > What I would like to know is how can I use an awk command within the
>> > Facter::Util::Resolution.exec('.') line.
>> >
>> > I have a need to essentially reproduce the line above but drop   wc -l
>> and
>> > add awk '{ print $2"_"$3"_on_"$1$4 }'
>> >
>> > I need the awk command to pretty much look like this; the problem is awk
>> > uses its own single quotes (') and it will break the ruby code.
>> >
>> > I am not a ruby developer; so if someone could either tell me:
>> >
>> > It's just not possible; or
>> > do it this way
>> >
>> >
>> > That would be greatly appreciated.  Thank you,
>> >
>> > --
>> > Warron French
>> >
>> > --
>> > 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/CAJdJdQmZXQAd%2Bo%2Bnp-
>> NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%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/CAJA1CN9aFH4Eza-FoxzrfXDWiGCUHXE%2BGFt2Nu%
>> 3DjK2eDzV4upg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Rob Nelson
>
> --
> 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/CAC76iT8Sduj%2BL%3DR3hZfSqkqeUgp9eBsQLjuBWEMrW6
> L1xxpE0Q%40mail.gmail.com
> 
> .
>
> For more options, visit 

Re: [Puppet Users] Custom Facts using awk

2017-03-22 Thread warron.french
Oh wow!  That cool!  Thanks for the different method Peter!

--
Warron French


On Wed, Mar 22, 2017 at 7:07 PM, Peter Bukowinski  wrote:

> Hi Warron,
>
> I'd consider using an external, executable fact to avoid ruby altogether.
>
>   https://docs.puppet.com/facter/3.6/custom_facts.html#
> executable-facts-unix
>
> Basically, you can write a bash script (or use any language you want),
> drop it into '//facts.d/' on your puppet server,
> and it will be synced to all your nodes (assuming you use pluginsync).
>
> The only requirement for executable fact scripts is that they must
> return key/value pairs in the format 'key=value'. Multiple keys/values
> get their own line. In your case, you could do something like this:
>
> -
> #!/bin/bash
>
> key="qty_monitors_total"
> value=$(your parsing command for /var/log/Xorg.0.log here)
>
> echo "${key}=${value}"
> -
>
> Save the file as an executable script in the above mentioned path and
> it should be available on the next puppet run.
>
> On Wed, Mar 22, 2017 at 3:24 PM, warron.french 
> wrote:
> > Hello, I have finally learned how to write a Custom Fact; and duplicated
> the
> > syntax several times over inside the same .rb file.
> >
> > I am using syntax that looks like the following:
> >
> > Facter.add('qty_monitors_total') do
> >   setcode  do
> >  Facter::Util::Resolution.exec('/bin/grep " connected"
> > /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
> >   end
> > end
> >
> > I don't know of any other way to do this yet; but that's not my concern
> yet.
> >
> > What I would like to know is how can I use an awk command within the
> > Facter::Util::Resolution.exec('.') line.
> >
> > I have a need to essentially reproduce the line above but drop   wc -l
> and
> > add awk '{ print $2"_"$3"_on_"$1$4 }'
> >
> > I need the awk command to pretty much look like this; the problem is awk
> > uses its own single quotes (') and it will break the ruby code.
> >
> > I am not a ruby developer; so if someone could either tell me:
> >
> > It's just not possible; or
> > do it this way
> >
> >
> > That would be greatly appreciated.  Thank you,
> >
> > --
> > Warron French
> >
> > --
> > 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/CAJdJdQmZXQAd%2Bo%2Bnp-
> NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%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/CAJA1CN9aFH4Eza-FoxzrfXDWiGCUHXE%2BGFt2Nu%
> 3DjK2eDzV4upg%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/CAJdJdQ%3D60gM79ib694P9sNJJF4NbXy_4ZgwwwxXGvnTgS9PSPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Custom Facts using awk

2017-03-22 Thread Rob Nelson
That's probably one of the best ways to do this. But...

You CAN use double quotes around a string. You will need to escape
characters that will otherwise be interpolated like double quotes and
dollar signs. I'm going off memory but I think `"awk '{print \$1_\$2}'"`
should interpolate to `awk '{print $1_$2}'` properly. This is often tedious
and may require some trial and error to ensure both the double quotes and
the system call that uses it don't interpolate too much but it can work.

On Wed, Mar 22, 2017 at 7:07 PM Peter Bukowinski  wrote:

> Hi Warron,
>
> I'd consider using an external, executable fact to avoid ruby altogether.
>
>
> https://docs.puppet.com/facter/3.6/custom_facts.html#executable-facts-unix
>
> Basically, you can write a bash script (or use any language you want),
> drop it into '//facts.d/' on your puppet server,
> and it will be synced to all your nodes (assuming you use pluginsync).
>
> The only requirement for executable fact scripts is that they must
> return key/value pairs in the format 'key=value'. Multiple keys/values
> get their own line. In your case, you could do something like this:
>
> -
> #!/bin/bash
>
> key="qty_monitors_total"
> value=$(your parsing command for /var/log/Xorg.0.log here)
>
> echo "${key}=${value}"
> -
>
> Save the file as an executable script in the above mentioned path and
> it should be available on the next puppet run.
>
> On Wed, Mar 22, 2017 at 3:24 PM, warron.french 
> wrote:
> > Hello, I have finally learned how to write a Custom Fact; and duplicated
> the
> > syntax several times over inside the same .rb file.
> >
> > I am using syntax that looks like the following:
> >
> > Facter.add('qty_monitors_total') do
> >   setcode  do
> >  Facter::Util::Resolution.exec('/bin/grep " connected"
> > /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
> >   end
> > end
> >
> > I don't know of any other way to do this yet; but that's not my concern
> yet.
> >
> > What I would like to know is how can I use an awk command within the
> > Facter::Util::Resolution.exec('.') line.
> >
> > I have a need to essentially reproduce the line above but drop   wc -l
> and
> > add awk '{ print $2"_"$3"_on_"$1$4 }'
> >
> > I need the awk command to pretty much look like this; the problem is awk
> > uses its own single quotes (') and it will break the ruby code.
> >
> > I am not a ruby developer; so if someone could either tell me:
> >
> > It's just not possible; or
> > do it this way
> >
> >
> > That would be greatly appreciated.  Thank you,
> >
> > --
> > Warron French
> >
> > --
> > 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/CAJdJdQmZXQAd%2Bo%2Bnp-NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%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/CAJA1CN9aFH4Eza-FoxzrfXDWiGCUHXE%2BGFt2Nu%3DjK2eDzV4upg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Rob Nelson

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


Re: [Puppet Users] Custom Facts using awk

2017-03-22 Thread Peter Bukowinski
Hi Warron,

I'd consider using an external, executable fact to avoid ruby altogether.

  https://docs.puppet.com/facter/3.6/custom_facts.html#executable-facts-unix

Basically, you can write a bash script (or use any language you want),
drop it into '//facts.d/' on your puppet server,
and it will be synced to all your nodes (assuming you use pluginsync).

The only requirement for executable fact scripts is that they must
return key/value pairs in the format 'key=value'. Multiple keys/values
get their own line. In your case, you could do something like this:

-
#!/bin/bash

key="qty_monitors_total"
value=$(your parsing command for /var/log/Xorg.0.log here)

echo "${key}=${value}"
-

Save the file as an executable script in the above mentioned path and
it should be available on the next puppet run.

On Wed, Mar 22, 2017 at 3:24 PM, warron.french  wrote:
> Hello, I have finally learned how to write a Custom Fact; and duplicated the
> syntax several times over inside the same .rb file.
>
> I am using syntax that looks like the following:
>
> Facter.add('qty_monitors_total') do
>   setcode  do
>  Facter::Util::Resolution.exec('/bin/grep " connected"
> /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
>   end
> end
>
> I don't know of any other way to do this yet; but that's not my concern yet.
>
> What I would like to know is how can I use an awk command within the
> Facter::Util::Resolution.exec('.') line.
>
> I have a need to essentially reproduce the line above but drop   wc -l and
> add awk '{ print $2"_"$3"_on_"$1$4 }'
>
> I need the awk command to pretty much look like this; the problem is awk
> uses its own single quotes (') and it will break the ruby code.
>
> I am not a ruby developer; so if someone could either tell me:
>
> It's just not possible; or
> do it this way
>
>
> That would be greatly appreciated.  Thank you,
>
> --
> Warron French
>
> --
> 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/CAJdJdQmZXQAd%2Bo%2Bnp-NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%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/CAJA1CN9aFH4Eza-FoxzrfXDWiGCUHXE%2BGFt2Nu%3DjK2eDzV4upg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Custom Facts using awk

2017-03-22 Thread warron.french
Hello, I have finally learned how to write a Custom Fact; and duplicated
the syntax several times over inside the same .rb file.

I am using syntax that looks like the following:

Facter.add('qty_monitors_total') do
  setcode  do
 Facter::Util::Resolution.exec('/bin/grep " connected"
/var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
  end
end

I don't know of any other way to do this yet; but that's not my concern yet.

What I would like to know is how can I use an awk command within the
Facter::Util::Resolution.exec('.') line.

I have a need to essentially reproduce the line above *but drop   wc -l and
add awk '{ print $2"_"$3"_on_"$1$4 }'*

I need the awk command to pretty much look like this; the problem is awk
uses its own single quotes (') and it will break the ruby code.

I am not a ruby developer; so if someone could either tell me:

   1. It's just not possible; or
   2. *do it this way*


That would be greatly appreciated.  Thank you,
--
Warron French

-- 
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/CAJdJdQmZXQAd%2Bo%2Bnp-NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] how to pxe boot and preseed puppet-agent install in ubuntu from puppetlabs repo

2017-03-22 Thread Peter K
In my googling I did not find a simple recipe for how to install and run 
puppet for the first time (for a pxe / tftpboot / ubuntu / preseed / 
puppetlabs-repo scenario).

Here's what I tagged onto the bottom on my preseed.cfg script:

d-i preseed/late_command string in-target wget -O 
/home//puppetlabs-release-pc1-xenial.deb 
http://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb;\
in-target /usr/bin/dpkg -i 
/home//puppetlabs-release-pc1-xenial.deb;\
in-target /usr/bin/apt-get update;\
in-target /usr/bin/apt-get install -y --allow-unauthenticated 
puppet-agent;
#in-target /opt/puppetlabs/puppet/bin/puppet resource service 
puppet ensure=running enable=true; # this line wan't necessary because 
puppet joined the server and ran for the first time on first boot with no 
other configuration...if you have autosigning set up.

# This script assumes you have autosigning turned on by putting a single 
asterisk in this file on the puppet server: 
/etc/puppetlabs/puppet/autosign.conf

Here's my pxelinux.cfg/default snipit (how the preseed.cfg is called):

 LABEL ubuntu-16.04.2 server LTS with preseed
 MENU LABEL ubuntu-16.04.2 server LTS with preseed
 KERNEL images/ubuntu-16.04.2-server-amd64.iso/linux
 APPEND initrd=images/ubuntu-16.04.2-server-amd64.iso/initrd.gz 
inst.repo=ftp:///pub/ubuntu-16.04.2-server-amd64.iso auto=true 
priority=critical debian-installer/locale=en_US 
keyboard-configuration/layoutcode=us ubiquity/reboot=true 
languagechooser/language-name=English countrychooser/shortlist=US 
localechooser/supported-locales=en_US.UTF-8 boot=casper automatic-ubiquity 
quiet splash noprompt noshell preseed/url=ftp:///pub/kickstarter/preseed.cfg ---

# and ftp:///pub/ubuntu-16.04.2-server-amd64.iso is a 
mountpoint to the file of the same name.
# Make sure and change the  and  fields with your own.

-- 
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/7a874867-5ed5-4928-890d-e9dbaec15b31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] First Time Installing Puppet

2017-03-22 Thread Net Warrior
Hi there guys
Need some help, this is my first time installing puppet , this is my conf:

Installed the repo https://docs.puppet.com/puppet/3.8/install_el.html
rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm

RHEL 7 x64
3.10.0-327.13.1.el7.x86_64 #1 SMP Mon Feb 29 13:22:02 EST 2016 x86_64
x86_64 x86_64 GNU/Linux


Resolving Dependencies
--> Running transaction check
---> Package puppetserver.noarch 0:1.2.0-1.el7 will be installed
--> Processing Dependency: puppet < 4.0.0 for package:
puppetserver-1.2.0-1.el7.noarch
--> Processing Dependency: puppet >= 3.7.3 for package:
puppetserver-1.2.0-1.el7.noarch
--> Running transaction check
---> Package puppet.noarch 0:3.8.7-1.el7 will be installed
--> Processing Dependency: ruby >= 1.8 for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: facter >= 1:1.7.0 for package:
puppet-3.8.7-1.el7.noarch
--> Processing Dependency: ruby >= 1.8.7 for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: rubygem-json for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: /usr/bin/ruby for package: puppet-3.8.7-1.el7.noarch
--> Running transaction check
---> Package facter.x86_64 1:2.4.6-1.el7 will be installed
--> Processing Dependency: ruby >= 1.8.7 for package:
1:facter-2.4.6-1.el7.x86_64
--> Processing Dependency: /usr/bin/ruby for package:
1:facter-2.4.6-1.el7.x86_64
---> Package puppet.noarch 0:3.8.7-1.el7 will be installed
--> Processing Dependency: ruby >= 1.8 for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: ruby >= 1.8.7 for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: rubygem-json for package: puppet-3.8.7-1.el7.noarch
--> Processing Dependency: /usr/bin/ruby for package:
1:facter-2.4.6-1.el7.x86_64
--> Processing Dependency: /usr/bin/ruby for package: puppet-3.8.7-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: 1:facter-2.4.6-1.el7.x86_64 (puppetlabs-products)
   Requires: ruby >= 1.8.7
Error: Package: puppet-3.8.7-1.el7.noarch (puppetlabs-products)
   Requires: rubygem-json
Error: Package: 1:facter-2.4.6-1.el7.x86_64 (puppetlabs-products)
   Requires: /usr/bin/ruby
Error: Package: puppet-3.8.7-1.el7.noarch (puppetlabs-products)
   Requires: /usr/bin/ruby
Error: Package: puppet-3.8.7-1.el7.noarch (puppetlabs-products)
   Requires: ruby >= 1.8.7
Error: Package: puppet-3.8.7-1.el7.noarch (puppetlabs-products)
   Requires: ruby >= 1.8
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
avahi-libs-0.6.31-17.el7.x86_64 is a duplicate with
avahi-libs-0.6.31-15.el7_2.1.i686
ghostscript-9.07-20.el7.x86_64 is a duplicate with ghostscript-9.07-18.el7.i686

Ruby packages installed:
rh-ruby22-runtime-2.0-6.el7.x86_64
ruby-augeas-0.5.0-1.el7.x86_64
rh-ruby22-rubygem-bigdecimal-1.2.6-12.el7.x86_64
rh-ruby22-rubygem-rdoc-4.2.0-12.el7.noarch
libselinux-ruby-2.5-6.el7.x86_64
rh-ruby22-rubygem-json-1.8.1-12.el7.x86_64
ruby-libs-2.0.0.648-29.el7.x86_64
rh-ruby22-rubygem-io-console-0.4.3-12.el7.x86_64
rh-ruby22-rubygem-psych-2.0.8-12.el7.x86_64
rh-ruby22-ruby-2.2.2-12.el7.x86_64
ruby-shadow-1.4.1-23.el7.x86_64
rh-ruby22-ruby-libs-2.2.2-12.el7.x86_64
rh-ruby22-ruby-irb-2.2.2-12.el7.noarch
rh-ruby22-rubygems-2.4.5-12.el7.x86_64

Thanks in advance
Regards

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