Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:spacecmd_spacewalk_cmd_line [2015/10/29 14:48] billdozor |
linux_wiki:spacecmd_spacewalk_cmd_line [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
**General Information** | **General Information** | ||
- | Spacewalk provides centralized management of Red Hat systems. | + | Spacewalk provides centralized management of Red Hat systems. |
+ | * Official Site: https:// | ||
+ | * Local Wiki Page: [[linux_wiki: | ||
Spacecmd is the command line interface to the server and is much faster than logging into the web portal. | Spacecmd is the command line interface to the server and is much faster than logging into the web portal. | ||
**Checklist** | **Checklist** | ||
- | * Spacewalk server setup | + | * Distro(s): Enterprise Linux |
- | * Spacewalk user account created | + | * Other: [[https:// |
+ | * Other: | ||
---- | ---- | ||
Line 28: | Line 32: | ||
Create the file ~/ | Create the file ~/ | ||
<code bash> | <code bash> | ||
+ | mkdir ~/.spacecmd | ||
+ | chmod 700 ~/.spacecmd | ||
+ | touch ~/ | ||
+ | chmod 600 ~/ | ||
+ | </ | ||
+ | |||
+ | Edit the file | ||
+ | <code bash> | ||
+ | vim ~/ | ||
+ | |||
[spacecmd] | [spacecmd] | ||
server=spacewalkserver.mydomain.com | server=spacewalkserver.mydomain.com | ||
username=usernamehere | username=usernamehere | ||
password=passwordhere | password=passwordhere | ||
+ | </ | ||
+ | |||
+ | Verify configuration by testing connectivity | ||
+ | <code bash> | ||
+ | spacecmd | ||
</ | </ | ||
Line 62: | Line 81: | ||
List system groups | List system groups | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd group_list |
</ | </ | ||
List systems in a group | List systems in a group | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd group_listsystems < |
</ | </ | ||
Add systems to a group (SYSTEMS space separated) | Add systems to a group (SYSTEMS space separated) | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd group_addsystems < |
</ | </ | ||
Remove systems from a group (SYSTEMS space separated) | Remove systems from a group (SYSTEMS space separated) | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd group_removesystems < |
</ | </ | ||
Line 84: | Line 103: | ||
List all systems (good for piping to grep) | List all systems (good for piping to grep) | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_list |
</ | </ | ||
Delete system(s) from Spacewalk (SYSTEMS space separated) | Delete system(s) from Spacewalk (SYSTEMS space separated) | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_delete < |
</ | </ | ||
List a System' | List a System' | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_listbasechannel < |
</ | </ | ||
List a System' | List a System' | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_listchildchannels < |
</ | </ | ||
Set an entire group' | Set an entire group' | ||
<code bash> | <code bash> | ||
- | spacecmd -qy system_setbasechannel group:< | + | spacecmd -y system_setbasechannel group:< |
</ | </ | ||
List systems in a group and all errata except kernel: | List systems in a group and all errata except kernel: | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_listerrata group:< |
</ | </ | ||
Errata install command: | Errata install command: | ||
<code bash> | <code bash> | ||
- | spacecmd -qy system_applyerrata group:< | + | spacecmd -y system_applyerrata group:< |
</ | </ | ||
List installed packages, grep for glibc: | List installed packages, grep for glibc: | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd system_listinstalledpackages < |
</ | </ | ||
Line 128: | Line 147: | ||
Systems Not in Any Group | Systems Not in Any Group | ||
<code bash> | <code bash> | ||
- | spacecmd | + | spacecmd report_ungroupedsystems |
</ | </ | ||
- | Query Ungrouped | + | Systems |
<code bash> | <code bash> | ||
- | for NODE in $(spacecmd | + | spacecmd |
- | do echo " | + | |
- | spacecmd -q group_addsystems NOGROUP $NODE | + | |
- | done 2>/ | + | |
</ | </ | ||
- | Systems Not Checking In and Last Checkin Time | + | ---- |
- | <code bash> | + | |
- | spacecmd | + | |
- | </ | + |