xolo-admin 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/client/xolo +13 -1
- data/lib/xolo/admin/options.rb +20 -11
- data/lib/xolo/admin/processing.rb +35 -1
- data/lib/xolo/admin/title.rb +9 -0
- data/lib/xolo/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c667de0cc034e593ed21097a61d356497d18be62c6efa84d681459138457e5c
|
|
4
|
+
data.tar.gz: 28c33bd6e5eeb50864a7faca5342381a7929354c7eb052d62e6efa377c14ef08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1af30205a20f66da58d657c716a2de2d6fe7da54f3745add8b68df80929ab2e6aa8dd72a68e1e2d72a009e03c6c48c276f1bd9fbaa3d6b18ba92fe5d7c21dbbc
|
|
7
|
+
data.tar.gz: 1ac20c8dee5bc4aedab29c39aa405788edf80f43cf1de8843e960220cf4024436ca2ed2f26e9b41e8a76203f5a76de2cdf5b9dedb8234ce1cc7c9b3510d7a069
|
data/data/client/xolo
CHANGED
|
@@ -97,6 +97,7 @@ be_verbose=
|
|
|
97
97
|
debugging_on=
|
|
98
98
|
no_versions=
|
|
99
99
|
show_xolo_version=
|
|
100
|
+
do_recon=
|
|
100
101
|
|
|
101
102
|
# arguments
|
|
102
103
|
command=
|
|
@@ -155,7 +156,9 @@ Options:
|
|
|
155
156
|
policies, etc, from test xolo server, not the production server.
|
|
156
157
|
Setting the XOLO_TEST_MODE env. variable does the same thing.
|
|
157
158
|
-r, --recon: With 'install' or 'uninstall' run a 'jamf recon' after the
|
|
158
|
-
operation completes successfully.
|
|
159
|
+
operation completes successfully. With 'update', run a 'jamf recon'
|
|
160
|
+
before the checkin. NOTE: With update, the whole process may take
|
|
161
|
+
many minutes.
|
|
159
162
|
-n, --no-versions: With the 'list-titles' and 'list-installed' commands,
|
|
160
163
|
do not show the versions available, or the version
|
|
161
164
|
installed, respectively.
|
|
@@ -190,6 +193,9 @@ Commands:
|
|
|
190
193
|
every time this computer checks in with Jamf Pro.
|
|
191
194
|
Note: this just runs the 'jamf policy' command, which will execute any pending
|
|
192
195
|
Jamf policies triggered by "recurring check-in".
|
|
196
|
+
If --recon is given, a Jamf recon will run first, followed by a 1 minute pause
|
|
197
|
+
for Jamf to process the data before doing the check-in. This helps the Mac to see
|
|
198
|
+
very recently-released versions as patch updates.
|
|
193
199
|
|
|
194
200
|
refresh, r
|
|
195
201
|
Update xolo's information about current titles and versions.
|
|
@@ -1035,6 +1041,12 @@ function run_recon() {
|
|
|
1035
1041
|
function update() {
|
|
1036
1042
|
say "Updating installed titles, or installing newly scoped ones..."
|
|
1037
1043
|
|
|
1044
|
+
if [[ -n "$do_recon" ]] ; then
|
|
1045
|
+
run_recon
|
|
1046
|
+
say "Pausing to let Jamf Pro process recon data..."
|
|
1047
|
+
sleep 60
|
|
1048
|
+
fi
|
|
1049
|
+
|
|
1038
1050
|
debug "Running jamf policy..."
|
|
1039
1051
|
if be_verbose ; then
|
|
1040
1052
|
$JAMF policy -verbose
|
data/lib/xolo/admin/options.rb
CHANGED
|
@@ -158,6 +158,7 @@ module Xolo
|
|
|
158
158
|
FREEZE_TITLE_CMD = 'freeze'
|
|
159
159
|
THAW_TITLE_CMD = 'thaw'
|
|
160
160
|
LIST_FROZEN_CMD = 'list-frozen'
|
|
161
|
+
RERUN_AUTOPKG_RECIPE_CMD = 'rerun-autopkg-recipe'
|
|
161
162
|
|
|
162
163
|
LIST_VERSIONS_CMD = 'list-versions'
|
|
163
164
|
ADD_VERSION_CMD = 'add-version'
|
|
@@ -382,6 +383,10 @@ module Xolo
|
|
|
382
383
|
}
|
|
383
384
|
}.freeze
|
|
384
385
|
|
|
386
|
+
DEPLOY_RELEASED = 'released'
|
|
387
|
+
DEPLOY_LATEST = 'latest'
|
|
388
|
+
DEPLOY_SPECIAL_VERSIONS = [DEPLOY_RELEASED, DEPLOY_LATEST].freeze
|
|
389
|
+
|
|
385
390
|
DEPLOY_VERSION_OPTIONS = {
|
|
386
391
|
groups: {
|
|
387
392
|
label: 'Computer group whose computers will be targeted',
|
|
@@ -518,17 +523,6 @@ module Xolo
|
|
|
518
523
|
confirmation: true
|
|
519
524
|
},
|
|
520
525
|
|
|
521
|
-
# SUBSCRIBE_CMD => {
|
|
522
|
-
# desc: 'Subscribe to a software title from a Patch Source defined in Jamf Pro',
|
|
523
|
-
# display: "#{SUBSCRIBE_CMD} title",
|
|
524
|
-
# opts: Xolo::Admin::Title.subscribe_cli_opts,
|
|
525
|
-
# walkthru_header: "Subscribing to Xolo Title '#{TARGET_TITLE_PLACEHOLDER}'",
|
|
526
|
-
# target: :title,
|
|
527
|
-
# process_method: :subscribe_title,
|
|
528
|
-
# streamed_response: true,
|
|
529
|
-
# confirmation: true
|
|
530
|
-
# },
|
|
531
|
-
|
|
532
526
|
EDIT_TITLE_CMD => {
|
|
533
527
|
desc: 'Edit an exising software title',
|
|
534
528
|
display: "#{EDIT_TITLE_CMD} title",
|
|
@@ -605,6 +599,19 @@ module Xolo
|
|
|
605
599
|
process_method: :list_versions
|
|
606
600
|
},
|
|
607
601
|
|
|
602
|
+
RERUN_AUTOPKG_RECIPE_CMD => {
|
|
603
|
+
desc: 'Run the AutoPkg recipe for this title again, and re-upload the new pkg.',
|
|
604
|
+
display: "#{RERUN_AUTOPKG_RECIPE_CMD} title",
|
|
605
|
+
long_desc: <<~ENDLONG,
|
|
606
|
+
The recipe will be run immediately, and the resulting .pkg will be re-uploaded for the latest version of the title.
|
|
607
|
+
ENDLONG
|
|
608
|
+
opts: {},
|
|
609
|
+
target: :title,
|
|
610
|
+
process_method: :rerun_autopkg_recipe,
|
|
611
|
+
streamed_response: true,
|
|
612
|
+
confirmation: true
|
|
613
|
+
},
|
|
614
|
+
|
|
608
615
|
ADD_VERSION_CMD => {
|
|
609
616
|
desc: 'Add a new version to a title, making it available for piloting',
|
|
610
617
|
display: "#{ADD_VERSION_CMD} title version",
|
|
@@ -667,6 +674,8 @@ module Xolo
|
|
|
667
674
|
Computers in any excluded-groups for the target will be removed from the list of targets
|
|
668
675
|
before the MDM command is sent.
|
|
669
676
|
|
|
677
|
+
You can use the words '#{DEPLOY_RELEASED}' or '#{DEPLOY_LATEST}' as the version, or a specific one.
|
|
678
|
+
|
|
670
679
|
Computers can be specified by name, serial number, or Jamf ID. Groups can be specified by
|
|
671
680
|
name.
|
|
672
681
|
|
|
@@ -513,6 +513,24 @@ module Xolo
|
|
|
513
513
|
handle_processing_error e
|
|
514
514
|
end
|
|
515
515
|
|
|
516
|
+
# Re run the autopkg recipe
|
|
517
|
+
################################
|
|
518
|
+
def rerun_autopkg_recipe
|
|
519
|
+
return unless confirmed? "Re-run the AutoPkg recipe for '#{cli_cmd.title}' and re-upload the new pkg"
|
|
520
|
+
|
|
521
|
+
title = Xolo::Admin::Title.fetch cli_cmd.title, server_cnx
|
|
522
|
+
|
|
523
|
+
response_data = title.rerun_autopkg_recipe server_cnx
|
|
524
|
+
|
|
525
|
+
show_debug "response_data: #{response_data}"
|
|
526
|
+
|
|
527
|
+
display_progress response_data[:progress_stream_url_path]
|
|
528
|
+
|
|
529
|
+
speak "Recipe is running for '#{cli_cmd.title}'. Upload to distribution points will happen soon."
|
|
530
|
+
rescue StandardError => e
|
|
531
|
+
handle_processing_error e
|
|
532
|
+
end
|
|
533
|
+
|
|
516
534
|
# List all versions of a title in Xolo
|
|
517
535
|
#
|
|
518
536
|
# @return [void]
|
|
@@ -648,7 +666,23 @@ module Xolo
|
|
|
648
666
|
# @return [void]
|
|
649
667
|
###############################
|
|
650
668
|
def deploy_version
|
|
651
|
-
|
|
669
|
+
# If version is 'latest' or 'released', figure out the actual version to deploy
|
|
670
|
+
if Xolo::Admin::Options::DEPLOY_SPECIAL_VERSIONS.include? cli_cmd.version
|
|
671
|
+
title = Xolo::Admin::Title.fetch cli_cmd.title, server_cnx
|
|
672
|
+
vers_display =
|
|
673
|
+
case cli_cmd.version
|
|
674
|
+
when Xolo::Admin::Options::DEPLOY_RELEASED
|
|
675
|
+
cli_cmd.version = title.released_version
|
|
676
|
+
"#{cli_cmd.version} (#{Xolo::Admin::Options::DEPLOY_RELEASED})"
|
|
677
|
+
when Xolo::Admin::Options::DEPLOY_LATEST
|
|
678
|
+
cli_cmd.version = title.version_order.first
|
|
679
|
+
"#{cli_cmd.version} (#{Xolo::Admin::Options::DEPLOY_LATEST})"
|
|
680
|
+
else
|
|
681
|
+
cli_cmd.version
|
|
682
|
+
end
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
return unless confirmed? "Deploy Version '#{vers_display}' of Title '#{cli_cmd.title}' via MDM?"
|
|
652
686
|
|
|
653
687
|
unless json? || quiet?
|
|
654
688
|
puts "Deploying Version '#{cli_cmd.version}' of Title '#{cli_cmd.title}' to computers: #{ARGV.join(', ')}"
|
data/lib/xolo/admin/title.rb
CHANGED
|
@@ -216,6 +216,15 @@ module Xolo
|
|
|
216
216
|
resp.body
|
|
217
217
|
end
|
|
218
218
|
|
|
219
|
+
# Rerun the autopkg recipe for this title
|
|
220
|
+
# @param cnx [Faraday::Connection] The connection to use, must be logged in already
|
|
221
|
+
# @return [Hash] the response data
|
|
222
|
+
#########################
|
|
223
|
+
def rerun_autopkg_recipe(_nx = cnx)
|
|
224
|
+
resp = cnx.post "#{SERVER_ROUTE}/#{title}/rerun_autopkg_recipe", {}
|
|
225
|
+
resp.body
|
|
226
|
+
end
|
|
227
|
+
|
|
219
228
|
# Fetch the frozen computers for this title
|
|
220
229
|
# @param cnx [Faraday::Connection] The connection to use, must be logged in already
|
|
221
230
|
# @return [Hash{String => String}] computer name => user name
|
data/lib/xolo/core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xolo-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Lasell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|