Ruby gem-ruby-shadow RPM on RHEL 8 ?

122 views
Skip to first unread message

White, Daniel E. (GSFC-770.0)[NICS]

unread,
Mar 17, 2022, 11:49:50 AM3/17/22
to Puppet-Users Mailing List

Will the rubygem-ruby-shadow RPM from EPEL work with PE 2021.4 instead of installing the gem ?

 

The command “puppetserver gem install ruby-shadow” fails, telling me I need to install development tools.

I can do that for the test-lab instance, but not in production.

 

Thanks.

Corey Osman

unread,
Mar 18, 2022, 6:18:35 PM3/18/22
to Puppet Users

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

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


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

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

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


Corey
NWOPS, LLC

White, Daniel E. (GSFC-770.0)[NICS]

unread,
Mar 21, 2022, 6:23:20 AM3/21/22
to puppet...@googlegroups.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7cb87ec3-d539-4cb5-81aa-0088d9d2d74an%40googlegroups.com.

Martin Alfke

unread,
Mar 21, 2022, 7:01:31 AM3/21/22
to puppet...@googlegroups.com
Shadow is part of the ruby installation inside the puppet agent.
You can verify functionality:

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

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

No need to install anything.


Hth,
Martin


White, Daniel E. (GSFC-770.0)[NICS]

unread,
Mar 21, 2022, 8:33:18 AM3/21/22
to puppet...@googlegroups.com

The command “puppetserver gem list” does not list  “ruby-shadow”

How do I get a list of agent side gems, please ?

______________________________________________________________________________________________

 

Daniel E. White
daniel....@nasa.gov

NASCOM Linux Engineer
NASA Goddard Space Flight Center
Science Applications International Corporation (SAIC)
Office: (301) 286-6919

Mobile: (240) 513-5290

Martin Alfke

unread,
Mar 21, 2022, 9:24:07 AM3/21/22
to puppet...@googlegroups.com
For getting a list of Puppet Agent gems you can run

/opt/puppetlabs/puppet/bin/gem list

But: this command will only show additional gems! It will not show gems bundled with Ruby itself!
The shadow gem is part of the ruby implementation.

find /opt/puppetlabs/puppet/lib/ -type f -name *shadow*
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.5.0/x86_64-linux/shadow.so


Reply all
Reply to author
Forward
0 new messages