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

Fact has a few issues #24

Closed
petems opened this issue Jun 30, 2016 · 0 comments
Closed

Fact has a few issues #24

petems opened this issue Jun 30, 2016 · 0 comments

Comments

@petems
Copy link
Contributor

petems commented Jun 30, 2016

Use of backticks means command will be run on all systems

This should be switched to Facter.exec

Use Facter.which for checking if present

Similar to the backtick usage, there is a Facter.which helper which can help here

Break loop for ipmi not running on channel 1 doesnt seem to work

My IPMI is running on channel 2:

root@homebox:~# ipmitool lan print 1
Invalid channel: 1
root@homebox:~# ipmitool lan print 2
Set in Progress         : Set Complete
Auth Type Support       :
...

The fact only runs if I change the channel_nr to 2:

channel_nr = 2
while true
  break unless IPMIChannel.new(channel_nr).load_facts
  channel_nr += 1
end
  ipmi2_gateway: 192.168.0.1
  ipmi2_ipaddress: 192.168.0.37
  ipmi2_ipaddress_source: DHCP Address
  ipmi2_macaddress: 3c:a8:2a:9f:9a:92
  ipmi2_subnet_mask: 255.255.255.0

PR incoming! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant