In AWS OpsWorks, I'm using this community hostname cookbook. To set my hostname to append a domain to it.
Original FQDN: apple-pie.localdomain
node.default["set_fqdn"] = "*.example.com"
include_recipe 'hostname'
Changes to FQDN: apple-pie.localdomain.example.com
However, after about 10 mins, the hostname goes back to the original hostname without my domain append.
I've checked the OpsWorks lifecycle:
After a new instance finishes booting, AWS OpsWorks does the following:
Runs the built-in Setup recipes.
Runs any custom Setup recipes.
Runs the built-in Deploy recipes.
Runs any custom Deploy recipes.
And I'm running the recipe in my custom Deploy recipe, so it should be the last thing that runs. No idea why/how it gets reset to the original hostname.
Thanks!