Project

General

Profile

Feature #6114

Do not depend on Facter package

Added by Arnold Bechtoldt over 5 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Please move the facter package from the dependency list to the recommendations or suggestions list in the foreman deb/rpm since it is not necessary to have facter when using Foreman. Or is it used in the Foreman code?

I'm using Salt with Foreman, so Facter is useless for me. :)

# dpkg -s foreman | grep Depends
Depends: ruby1.9.1, bundler (>= 1.1), ruby1.9.1-dev, facter, build-essential, rake (>= 0.8.4)

History

#1 Updated by Ohad Levy over 5 years ago

  • Tracker changed from Bug to Feature
  • Project changed from Packaging to Foreman

we still use facter in some places... see below:


./db/migrate/20100419151910_add_owner_to_hosts.rb:require 'facter'
./db/migrate/20100419151910_add_owner_to_hosts.rb:    email = SETTINGS[:administrator] || "root@#{Facter.value(:domain)}" 
./db/migrate/20100628123400_add_internal_auth.rb:require 'facter'
./app/models/setting/auth.rb:require 'facter'
./app/models/setting/auth.rb:    fqdn = Facter.value(:fqdn) || SETTINGS[:fqdn]
./app/models/setting/general.rb:require 'facter'
./app/models/setting/general.rb:    domain = Facter.value(:domain) || SETTINGS[:domain]
./app/models/setting/general.rb:    foreman_url = "#{protocol}://#{Facter.value(:fqdn) || SETTINGS[:fqdn]}" 
./app/models/setting/provisioning.rb:require 'facter'
./app/models/setting/provisioning.rb:    fqdn = Facter.value(:fqdn) || SETTINGS[:fqdn]

is there an equiv way in salt? or would you expect we work with facter/ohai etc instead?

#2 Updated by Ohad Levy over 5 years ago

  • Legacy Backlogs Release (now unused) deleted (16)
  • Difficulty deleted (easy)

#3 Updated by Arnold Bechtoldt over 5 years ago

Ohad Levy wrote:

is there an equiv way in salt? or would you expect we work with facter/ohai etc instead?

Sure, in Salt those information are called grains. I would have started to do more SaltStack<->Foreman integration mysqlf, but due to a lack of time I added a parameter lookup interface only: https://github.com/saltstack/salt/blob/develop/salt/pillar/foreman.py

See also http://projects.theforeman.org/projects/foreman/wiki/CMS-Report#Salt-Stack

@$ salt_call -g --local --out=json {
"local": {
"kernel": "Darwin",
"domain": "fritz.box",
"zmqversion": "3.2.4",
"kernelrelease": "13.2.0",
"pythonpath": [
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages",
"/Library/Python/2.7/site-packages"
],
"saltversioninfo": [
2014,
1,
1
],
"ip_interfaces": {
"gif0": [],
"bridge0": [],
"en0": [],
"en1": [
"192.168.2.90"
],
"lo0": [
"127.0.0.1"
],
"en5": [],
"p2p0": [],
"stf0": [],
"fw0": []
},
"shell": "/bin/bash",
"mem_total": 16384,
"gpus": [ {
"model": "HD Graphics 4000",
"vendor": "intel"
}
],
"id": "hostname",
"osrelease": "10.9.3",
"ps": "ps auxwww",
"server_id": 2134903248,
"num_cpus": 4,
"hwaddr_interfaces": {
"bridge0": "12:dd:b1:e9:90:00",
"en0": "10:dd:b1:9e:cb:2c",
"en1": "4c:8d:79:dd:43:ee",
"en5": "d2:00:16:1c:ee:e0",
"p2p0": "0e:8d:79:dd:43:ee",
"fw0": "10:dd:b1:ff:fe:61:ce:ee"
},
"virtual": "physical",
"master": "salt",
"ipv4": [
"127.0.0.1",
"192.168.2.90"
],
"ipv6": [
"::1",
"fe80::1",
"fe80::4e8d:79ff:fedd:43ee"
],
"cpu_flags": [
"FPU",
"VME",
"DE",
"PSE",
"TSC",
"MSR",
"PAE",
"MCE",
"CX8",
"APIC",
"SEP",
"MTRR",
"PGE",
"MCA",
"CMOV",
"PAT",
"PSE36",
"CLFSH",
"DS",
"ACPI",
"MMX",
"FXSR",
"SSE",
"SSE2",
"SS",
"HTT",
"TM",
"PBE",
"SSE3",
"PCLMULQDQ",
"DTES64",
"MON",
"DSCPL",
"VMX",
"EST",
"TM2",
"SSSE3",
"CX16",
"TPR",
"PDCM",
"SSE4.1",
"SSE4.2",
"x2APIC",
"POPCNT",
"AES",
"PCID",
"XSAVE",
"OSXSAVE",
"TSCTMR",
"AVX1.0",
"RDRAND",
"F16C"
],
"localhost": "lap-abechtoldt01.fritz.box",
"fqdn_ip4": [
"192.168.2.90"
],
"fqdn_ip6": [],
"nodename": "fqdn",
"saltversion": "2014.1.1",
"saltpath": "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/salt",
"pythonversion": [
2,
7,
6,
"final",
0
],
"host": "hostname",
"os_family": "MacOS",
"defaultencoding": "UTF-8",
"path": "/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin/",
"num_gpus": 1,
"external_ip": "37.209.109.105",
"cpu_model": "Intel(R) Core(TM) i5-3210M CPU 2.50GHz",
"fqdn": "hostname",
"osarch": "x86_64",
"cpuarch": "x86_64",
"os": "MacOS",
"defaultlanguage": "en_US"
}
}

#4 Updated by Michael Moll over 2 years ago

  • Status changed from New to Resolved

should be resolved by now

Also available in: Atom PDF