File: redhat.cf

package info (click to toggle)
cfengine3 3.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,552 kB
  • sloc: ansic: 163,161; sh: 10,296; python: 2,950; makefile: 1,744; lex: 784; yacc: 633; perl: 211; pascal: 157; xml: 21; sed: 13
file content (18 lines) | stat: -rw-r--r-- 912 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
bundle common inventory_redhat
# @brief Red Hat inventory bundle
#
# This common bundle is for Red Hat Linux inventory work.
{
  classes:
      "redhat_pure" or => { strcmp( "$(sys.os_release[ID])" , "rhel" ),  # Red Hat > 7 have /etc/os-release and the ID field is set to rhel
                            strcmp( "any", and( "redhat.!(centos|oracle|fedora|rocky|almalinux)", # Red Hat < 7 does not have /etc/os-release, and is pure if we don't find another known derivative
                                 not( isvariable( "sys.os_release" ))))},
        comment => "pure Red Hat",
        meta => { "inventory", "attribute_name=none" };

      "redhat_derived" expression => "redhat.!redhat_pure",
      comment => "derived from Red Hat",
      meta => { "inventory", "attribute_name=none" };

      "inventory_redhat_have_python_symlink" expression => fileexists("$(sys.bindir)/cfengine-selected-python");
}