From c17040d2073801fcd94147744779177e1b03225b Mon Sep 17 00:00:00 2001 From: Billy Barrese Date: Thu, 21 Nov 2024 10:35:12 -0800 Subject: [PATCH] Add explicit `unified_mode false` to core/other resources Differential Revision: D65959110 fbshipit-source-id: 0970484d5409eee8900471d57a715aadb846ee6c --- itchef/cookbooks/cpe_applocker/resources/cpe_applocker.rb | 1 + itchef/cookbooks/cpe_chrome/resources/cpe_chrome_posix.rb | 1 + itchef/cookbooks/cpe_chrome/resources/cpe_chrome_win.rb | 1 + itchef/cookbooks/cpe_dconf/resources/cpe_dconf.rb | 1 + itchef/cookbooks/cpe_flatpak/resources/flatpak.rb | 1 + itchef/cookbooks/cpe_flatpak/resources/flatpak_pkgs.rb | 1 + itchef/cookbooks/cpe_flatpak/resources/flatpak_repo.rb | 1 + .../cookbooks/cpe_gnome_software/resources/cpe_gnome_software.rb | 1 + itchef/cookbooks/cpe_hosts/resources/cpe_hosts.rb | 1 + itchef/cookbooks/cpe_kernel_channel/resources/fedora.rb | 1 + itchef/cookbooks/cpe_munki/resources/cpe_munki_config.rb | 1 + .../cookbooks/cpe_munki/resources/cpe_munki_defaults_config.rb | 1 + itchef/cookbooks/cpe_munki/resources/cpe_munki_install.rb | 1 + itchef/cookbooks/cpe_munki/resources/cpe_munki_local.rb | 1 + itchef/cookbooks/cpe_nomad/resources/darwin.rb | 1 + itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_darwin.rb | 1 + itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_linux.rb | 1 + .../cpe_powermanagement/resources/cpe_powermanagement.rb | 1 + itchef/cookbooks/cpe_preferencepanes/resources/default.rb | 1 + itchef/cookbooks/cpe_profiles/resources/cpe_profiles.rb | 1 + itchef/cookbooks/cpe_profiles_local/resources/cpe_profiles.rb | 1 + itchef/cookbooks/cpe_remote/resources/file.rb | 1 + itchef/cookbooks/cpe_remote/resources/pkg.rb | 1 + itchef/cookbooks/cpe_remote/resources/zip.rb | 1 + itchef/cookbooks/cpe_symlinks/resources/cpe_symlinks.rb | 1 + .../cookbooks/cpe_win_telemetry/resources/cpe_win_telemetry.rb | 1 + .../resources/cpe_windows_update_for_business.rb | 1 + 27 files changed, 27 insertions(+) diff --git a/itchef/cookbooks/cpe_applocker/resources/cpe_applocker.rb b/itchef/cookbooks/cpe_applocker/resources/cpe_applocker.rb index 950d13b2..aabb725d 100644 --- a/itchef/cookbooks/cpe_applocker/resources/cpe_applocker.rb +++ b/itchef/cookbooks/cpe_applocker/resources/cpe_applocker.rb @@ -20,6 +20,7 @@ resource_name :cpe_applocker provides :cpe_applocker, :os => 'windows' +unified_mode(false) if Chef::VERSION >= 18 default_action :configure property :applocker_rules, Hash diff --git a/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_posix.rb b/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_posix.rb index bfc4daf0..ffdd4048 100755 --- a/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_posix.rb +++ b/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_posix.rb @@ -17,6 +17,7 @@ resource_name :cpe_chrome_posix provides :cpe_chrome, :os => ['darwin', 'linux'] +unified_mode(false) if Chef::VERSION >= 18 default_action :config action :config do diff --git a/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_win.rb b/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_win.rb index ba63bf59..70c436b2 100755 --- a/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_win.rb +++ b/itchef/cookbooks/cpe_chrome/resources/cpe_chrome_win.rb @@ -17,6 +17,7 @@ resource_name :cpe_chrome_win provides :cpe_chrome, :os => 'windows' +unified_mode(false) if Chef::VERSION >= 18 default_action :config action :config do diff --git a/itchef/cookbooks/cpe_dconf/resources/cpe_dconf.rb b/itchef/cookbooks/cpe_dconf/resources/cpe_dconf.rb index d11019b6..974beb21 100644 --- a/itchef/cookbooks/cpe_dconf/resources/cpe_dconf.rb +++ b/itchef/cookbooks/cpe_dconf/resources/cpe_dconf.rb @@ -17,6 +17,7 @@ resource_name :cpe_dconf provides :cpe_dconf, :os => 'linux' +unified_mode(false) if Chef::VERSION >= 18 default_action :update action :update do diff --git a/itchef/cookbooks/cpe_flatpak/resources/flatpak.rb b/itchef/cookbooks/cpe_flatpak/resources/flatpak.rb index 282e09b0..ef923c73 100644 --- a/itchef/cookbooks/cpe_flatpak/resources/flatpak.rb +++ b/itchef/cookbooks/cpe_flatpak/resources/flatpak.rb @@ -18,6 +18,7 @@ resource_name :cpe_flatpak_linux provides :cpe_flatpak, :os => 'linux' +unified_mode(false) if Chef::VERSION >= 18 default_action :manage property :fp, String, :name_property => true diff --git a/itchef/cookbooks/cpe_flatpak/resources/flatpak_pkgs.rb b/itchef/cookbooks/cpe_flatpak/resources/flatpak_pkgs.rb index e11eb85d..2facbe57 100644 --- a/itchef/cookbooks/cpe_flatpak/resources/flatpak_pkgs.rb +++ b/itchef/cookbooks/cpe_flatpak/resources/flatpak_pkgs.rb @@ -18,6 +18,7 @@ resource_name :cpe_flatpak_pkg provides :cpe_flatpak_pkg, :os => 'linux' +unified_mode(false) if Chef::VERSION >= 18 default_action :install property :pkg, String property :pfp, String, :name_property => true diff --git a/itchef/cookbooks/cpe_flatpak/resources/flatpak_repo.rb b/itchef/cookbooks/cpe_flatpak/resources/flatpak_repo.rb index a2c74e2c..2dd266c5 100644 --- a/itchef/cookbooks/cpe_flatpak/resources/flatpak_repo.rb +++ b/itchef/cookbooks/cpe_flatpak/resources/flatpak_repo.rb @@ -18,6 +18,7 @@ resource_name :cpe_flatpak_repo provides :cpe_flatpak_repo, :os => 'linux' +unified_mode(false) if Chef::VERSION >= 18 default_action :install property :repo_name, String property :rfp, String, :name_property => true diff --git a/itchef/cookbooks/cpe_gnome_software/resources/cpe_gnome_software.rb b/itchef/cookbooks/cpe_gnome_software/resources/cpe_gnome_software.rb index 75a988bc..37440c49 100644 --- a/itchef/cookbooks/cpe_gnome_software/resources/cpe_gnome_software.rb +++ b/itchef/cookbooks/cpe_gnome_software/resources/cpe_gnome_software.rb @@ -17,6 +17,7 @@ resource_name :cpe_gnome_software provides :cpe_gnome_software +unified_mode(false) if Chef::VERSION >= 18 default_action :manage action :manage do diff --git a/itchef/cookbooks/cpe_hosts/resources/cpe_hosts.rb b/itchef/cookbooks/cpe_hosts/resources/cpe_hosts.rb index abfec199..91a2b044 100644 --- a/itchef/cookbooks/cpe_hosts/resources/cpe_hosts.rb +++ b/itchef/cookbooks/cpe_hosts/resources/cpe_hosts.rb @@ -17,6 +17,7 @@ resource_name :cpe_hosts provides :cpe_hosts +unified_mode(false) if Chef::VERSION >= 18 default_action :run action :run do diff --git a/itchef/cookbooks/cpe_kernel_channel/resources/fedora.rb b/itchef/cookbooks/cpe_kernel_channel/resources/fedora.rb index 7f98acce..f5833244 100644 --- a/itchef/cookbooks/cpe_kernel_channel/resources/fedora.rb +++ b/itchef/cookbooks/cpe_kernel_channel/resources/fedora.rb @@ -17,6 +17,7 @@ resource_name :cpe_kernel_channel_fedora provides :cpe_kernel_channel, :platform => 'fedora' +unified_mode(false) if Chef::VERSION >= 18 default_action :update action :update do diff --git a/itchef/cookbooks/cpe_munki/resources/cpe_munki_config.rb b/itchef/cookbooks/cpe_munki/resources/cpe_munki_config.rb index f6f06667..64f0cf49 100644 --- a/itchef/cookbooks/cpe_munki/resources/cpe_munki_config.rb +++ b/itchef/cookbooks/cpe_munki/resources/cpe_munki_config.rb @@ -17,6 +17,7 @@ resource_name :cpe_munki_config provides :cpe_munki_config, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :config action :config do diff --git a/itchef/cookbooks/cpe_munki/resources/cpe_munki_defaults_config.rb b/itchef/cookbooks/cpe_munki/resources/cpe_munki_defaults_config.rb index f5c541ee..70ccc185 100644 --- a/itchef/cookbooks/cpe_munki/resources/cpe_munki_defaults_config.rb +++ b/itchef/cookbooks/cpe_munki/resources/cpe_munki_defaults_config.rb @@ -16,6 +16,7 @@ # Resource:: cpe_munki_defaults_config provides :cpe_munki_defaults_config, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :config action :config do diff --git a/itchef/cookbooks/cpe_munki/resources/cpe_munki_install.rb b/itchef/cookbooks/cpe_munki/resources/cpe_munki_install.rb index 299f5630..0485b779 100644 --- a/itchef/cookbooks/cpe_munki/resources/cpe_munki_install.rb +++ b/itchef/cookbooks/cpe_munki/resources/cpe_munki_install.rb @@ -17,6 +17,7 @@ resource_name :cpe_munki_install provides :cpe_munki_install, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :install action_class do diff --git a/itchef/cookbooks/cpe_munki/resources/cpe_munki_local.rb b/itchef/cookbooks/cpe_munki/resources/cpe_munki_local.rb index 2a3a029a..efe5e256 100644 --- a/itchef/cookbooks/cpe_munki/resources/cpe_munki_local.rb +++ b/itchef/cookbooks/cpe_munki/resources/cpe_munki_local.rb @@ -20,6 +20,7 @@ resource_name :cpe_munki_local provides :cpe_munki_local, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :run action :run do diff --git a/itchef/cookbooks/cpe_nomad/resources/darwin.rb b/itchef/cookbooks/cpe_nomad/resources/darwin.rb index 284e8c1e..4c5f05aa 100644 --- a/itchef/cookbooks/cpe_nomad/resources/darwin.rb +++ b/itchef/cookbooks/cpe_nomad/resources/darwin.rb @@ -19,6 +19,7 @@ resource_name :cpe_nomad_darwin provides :cpe_nomad_darwin, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :manage action :manage do diff --git a/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_darwin.rb b/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_darwin.rb index 3b4e616e..901aa348 100644 --- a/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_darwin.rb +++ b/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_darwin.rb @@ -17,6 +17,7 @@ resource_name :cpe_pathsd_darwin provides :cpe_pathsd, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :manage action :manage do diff --git a/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_linux.rb b/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_linux.rb index 7cc5bf7b..4428fce5 100644 --- a/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_linux.rb +++ b/itchef/cookbooks/cpe_pathsd/resources/cpe_pathsd_linux.rb @@ -17,6 +17,7 @@ resource_name :cpe_pathsd_linux provides :cpe_pathsd, :os => 'linux' +unified_mode(false) if Chef::VERSION >= 18 default_action :manage action :manage do diff --git a/itchef/cookbooks/cpe_powermanagement/resources/cpe_powermanagement.rb b/itchef/cookbooks/cpe_powermanagement/resources/cpe_powermanagement.rb index ed75a637..652e01d7 100644 --- a/itchef/cookbooks/cpe_powermanagement/resources/cpe_powermanagement.rb +++ b/itchef/cookbooks/cpe_powermanagement/resources/cpe_powermanagement.rb @@ -18,6 +18,7 @@ resource_name :cpe_powermanagement provides :cpe_powermanagement, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :config action :config do diff --git a/itchef/cookbooks/cpe_preferencepanes/resources/default.rb b/itchef/cookbooks/cpe_preferencepanes/resources/default.rb index 881a46bb..a64ad6db 100644 --- a/itchef/cookbooks/cpe_preferencepanes/resources/default.rb +++ b/itchef/cookbooks/cpe_preferencepanes/resources/default.rb @@ -17,6 +17,7 @@ resource_name :cpe_preferencepanes provides :cpe_preferencepanes, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :config # rubocop:disable Metrics/BlockLength diff --git a/itchef/cookbooks/cpe_profiles/resources/cpe_profiles.rb b/itchef/cookbooks/cpe_profiles/resources/cpe_profiles.rb index 3efa3880..2af4563e 100644 --- a/itchef/cookbooks/cpe_profiles/resources/cpe_profiles.rb +++ b/itchef/cookbooks/cpe_profiles/resources/cpe_profiles.rb @@ -17,6 +17,7 @@ resource_name :cpe_profiles provides :cpe_profiles, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :run action :run do diff --git a/itchef/cookbooks/cpe_profiles_local/resources/cpe_profiles.rb b/itchef/cookbooks/cpe_profiles_local/resources/cpe_profiles.rb index 2fbfd060..989b9196 100644 --- a/itchef/cookbooks/cpe_profiles_local/resources/cpe_profiles.rb +++ b/itchef/cookbooks/cpe_profiles_local/resources/cpe_profiles.rb @@ -17,6 +17,7 @@ resource_name :cpe_profiles_local provides :cpe_profiles_local, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 default_action :run action :run do diff --git a/itchef/cookbooks/cpe_remote/resources/file.rb b/itchef/cookbooks/cpe_remote/resources/file.rb index 0a937d5e..dffc839c 100644 --- a/itchef/cookbooks/cpe_remote/resources/file.rb +++ b/itchef/cookbooks/cpe_remote/resources/file.rb @@ -19,6 +19,7 @@ resource_name :cpe_remote_file default_action :create provides :cpe_remote_file +unified_mode(false) if Chef::VERSION >= 18 property :folder_name, String, :name_property => true # see https://github.com/chef/chef/blob/ + diff --git a/itchef/cookbooks/cpe_remote/resources/pkg.rb b/itchef/cookbooks/cpe_remote/resources/pkg.rb index 39030863..c78608ef 100644 --- a/itchef/cookbooks/cpe_remote/resources/pkg.rb +++ b/itchef/cookbooks/cpe_remote/resources/pkg.rb @@ -20,6 +20,7 @@ default_action :install provides :cpe_remote_pkg, :os => 'darwin' +unified_mode(false) if Chef::VERSION >= 18 property :allow_downgrade, [TrueClass, FalseClass], :default => true property :app, String, :name_property => true property :checksum, String diff --git a/itchef/cookbooks/cpe_remote/resources/zip.rb b/itchef/cookbooks/cpe_remote/resources/zip.rb index b74cad93..64563e3b 100644 --- a/itchef/cookbooks/cpe_remote/resources/zip.rb +++ b/itchef/cookbooks/cpe_remote/resources/zip.rb @@ -19,6 +19,7 @@ resource_name :cpe_remote_zip default_action :create provides :cpe_remote_zip +unified_mode(false) if Chef::VERSION >= 18 property :folder_name, String, :name_property => true property :zip_checksum, String diff --git a/itchef/cookbooks/cpe_symlinks/resources/cpe_symlinks.rb b/itchef/cookbooks/cpe_symlinks/resources/cpe_symlinks.rb index 5f9eee3c..668bf7d1 100644 --- a/itchef/cookbooks/cpe_symlinks/resources/cpe_symlinks.rb +++ b/itchef/cookbooks/cpe_symlinks/resources/cpe_symlinks.rb @@ -17,6 +17,7 @@ resource_name :cpe_symlinks provides :cpe_symlinks +unified_mode(false) if Chef::VERSION >= 18 default_action :create # rubocop:disable Metrics/BlockLength diff --git a/itchef/cookbooks/cpe_win_telemetry/resources/cpe_win_telemetry.rb b/itchef/cookbooks/cpe_win_telemetry/resources/cpe_win_telemetry.rb index 141e70f2..58056854 100644 --- a/itchef/cookbooks/cpe_win_telemetry/resources/cpe_win_telemetry.rb +++ b/itchef/cookbooks/cpe_win_telemetry/resources/cpe_win_telemetry.rb @@ -18,6 +18,7 @@ resource_name :cpe_win_telemetry default_action :config provides :cpe_win_telemetry, :os => 'windows' +unified_mode(false) if Chef::VERSION >= 18 action :config do return unless node.windows? && node.os_at_least?('10.0.15063') diff --git a/itchef/cookbooks/cpe_windows_update_for_business/resources/cpe_windows_update_for_business.rb b/itchef/cookbooks/cpe_windows_update_for_business/resources/cpe_windows_update_for_business.rb index aa44b314..7e7364c0 100644 --- a/itchef/cookbooks/cpe_windows_update_for_business/resources/cpe_windows_update_for_business.rb +++ b/itchef/cookbooks/cpe_windows_update_for_business/resources/cpe_windows_update_for_business.rb @@ -17,6 +17,7 @@ resource_name :cpe_windows_update_for_business provides :cpe_windows_update_for_business +unified_mode(false) if Chef::VERSION >= 18 default_action :config # rubocop:disable Layout/LineLength