similar to: neatest way to determine a major version of centos/linux?

Displaying 20 results from an estimated 4000 matches similar to: "neatest way to determine a major version of centos/linux?"

2012 Jul 17
8
How to override $::operatingsystem fact
Hi, I want to introduce "Proxmox" as new value in $::operatingsystem. "Proxmox" is based on Debian, so the normal value is currently "Debian". To change that, I just write a custom fact based on the facter fact "operatingsystem" Facter.add(:operatingsystem) do > ... > setcode do > ... > elsif
2009 Apr 26
5
Factor questions
Hello, I''m new to puppet and facter. Initially we are planning on using facter/puppet to inventory machines (Mac, Ubuntu, and RHEL). We plan on writing a number of custom facts. Obviouly some of the facts will only be specific to some OSs. I know there is a "confine" method, but it confuses me. It seems the confine statement in some of the recipes and in the Turnbull book is
2006 Aug 29
40
Red Hat release info
Hi all, I''m looking at changing the operatingsystemrelease fact for Red Hat. Linux currently just uses the kernel release as the operating system release, but I''ve got a client who wants the release to have both the specific distro (e.g., AS or EL) and the release (e.g., 3 or 4). Will this particularly annoy anyone? Anyone want to help make the release string work on
2012 Mar 23
11
Plugins and Hiera
Dear all, This is a continuation of another thread, but I think the question diverged enough to create a new one. I have a hiera hierarchy like this: :hierarchy: - %{fqdn} - %{secundary_group} - %{primary_group} - %{productname} - all And I need to define the secondary/primary groups as facts, on the nodes. Gary has suggested me to use plugins, that they will provide the facts before
2007 Jun 13
3
Facter ''operatingsystemrelease'' fact.
From looking at the Facter code, it looks like the ''operatingsystemrelease'' fact is currently a mirror of the ''kernelrelease'' fact. I''d like to implement this fact so that it returns the major version of the operating system, eg: Debian Sarge: operatingsystemrelease => 3.1 Debian Etch: operatingsystemrelease => 4.0 RHEL3 update 8:
2007 Mar 09
2
Information from the real world into Puppet (simply)?
Hi, I''m trying retrieve some information from the real world from within puppet. I''d initially hoped that I could do this: $xen_version = exec { "apt-cache search xen-hypervisor | head -n 1 | cut -d- -f3-5": path => "/usr/bin:/usr/sbin:/bin", cwd => "/tmp", require => [
2007 Nov 13
6
Facter and arrays
Hi, Is it possible to have an array as the output of a custom fact? And then to pass it into a template in Puppet? I currently have a fact that looks like this: Facter.add("exports") do setcode do case Facter.hostname when (/thishost/i): [ "/local", "/local2" ] end end end & a template like this: <%
2009 Dec 09
3
facter 1.5.7 all lsb* items missing
I have 2 RHEL 5.4 systems where all facter lsb* items are missing. Any ideas? Sanitized facter output: architecture => i386 domain => missyou.edu facterversion => 1.5.7 fqdn => broken.missyou.edu hardwareisa => i686 hardwaremodel => i686 hostname => broken id => root interfaces => eth0,sit0 ipaddress => 1.2.1.5 ipaddress_eth0 => 1.2.1.5 is_virtual => true
2011 Feb 08
6
Puppet facter operatingsystemrelease
Hello, I am running puppet server version 0.25.4-2, and since Debian squeeze is the new stable release I would like to adapt some of my modules. I have a syslog-ng module, I would like to specify another template for my squeeze server. I changed my init.pp as follow : if ($operatingsystemrelease <= 5.0.8) { $syslog_template = "syslog/syslog-ng.conf.erb" } else {
2011 Nov 01
4
2.7.6 yumrepo not working
Just upgraded to 2.7.6 and the yumrepo type does not write out our yum configs correctly, anyone experiencing this? Documentation hasn''t changed from what I can tell for this type. # facter -version 1.6.2 # puppetd --version 2.7.6 # facter architecture x86_64 # facter operatingsystem Fedora # facter operatingsystemrelease 14 ==== My manifest ==== yumrepo {
2007 Jun 24
3
Facter operatingsystemrelease on Fedora
Currently, facter returns the kernel version as both the kernel and operatingsystemrelease facts. I would like to change that so that on Fedora, operatingsystemrelease is the release number (5,6,7 etc.) or ''Rawhide'' ... are there any objections to making that change ? David
2011 Aug 08
5
Run command based on OS version
I''m trying to write a script that runs command based on version of Redhat OS. For example, if the RHEL version is 6.0, it will run command. I was able to write file read script in ruby that would read file and execute but it didn''t seem to work in puppet script. Has anyone done something like this? $redhat_version_file = "/etc/redhat-release" $redhat_version =
2008 Jul 08
12
ANNOUNCE: Facter 1.5
Hi all, I''ve finally gotten around to releasing Facter 1.5. As the version bump implies, this is a relatively significant release (for a 2.3k line program, anyway). Mostly, the biggest change is refactoring the code internally so that all of the functionality is split into separate classes in separate files. Also, the facts are all loaded on-demand, which provides dramatic
2011 Aug 25
5
custom fact regex problem
Hi guys I have a custom fact envt, it was working fine but now I have to make some changes in it; puppet client''s hostname is of the type 1234qa-abc-de.local where 1234 can be any thing of any length.My custom fact should contain qa, ie I want to check in the first part(before the first -) of the hostname if there exists a pattern/word qa and if it exists then my custom fact for envt
2012 Mar 16
3
custom fact issue
Would anyone please assist me on this one? This fact seems to work, but it doesn''t return when called directly via facter --puppet noop, but the resulting facts end up in the reports. I''m at wits end with this. Thanks! <snip> utc_hour = Facter::Util::Resolution.exec(%q</bin/date -u +"%H">).chomp Facter.add(:noop) do setcode do
2007 Apr 26
2
[PATCH] facter: add interfaces, default_gateway facts on Linux
Quick and dirty: --- lib/facter.rb (revision 203) +++ lib/facter.rb (working copy) @@ -989,6 +989,18 @@ %x{/usr/sbin/scutil --get LocalHostName} end end + Facter.add(:interfaces) do + confine :kernel => :linux + setcode do + %x{/sbin/ifconfig -a -s}.split($/)[1..-1].collect {|line|
2012 Jun 18
8
Conditional with variable from facter
Hi. I have the following facts available: # facter | grep oper operatingsystem => CentOS operatingsystemrelease => 6.2 Now, if I wish to use conditionals on these facts, I have to do it like this: case $operatingsystem {} case $::operatingsystemrelease {} I''m puzzled as to why can''t I just use $operatingsystemrelease, and what do these two semicolons mean? Thank
2009 Jan 15
8
Pattern matching in case statement
Hi all, I need my servers to decide which network they are in (i.e. dmz), and the only clue is the servers IP-address. I was trying to accomplish it like this, but it doesn''t work: case $ipaddress { "10.1.1.*": { $network = "net1" } "10.2.2.*.*": { $network = "net2" } "10.3.3.*": {
2011 Jan 07
4
facter --puppet does not report "environment"
Is it normal that "facter --puppet" does not show the environment variable? is there a way to have it include it? Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to
2013 Jun 27
2
Conditional statement =,<,> etc.
Hello guys :), I''m kind of new to Puppet and stuck in defining a conditional statement. Here my problem: I want to provide different apt/source.list for different versions of Debian, 6.0.x and 7.0.x, which also run different versions of Puppet, 2.7.x and 3.2.x. My first idea was to use facters variable operatingsystemmajrelease and define like this: file {