NCM::Component::hostsfile - schema¶
Types¶
- /software/components/hostsfile/hostsfile_entry
- /software/components/hostsfile/hostsfile_entry/ipaddr
Description: The IP address of the host.
Required
Type: type_ip
- /software/components/hostsfile/hostsfile_entry/aliases
Description: A string value of aliases. Multiple aliases should be whitespace separated.
Optional
Type: string_trimmed
- /software/components/hostsfile/hostsfile_entry/comment
Description: A comment to append to the line within /etc/hosts.
Optional
Type: string_trimmed
- /software/components/hostsfile/component_hostsfile_type
Description: Example - configuration defined like this: include ‘software/components/hostsfile’; “/software/components/hostsfile/active” = true; “/software/components/hostsfile/file” = “/etc/hosts.local”; “/software/components/hostsfile/entries” = dict ( “tsmstor601.cern.ch”, dict( “ipaddr”, “192.168.1.101”, “comment”, “TSM DB disks”), “tsmstor602.cern.ch”, dict( “ipaddr”, “192.168.1.102”, “comment”, “TSM Staging disks”), ); will modify the /etc/hosts.local file from: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 137.138.45.75 lxfsec1604.cern.ch to: # Generated by Quattor component hostsfile # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 137.138.45.75 lxfsec1604.cern.ch 192.168.1.101 tsmstor601.cern.ch tsmstor601 # NCM TSM DB disks 192.168.1.101 tsmstor602.cern.ch tsmstor602 # NCM TSM Staging disks The syntax below is also possible: “/software/components/hostsfile/entries/tsmstor603” = dict( “ipaddr”, “192.168.1.103”, “comment”, “TSM more disks” ); or: “/software/components/hostsfile/entries/tsmstor603/ipaddr” = “192.168.1.103”; “/software/components/hostsfile/entries/tsmstor603/comment” = “Testing”;
- /software/components/hostsfile/component_hostsfile_type/file
Description: The filename to modify, defaults to /etc/hosts.
Optional
Type: string
- /software/components/hostsfile/component_hostsfile_type/entries
Description: A dict, keyed by hostname.
Required
Type: hostsfile_entry
- /software/components/hostsfile/component_hostsfile_type/takeover
Description: A boolean. If false (the default), then pre-existing host lines in the file which are not tagged with the “NCM” comment will be preserved. If takeover is true, then pre-existing entries for hosts will be taken over and declared to be under NCM control.
Required
Type: boolean
Default value: false