summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/osx_profile.rb50
1 files changed, 10 insertions, 40 deletions
diff --git a/lib/chef/resource/osx_profile.rb b/lib/chef/resource/osx_profile.rb
index 8142e1fd96..1d13a8851e 100644
--- a/lib/chef/resource/osx_profile.rb
+++ b/lib/chef/resource/osx_profile.rb
@@ -20,6 +20,12 @@ require "chef/resource"
class Chef
class Resource
+ # Use the osx_profile resource to manage configuration profiles (.mobileconfig files)
+ # on the macOS platform. The osx_profile resource installs profiles by using
+ # the uuidgen library to generate a unique ProfileUUID, and then using the
+ # profiles command to install the profile on the system.
+ #
+ # @since 12.7
class OsxProfile < Chef::Resource
provides :osx_profile, os: "darwin"
provides :osx_config_profile, os: "darwin"
@@ -29,46 +35,10 @@ class Chef
default_action :install
allowed_actions :install, :remove
- def initialize(name, run_context = nil)
- super
- @profile_name = name
- @profile = nil
- @identifier = nil
- @path = nil
- end
-
- def profile_name(arg = nil)
- set_or_return(
- :profile_name,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def profile(arg = nil)
- set_or_return(
- :profile,
- arg,
- :kind_of => [ String, Hash ]
- )
- end
-
- def identifier(arg = nil)
- set_or_return(
- :identifier,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def path(arg = nil)
- set_or_return(
- :path,
- arg,
- :kind_of => [ String ]
- )
- end
-
+ property :profile_name, String, name_property: true
+ property :profile, [ String, Hash ]
+ property :identifier, String
+ property :path, String
end
end
end