From 9329c95d6fbb2df5e8b754620427645f6eae69b9 Mon Sep 17 00:00:00 2001 From: Jeffrey McCune Date: Fri, 28 Nov 2008 22:39:22 -0500 Subject: type/mcx.rb Feature #1026 - MCX Type Added new MCX type and base test. This type manages MCX settings on DirectoryService nodes. These settings take the form of plist XML documents attached to Users, Groups, and Computers in DirectoryService. --- examples/mcx_dock_absent.pp | 4 ++ examples/mcx_dock_default.pp | 118 ++++++++++++++++++++++++++++++++++++ examples/mcx_dock_full.pp | 125 +++++++++++++++++++++++++++++++++++++++ examples/mcx_dock_invalid.pp | 9 +++ examples/mcx_nogroup.pp | 118 ++++++++++++++++++++++++++++++++++++ examples/mcx_notexists_absent.pp | 4 ++ 6 files changed, 378 insertions(+) create mode 100644 examples/mcx_dock_absent.pp create mode 100644 examples/mcx_dock_default.pp create mode 100644 examples/mcx_dock_full.pp create mode 100644 examples/mcx_dock_invalid.pp create mode 100644 examples/mcx_nogroup.pp create mode 100644 examples/mcx_notexists_absent.pp (limited to 'examples') diff --git a/examples/mcx_dock_absent.pp b/examples/mcx_dock_absent.pp new file mode 100644 index 000000000..ef51897e0 --- /dev/null +++ b/examples/mcx_dock_absent.pp @@ -0,0 +1,4 @@ +mcx { '/Groups/mcx_dock': + ensure => 'absent', + content => 'absent' +} diff --git a/examples/mcx_dock_default.pp b/examples/mcx_dock_default.pp new file mode 100644 index 000000000..1f65a7316 --- /dev/null +++ b/examples/mcx_dock_default.pp @@ -0,0 +1,118 @@ +mcx { '/Groups/mcx_dock': + ensure => 'present', + content => ' + + + + com.apple.dock + + AppItems-Raw + + state + always + upk + + mcx_input_key_names + + AppItems-Raw + + mcx_output_key_name + static-apps + mcx_remove_duplicates + + + value + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Mail.app + _CFURLStringType + 0 + + file-label + Mail + + tile-type + file-tile + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Safari.app + _CFURLStringType + 0 + + file-label + Safari + + tile-type + file-tile + + + + DocItems-Raw + + state + always + upk + + mcx_input_key_names + + DocItems-Raw + + mcx_output_key_name + static-others + mcx_remove_duplicates + + + value + + + MCXDockSpecialFolders-Raw + + state + always + upk + + mcx_input_key_names + + MCXDockSpecialFolders-Raw + + mcx_output_key_name + MCXDockSpecialFolders + mcx_remove_duplicates + + + value + + + contents-immutable + + state + always + value + + + static-only + + state + always + value + + + + + +' +} diff --git a/examples/mcx_dock_full.pp b/examples/mcx_dock_full.pp new file mode 100644 index 000000000..60760332a --- /dev/null +++ b/examples/mcx_dock_full.pp @@ -0,0 +1,125 @@ +# Mac MCX Test + +computer { "localhost": } + +mcx { + "mcx_dock": + ensure => "present", + ds_type => "group", + ds_name => "mcx_dock", + content => ' + + + + com.apple.dock + + AppItems-Raw + + state + always + upk + + mcx_input_key_names + + AppItems-Raw + + mcx_output_key_name + static-apps + mcx_remove_duplicates + + + value + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Mail.app + _CFURLStringType + 0 + + file-label + Mail + + tile-type + file-tile + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Safari.app + _CFURLStringType + 0 + + file-label + Safari + + tile-type + file-tile + + + + DocItems-Raw + + state + always + upk + + mcx_input_key_names + + DocItems-Raw + + mcx_output_key_name + static-others + mcx_remove_duplicates + + + value + + + MCXDockSpecialFolders-Raw + + state + always + upk + + mcx_input_key_names + + MCXDockSpecialFolders-Raw + + mcx_output_key_name + MCXDockSpecialFolders + mcx_remove_duplicates + + + value + + + contents-immutable + + state + always + value + + + static-only + + state + always + value + + + + + +' +} diff --git a/examples/mcx_dock_invalid.pp b/examples/mcx_dock_invalid.pp new file mode 100644 index 000000000..35f908177 --- /dev/null +++ b/examples/mcx_dock_invalid.pp @@ -0,0 +1,9 @@ +# Mac MCX Test + +computer { "localhost": } + +mcx { + "/Groups/mcx_dock": + ensure => "present", + content => 'invalid plist' +} diff --git a/examples/mcx_nogroup.pp b/examples/mcx_nogroup.pp new file mode 100644 index 000000000..ea689f33c --- /dev/null +++ b/examples/mcx_nogroup.pp @@ -0,0 +1,118 @@ +mcx { '/Groups/doesnotexist': + ensure => 'present', + content => ' + + + + com.apple.dock + + AppItems-Raw + + state + always + upk + + mcx_input_key_names + + AppItems-Raw + + mcx_output_key_name + static-apps + mcx_remove_duplicates + + + value + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Mail.app + _CFURLStringType + 0 + + file-label + Mail + + tile-type + file-tile + + + mcx_typehint + 1 + tile-data + + file-data + + _CFURLString + /Applications/Safari.app + _CFURLStringType + 0 + + file-label + Safari + + tile-type + file-tile + + + + DocItems-Raw + + state + always + upk + + mcx_input_key_names + + DocItems-Raw + + mcx_output_key_name + static-others + mcx_remove_duplicates + + + value + + + MCXDockSpecialFolders-Raw + + state + always + upk + + mcx_input_key_names + + MCXDockSpecialFolders-Raw + + mcx_output_key_name + MCXDockSpecialFolders + mcx_remove_duplicates + + + value + + + contents-immutable + + state + always + value + + + static-only + + state + always + value + + + + + +' +} diff --git a/examples/mcx_notexists_absent.pp b/examples/mcx_notexists_absent.pp new file mode 100644 index 000000000..ef44db10e --- /dev/null +++ b/examples/mcx_notexists_absent.pp @@ -0,0 +1,4 @@ +mcx { '/Groups/foobar': + ensure => 'absent', + content => 'absent' +} -- cgit