system
- 1. system_addchildchannels
- 2. system_addconfigchannels
- 3. system_addconfigfile
- 4. system_addcustomvalue
- 5. system_addentitlements
- 6. system_addnote
- 7. system_applyerrata
- 8. system_comparepackageprofile
- 9. system_comparepackages
- 10. system_comparewithchannel
- 11. system_createpackageprofile
- 12. system_delete
- 13. system_deletenotes
- 14. system_deletepackageprofile
- 15. system_deployconfigfiles\
- 16. system_details
- 17. system_installpackage
- 18. system_list
- 19. system_listbasechannel
- 20. system_listchildchannels
- 21. system_listconfigchannels
- 22. system_listconfigfiles
- 23. system_listcustomvalues
- 24. system_listentitlements
- 25. system_listerrata
- 26. system_listevents
- 27. system_listhardware
- 28. system_listinstalledpackages
- 29. system_listnotes
- 30. system_listpackageprofiles
- 31. system_listupgrades
- 32. system_lock
- 33. system_reboot
- 34. system_removechildchannels
- 35. system_removeconfigchannels
- 36. system_removecustomvalues
- 37. system_removeentitlement
- 38. system_removepackage
- 39. system_rename
- 40. system_runscript
- 41. system_schedulehardwarerefresh
- 42. system_schedulepackagerefresh
- 43. system_search
- 44. system_setbasechannel
- 45. system_setconfigchannelorder
- 46. system_setcontactmethod
- 47. system_show_packageversion
- 48. system_syncpackages
- 49. system_updatecustomvalue
- 50. system_upgradepackage
The following spacecmd functions are available for use with systems.
1. system_addchildchannels
Add child channels to a system.
usage: system_addchildchannels <SYSTEMS> <CHANNEL ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
2. system_addconfigchannels
Add config channels to a system.
usage: system_addconfigchannels <SYSTEMS> <CHANNEL ...> [options]
options:
-t add channels to the top of the list
-b add channels to the bottom of the list
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
3. system_addconfigfile
Create a configuration file.
Note this is only for system sandbox or locally-managed files
Centrally managed files should be created via configchannel_addfile
usage: system_addconfigfile [SYSTEM] [options]
options:
-S/--sandbox : list only system-sandbox files
-L/--local : list only locally managed files
-p PATH
-r REVISION
-o OWNER [default: root]
-g GROUP [default: root]
-m MODE [defualt: 0644]
-x SELINUX_CONTEXT
-d path is a directory
-s path is a symlink
-b path is a binary (or other file which needs base64 encoding)
-t SYMLINK_TARGET
-f local path to file contents
Note re binary/base64: Some text files, notably those containing trailing
newlines, those containing ASCII escape characters (or other charaters not
allowed in XML) need to be sent as binary (-b). Some effort is made to auto-
detect files which require this, but you may need to explicitly specify.
4. system_addcustomvalue
Set a custom value for a system.
usage: system_addcustomvalue KEY VALUE <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
5. system_addentitlements
Add entitlements to a system.
usage: system_addentitlements <SYSTEMS> ENTITLEMENT
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
6. system_addnote
Set a note for a system.
usage: system_addnote <SYSTEM> [options]
options:
-s SUBJECT
-b BODY
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
7. system_applyerrata
Apply errata to a system.
usage: system_applyerrata <SYSTEMS> [ERRATA|search:XXX ...]
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
8. system_comparepackageprofile
Compare a system against a package profile.
usage: system_comparepackageprofile <SYSTEMS> PROFILE
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
9. system_comparepackages
Compare the packages between two systems.
usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM
10. system_comparewithchannel
Compare the installed packages on a system with those in the channels it is registered to, or optionally some other channel.
usage: system_comparewithchannel <SYSTEMS> [options]
options:
-c/--channel : Specific channel to compare against,
default is those subscribed to, including
child channels
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
11. system_createpackageprofile
Create a package profile.
usage: system_createpackageprofile SYSTEM [options]
options:
-n NAME
-d DESCRIPTION
12. system_delete
Delete a system profile.
usage: system_delete <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
13. system_deletenotes
Delete notes from a system.
usage: system_deletenotes <SYSTEM> <ID|*>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
14. system_deletepackageprofile
Delete a package profile.
usage: system_deletepackageprofile PROFILE
15. system_deployconfigfiles\
Deploy all configuration files for a system.
usage: system_deployconfigfiles <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
16. system_details
Show the details of a system profile.
usage: system_details <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
17. system_installpackage
Install a package on a system.
usage: system_installpackage <SYSTEMS> <PACKAGE ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
18. system_list
List all system profiles.
usage: system_list
19. system_listbasechannel
List the base channel for a system.
usage: system_listbasechannel <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
20. system_listchildchannels
List the child channels for a system.
usage: system_listchildchannels <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
21. system_listconfigchannels
List the config channels of a system.
usage: system_listconfigchannels <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
22. system_listconfigfiles
List the managed config files of a system.
usage: system_listconfigfiles <SYSTEMS>'
options:
-s/--sandbox : list only system-sandbox files
-l/--local : list only locally managed files
-c/--central : list only centrally managed files
-q/--quiet : quiet mode (omits the header)
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
23. system_listcustomvalues
List the custom values for a system.
usage: system_listcustomvalues <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
24. system_listentitlements
List the entitlements for a system.
usage: system_listentitlements <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
25. system_listerrata
List available errata for a system.
usage: system_listerrata <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
26. system_listevents
List the event history for a system.
usage: system_listevents <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
27. system_listhardware
List the hardware details of a system.
usage: system_listhardware <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
28. system_listinstalledpackages
List the installed packages on a system.
usage: system_listinstalledpackages <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
29. system_listnotes
List the available notes for a system.
usage: system_listnotes <SYSTEM>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
30. system_listpackageprofiles
List all package profiles.
usage: system_listpackageprofiles
31. system_listupgrades
List the available upgrades for a system.
usage: system_listupgrades <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
32. system_lock
Lock a system.
usage: system_lock <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
33. system_reboot
Reboot a system.
usage: system_reboot <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
34. system_removechildchannels
Remove child channels from a system.
usage: system_removechildchannels <SYSTEMS> <CHANNEL ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
35. system_removeconfigchannels
Remove config channels from a system.
usage: system_removeconfigchannels <SYSTEMS> <CHANNEL ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
36. system_removecustomvalues
Remove a custom value for a system.
usage: system_removecustomvalues <SYSTEMS> <KEY ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
37. system_removeentitlement
Remove an entitlement from a system.
usage: system_removeentitlement <SYSTEMS> ENTITLEMENT
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
38. system_removepackage
Remove a package from a system.
usage: system_removepackage <SYSTEMS> <PACKAGE ...>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
39. system_rename
Rename a system profile.
usage: system_rename OLDNAME NEWNAME
40. system_runscript
Schedule a script to run on the list of systems provided.
usage: system_runscript <SYSTEMS> [options]
options:
-u USER
-g GROUP
-t TIMEOUT
-s START_TIME
-l LABEL
-f FILE
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format. The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.
Deltas:
Dates can be expressed as delta values. For example, '2h' would
mean 2 hours in the future. You can also use negative values to
express times in the past (e.g., -7d would be one week ago).
Units:
s -> seconds
m -> minutes
h -> hours
d -> days
41. system_schedulehardwarerefresh
Schedule a hardware refresh for a system.
usage: system_schedulehardwarerefresh <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
42. system_schedulepackagerefresh
Schedule a software package refresh for a system.
usage: system_schedulepackagerefresh <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
43. system_search
List systems that match the given criteria.
usage: system_search QUERY
Available Fields:
id
name
ip
hostname
device
vendor
driver
uuid
Examples:
> system_search device:vmware
> system_search ip:192.168.82
44. system_setbasechannel
Set a system’s base software channel.
usage: system_setbasechannel <SYSTEMS> CHANNEL
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
45. system_setconfigchannelorder
Set the ranked order of configuration channels.
usage: system_setconfigchannelorder <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
46. system_setcontactmethod
Set the contact method for a given system.
Available contact methods: ['default', 'ssh-push', 'ssh-push-tunnel']
usage: system_setcontactmethod <SYSTEMS> <CONTACT_METHOD>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
47. system_show_packageversion
Shows version of installed package on a given system.
usage: system_show_packageversion <SYSTEM> <PACKAGE>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
48. system_syncpackages
Sync packages between two systems.
usage: system_syncpackages SOURCE TARGET
- system_unlock
-
Unlock a system.
usage: system_unlock <SYSTEMS> <SYSTEMS> can be any of the following: name ssm (see 'help ssm') search:QUERY (see 'help system_search') group:GROUP channel:CHANNEL
49. system_updatecustomvalue
Update a custom value for a system.
usage: system_updatecustomvalue KEY VALUE <SYSTEMS>
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
50. system_upgradepackage
Upgrade a package on a system.
usage: system_upgradepackage <SYSTEMS> <PACKAGE ...>|*
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL