configchannel
- 1. configchannel_addfile
- 2. configchannel_backup
- 3. configchannel_clone
- 4. configchannel_create
- 5. configchannel_delete
- 6. configchannel_details
- 7. configchannel_diff
- 8. configchannel_export
- 9. configchannel_filedetails
- 10. configchannel_forcedeploy
- 11. configchannel_import
- 12. configchannel_list
- 13. configchannel_listfiles
- 14. configchannel_listsystems
- 15. configchannel_removefiles
- 16. configchannel_sync
- 17. configchannel_updatefile
- 18. configchannel_verifyfile
The following spacecmd commands are available for use with configuration channels.
1. configchannel_addfile
Creates a configuration file.
usage: configchannel_addfile [CHANNEL] [options]
options:
-c CHANNEL
-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.
2. configchannel_backup
Backup a configuration channel.
usage: configchannel_backup CHANNEL [OUTDIR]
OUTDIR defaults to $HOME/spacecmd-backup/configchannel/YYYY-MM-DD/CHANNEL
3. configchannel_clone
Clone configuration channels.
usage examples:
configchannel_clone foo_label -c bar_label
configchannel_clone foo_label1 foo_label2 -c prefix
configchannel_clone foo_label -x "s/foo/bar"
configchannel_clone foo_label1 foo_label2 -x "s/foo/bar"
options:
-c CLONE_LABEL : name/label of the resulting cc (note does not update
description, see -x option), treated as a prefix if
multiple keys are passed
-x "s/foo/bar" : Optional regex replacement, replaces foo with bar in the
clone name, label and description
Note : If no -c or -x option is specified, interactive is assumed
4. configchannel_create
Create a configuration channel.
usage: configchannel_create [options]
options:
-n NAME
-l LABEL
-d DESCRIPTION
5. configchannel_delete
Delete a configuration channel.
사용법: configchannel_delete CHANNEL ...
6. configchannel_details
Show the details of a configuration channel.
사용법: configchannel_details CHANNEL ...
7. configchannel_diff
Find differences between configuration channels.
사용법: configchannel_diff SOURCE_CHANNEL TARGET_CHANNEL
8. configchannel_export
Export configuration channels to a json formatted file.
usage: configchannel_export <CHANNEL>... [options]
options:
-f outfile.json : specify an output filename, defaults to <CHANNEL>.json
if exporting a single channel, ccs.json for multiple
channels, or cc_all.json if no CHANNEL specified
e.g (export ALL)
Note : CHANNEL list is optional, default is to export ALL
9. configchannel_filedetails
Show the details of a file in a configuration channel.
사용법: configchannel_filedetails CHANNEL FILE [REVISION]
10. configchannel_forcedeploy
Forces a redeployment of files within a channel on all subscribed systems.
사용법: configchannel_forcedeploy CHANNEL
11. configchannel_import
Import configuration channels from a json file.
사용법: configchannel_import <JSONFILES...>
12. configchannel_list
List all configuration channels.
사용법: configchannel_list
13. configchannel_listfiles
List all files in a configuration channel.
사용법: configchannel_listfiles CHANNEL ...
14. configchannel_listsystems
List all systems subscribed to a configuration channel.
사용법: configchannel_listsystems CHANNEL
15. configchannel_removefiles
Remove configuration files.
usage: configchannel_removefile CHANNEL <FILE ...>
16. configchannel_sync
Sync configuration files between two configuration channels.
사용법: configchannel_sync SOURCE_CHANNEL TARGET_CHANNEL
17. configchannel_updatefile
Update a configuration file.
usage: configchannel_updatefile CHANNEL FILE
18. configchannel_verifyfile
Verify a configuration file.
사용법: configchannel_verifyfile CHANNEL FILE <SYSTEMS>
<SYSTEMS> may be substituted with any of the following targets: name ssm (see 'help ssm') search:QUERY (see 'help system_search') group:GROUP channel:CHANNEL