We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since munki/munki#837 was merged it might be nice to add optional_installs support into cpe_munki. The following diff works for me.
A) would the fb team accept the PR? B) should we wait until an official release of munki before merging into cpe_munki?
diff --git a/cookbooks/cpe_munki/attributes/default.rb b/cookbooks/cpe_munki/attributes/default.rb index c2a2b35..dc43010 100644 --- a/cookbooks/cpe_munki/attributes/default.rb +++ b/cookbooks/cpe_munki/attributes/default.rb @@ -19,6 +19,7 @@ default['cpe_munki'] = { default['cpe_munki']['local'] = { 'managed_installs' => [], 'managed_uninstalls' => [], + 'optional_installs' => [], } default['cpe_munki']['preferences'] = { 'AppleSoftwareUpdatesOnly' => false, diff --git a/cookbooks/cpe_munki/resources/cpe_munki_local.rb b/cookbooks/cpe_munki/resources/cpe_munki_local.rb index bb46ee8..507a135 100644 --- a/cookbooks/cpe_munki/resources/cpe_munki_local.rb +++ b/cookbooks/cpe_munki/resources/cpe_munki_local.rb @@ -20,7 +20,8 @@ default_action :run action :run do locals_exist = node['cpe_munki']['local']['managed_installs'].any? || - node['cpe_munki']['local']['managed_uninstalls'].any? + node['cpe_munki']['local']['managed_uninstalls'].any? || + node['cpe_munki']['local']['optional_installs'].any? return unless locals_exist return unless ::File.exist?('/usr/local/munki/managedsoftwareupdate') @@ -71,9 +72,13 @@ def gen_plist uninstalls = validate_install_array( node['cpe_munki']['local']['managed_uninstalls'], ) + optional = validate_install_array( + node['cpe_munki']['local']['optional_installs'], + ) plist_hash = { 'managed_installs' => installs, 'managed_uninstalls' => uninstalls, + 'optional_installs' => optional, } ::Chef::Log.info("cpe_munki_local: Managed installs: #{installs}") Plist::Emit.dump(plist_hash) unless plist_hash.nil? diff --git a/cookbooks/cpe_user_customizations/recipes/clayton.burlison.rb b/cookbooks/cpe_user_customizations/recipes/clayton.burlison.rb index 2ab8a19..c41ec2d 100644
The text was updated successfully, but these errors were encountered:
What no PR? :P
Sorry, something went wrong.
Hey @clburlison! Would you mind cutting a PR for this so we can get it merged in? Thanks!
No branches or pull requests
Since munki/munki#837 was merged it might be nice to add optional_installs support into cpe_munki. The following diff works for me.
A) would the fb team accept the PR?
B) should we wait until an official release of munki before merging into cpe_munki?
The text was updated successfully, but these errors were encountered: