Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy facts #301

Closed
silug opened this issue Dec 17, 2024 · 0 comments · Fixed by #302
Closed

Legacy facts #301

silug opened this issue Dec 17, 2024 · 0 comments · Fixed by #302

Comments

@silug
Copy link
Contributor

silug commented Dec 17, 2024

lib/facter/uid_min.rb:19:      if ['RedHat','CentOS','OracleLinux','Scientific'].include?(Facter.value(:operatingsystem)) &&
lib/facter/uid_min.rb:20:         Facter.value(:operatingsystemmajrelease) < '7'
lib/puppet/functions/simplib/filtered.rb:16:#       path: "osfamily/%{facts.osfamily}.yaml"
lib/puppet/functions/simplib/filtered.rb:21:#         - "%{facts.sitename}/osfamily/%{facts.osfamily}.yaml"
lib/puppet/functions/simplib/filtered.rb:22:#         - "%{facts.sitename}/os/%{facts.operatingsystem}.yaml"
lib/puppet/functions/simplib/filtered.rb:23:#         - "%{facts.sitename}/host/%{facts.fqdn}.yaml"
lib/puppet/functions/simplib/host_is_me.rb:32:      scope['facts']['fqdn'],
lib/puppet/functions/simplib/host_is_me.rb:33:      scope['facts']['hostname'],
lib/puppet/functions/simplib/ip_to_cron.rb:33:  #   When `nil`, the 'ipaddress' fact (IPv4) is used.
lib/puppet/functions/simplib/ip_to_cron.rb:57:      ipaddr = scope['facts']['ipaddress']
lib/puppet/functions/simplib/ipaddresses.rb:17:    interfaces = scope['facts']['interfaces']
lib/puppet/functions/simplib/ipaddresses.rb:19:    if interfaces
lib/puppet/functions/simplib/ipaddresses.rb:20:      interfaces.split(',').each do |iface|
lib/puppet/functions/simplib/join_mount_opts.rb:38:    selinux_current_mode = scope['facts']['selinux_current_mode']
lib/puppet/functions/simplib/join_mount_opts.rb:40:    if !selinux_current_mode or selinux_current_mode == 'disabled'
lib/puppet/functions/simplib/join_mount_opts.rb:41:      # SELinux is off, get rid of selinux related items in the options
lib/puppet/functions/simplib/validate_sysctl_value.rb:51:    system_ram_mb = closure_scope['facts']['memorysize_mb']
lib/puppet/functions/simplib/validate_sysctl_value.rb:57:      size_multiplier = 1024 if (closure_scope['facts']['architecture'] == 'x86_64')
lib/puppet/provider/reboot_notify/notify.rb:121:    # Purge any records older than our uptime (we rebooted).
lib/puppet/provider/reboot_notify/notify.rb:126:      # and the current time is greater than the system uptime then we should
lib/puppet/provider/reboot_notify/notify.rb:128:      (current_time - v['updated']) > Facter.value(:uptime_seconds)
spec/acceptance/suites/default/ipaddresses_spec.rb:9:      ifaces = fact_on(server, 'interfaces').split(',').map(&:strip)
spec/acceptance/suites/default/ipaddresses_spec.rb:14:        ipaddress = fact_on(server, "ipaddress_#{iface}")
spec/acceptance/suites/default/ipaddresses_spec.rb:16:        if ipaddress && !ipaddress.strip.empty?
spec/acceptance/suites/default/ipaddresses_spec.rb:17:          ipaddresses << ipaddress
spec/acceptance/suites/ipa_fact/ipa_fact_spec.rb:39:      hostname = pfact_on(host, 'fqdn')
spec/acceptance/suites/ipa_fact/ipa_fact_spec.rb:77:        fqdn = pfact_on(server, 'fqdn')
spec/acceptance/suites/ipa_fact/ipa_fact_spec.rb:135:          pfact_on(hosts_with_role(hosts, 'server').first, 'fqdn')
spec/functions/simplib/host_is_me_spec.rb:8:      :fqdn           => 'myhost.example.com',
spec/functions/simplib/host_is_me_spec.rb:9:      :hostname       => 'myhost',
spec/functions/simplib/host_is_me_spec.rb:10:      :interfaces     => 'eth0,eth1,lo',
spec/functions/simplib/host_is_me_spec.rb:11:      :ipaddress_eth0 => '1.2.3.4',
spec/functions/simplib/host_is_me_spec.rb:12:      :ipaddress_eth1 => '5.6.7.8',
spec/functions/simplib/host_is_me_spec.rb:13:      :ipaddress_lo   => '127.0.0.1'
spec/functions/simplib/ip_to_cron_spec.rb:5:  let(:facts) {{ :ipaddress => '10.0.10.154' }}
spec/functions/simplib/ipaddresses_spec.rb:26:      :interfaces     => 'eth0,eth1,lo',
spec/functions/simplib/ipaddresses_spec.rb:27:      :ipaddress_eth0 => '1.2.3.4',
spec/functions/simplib/ipaddresses_spec.rb:28:      :ipaddress_eth1 => '5.6.7.8',
spec/functions/simplib/ipaddresses_spec.rb:29:      :ipaddress_lo   => '127.0.0.1'
spec/functions/simplib/ipaddresses_spec.rb:37:      :interfaces     => 'eth0,eth1,lo',
spec/functions/simplib/ipaddresses_spec.rb:38:      :ipaddress_eth0 => '1.2.3.4',
spec/functions/simplib/ipaddresses_spec.rb:39:      :ipaddress_lo   => '127.0.0.1'
spec/functions/simplib/join_mount_opts_spec.rb:9:    let(:facts) {{ :selinux_current_mode => 'enforcing' }}
spec/functions/simplib/join_mount_opts_spec.rb:62:        let(:facts) {{ :selinux_current_mode => selinux_mode }}
spec/functions/simplib/join_mount_opts_spec.rb:78:        let(:facts) {{ :selinux_current_mode => selinux_mode }}
spec/functions/simplib/validate_sysctl_value_spec.rb:36:      :architecture  => 'x86_64',
spec/functions/simplib/validate_sysctl_value_spec.rb:37:      :memorysize_mb => 20
spec/functions/simplib/validate_sysctl_value_spec.rb:70:          :architecture  => 'i686',
spec/functions/simplib/validate_sysctl_value_spec.rb:71:          :memorysize_mb => 20
spec/unit/facter/login_defs_spec.rb:9:    allow(Facter).to receive(:value).with(:operatingsystem).and_return('Linux')
@op-ct op-ct added this to Org Triage Dec 17, 2024
silug added a commit to silug/pupmod-simp-simplib that referenced this issue Dec 30, 2024
rgardner4012 pushed a commit that referenced this issue Dec 31, 2024
* Fix use of legacy facts

Fixes #301

* Add missing tests for uid_min fact
@github-project-automation github-project-automation bot moved this from New to Done in Org Triage Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant