Method: JSS::Policy#run
- Defined in:
- lib/jss/api_object/policy.rb
#run(show_output = false) ⇒ Boolean? Also known as: execute
Try to execute this policy on this machine.
1335 1336 1337 1338 1339 1340 |
# File 'lib/jss/api_object/policy.rb', line 1335 def run(show_output = false) return nil unless enabled? output = JSS::Client.run_jamf('policy', "-id #{id}", show_output) return nil if output.include? 'No policies were found for the ID' $CHILD_STATUS.exitstatus.zero? ? true : false end |