10.4.3 Working with Configuration Channels Using spacecmd

To create a configuration channel, use the configchannel_create command.

spacecmd {SSM:0}> configchannel_create
Name: Oracle Linux 6 Server Configuration
Label: ol6-server-config
Description: Generic configuration channel for Oracle Linux 6 servers

To add a configuration file to a channel, use the configchannel_addfile command.

spacecmd {SSM:0}> configchannel_addfile ol6-server-config
Path: /etc/motd
Symlink [y/N]: N
Directory [y/N]: N
Owner [root]: [Enter]
Group [root]: [Enter]
Mode [0644]: [Enter]
SELinux Context [None]: [Enter]
Revision [next]: [Enter]
Read an existing file [y/N]: y
File: /var/config_file_templates/ol6-server/etc/motd
Path:            /etc/motd
Directory:       False
Owner:           root
Group:           root
Mode:            0644
SELinux Context: 

Contents
--------
System Information
==================
Client system: {|rhn.system.hostname|}
Spacewalk SID: {|rhn.system.sid|}
Asset tag:     {|rhn.system.custom_info(asset_tag) = 'Asset tag missing'|}
Profile:       {|rhn.system.profile_name|}
Description:   {|rhn.system.description|}
IP address:    {|rhn.system.ip_address(eth0)|}
MAC address:   {|rhn.system.net_interface.hardware_address(eth0)|}

Is this ok [y/N]: y

The custom macro rhn.system.custom_info substitutes the value of the custom system information key named asset_tag as assigned on the Custom Info tab for the system. Otherwise, it inserts the value Asset tag missing.

See Section 10.4.4, “Defining Custom Information Keys Using spacecmd”.

See Appendix C, Configuration File Macros.

To display the details of a configuration channel, use the configchannel_details command.

spacecmd {SSM:0}> configchannel_details ol6-server-config
Label:       ol6-server-config
Name:        Oracle Linux 6 Server Configuration
Description: Configuration channel for generic Oracle Linux 6 servers

Files
-----
/etc/motd