The following spacecmd functions are available for use with systems.
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
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
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.
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
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
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
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
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
Compare the packages between two systems.
usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM
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
Create a package profile.
usage: system_createpackageprofile SYSTEM [options]
options:
-n NAME
-d DESCRIPTION
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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