bundle agent hand_edited_config_file { vars: "file_template" string => " # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # 127.0.0.1 localhost ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts 10.0.0.100 host1.domain.tld host1 10.0.0.101 host2.domain.tld host2 10.0.0.20 host3.domain.tld host3 10.0.0.21 host4.domain.tld host4 "; ############################################################## files: "/etc/hosts" comment => "Define the content of all host files from this master source", create => "true", edit_line => append_if_no_lines("$(file_template)"), edit_defaults => empty, perms => mo("$(mode)","root"), action => if_elapsed("60"); }