Chapter 6. Red Hat Network Website
107
6.6.6.6.4. Configuration File Details
&
Copy —
A list of configuration channels that may receive a copy of the file. To copy the file to a channel, select
the channel’s checkbox, and click the
Copy File
button.
•
Copy to Config Channel
— Displays the global config channels for your organization. To copy
the latest revision of this file to channels, select the appropriate checkboxes, and click the
Copy
File
button.
•
Copy to System
— Displays the system-specific config channels for your organization. To copy
the latest revision of this file to channels, select the appropriate checkboxes, and click the
Copy
File
button.
6.6.6.7. Including Macros in your Configuration Files
Being able to store and share identical configurations is useful, but what if you have many variations
of the same configuration file? What do you do if you have configuration files that differ only in
system-specific details, such as hostname and MAC address?
In traditional file management, you would be required to upload and distribute each file separately,
even if the distinction is nominal and the number of variations is in the hundreds or thousands. RHN
addresses this by allowing the inclusion of macros, or variables, within the configuration files it man-
ages for Provisioning-entitled systems. In addition to variables for custom system information, the
following standard macros are supported:
•
rhn.system.sid
•
rhn.system.profile_name
•
rhn.system.description
•
rhn.system.hostname
•
rhn.system.ip_address
•
rhn.system.custom_info(key_name)
•
rhn.system.net_interface.ip_address(eth_device)
•
rhn.system.net_interface.netmask(eth_device)
•
rhn.system.net_interface.broadcast(eth_device)
•
rhn.system.net_interface.hardware_address(eth_device)
•
rhn.system.net_interface.driver_module(eth_device)
To use this powerful feature, either upload or create a configuration file through the
Configuration
Channel Details
page. Then, open its
Configuration File Details
page and include the supported
macros of your choosing. Ensure the delimiters used to offset your variables match those set in the
Macro Start Delimiter
and
Macro End Delimiter
fields and do not conflict with other characters in
the file. The delimiters must be two characters and cannot contain the percent (%) symbol.
As an example, you may have a file applicable to all of your servers that differs only in IP address and
hostname. Rather than manage a separate configuration file for each server, you may create a single
file, say
server.conf
, with the IP address and hostname macros included, like so:
hostname={@ rhn.system.hostname @}
ip_address={@ rhn.system.net_interface.ip_address(eth0) @}
Upon delivery of the file to individual systems, whether through a scheduled action in the RHN web-
site or at the command line with the
Red Hat Network Configuration Client
(
rhncfg-client
),
Содержание NETWORK 3.6 -
Страница 1: ...Red Hat Network 3 6 Reference Guide ...
Страница 8: ......
Страница 54: ...42 Chapter 4 Red Hat Network Alert Notification Tool ...
Страница 68: ...56 Chapter 5 Red Hat Network Registration Client ...
Страница 130: ...118 Chapter 6 Red Hat Network Website ...
Страница 138: ...126 Appendix A Command Line Config Management Tools ...
Страница 142: ...130 Appendix B RHN API Access ...
Страница 186: ...174 Appendix C Probes ...
Страница 192: ...180 Glossary ...