Configure /etc/hosts from template
None required
e.g.
Key | Type | Description | Default |
---|---|---|---|
['hosts']['file'] | string | location of published file | /etc/hosts |
['hosts']['owner'] | string | owner of hosts file | root |
['hosts']['group'] | string | group of hosts file | root |
['hosts']['mode'] | string | mode of hosts file | 0644 |
['hosts']['fqdn'] | strung | FQDN of client, defaults to chef detected | true |
['hosts']['fqdn_as_loopback'] | boolean | use FQDN in loopback entry | true |
['hosts']['fqdn_as_ipaddress'] | boolean | Use FQDN with chef ['hosts']['ipaddress'] | false |
Set attributes in roles or environments as needed.
e.g.
Include hosts
in your node's run_list
with relevant atttributes:
{
"name":"my_node",
"hosts": {
"entries": {
"127.0.0.2": "localhost2.localdoman # test for hosts cookbook",
"www.xxx.yyy.zzz": "foo.example.com foo"
}
}
"run_list": [
"recipe[hosts]"
]
}
License: Apache v2.0 Authors: Nico Kadel-Garcia nkadel@skyhookwireless.com