From a551cb080388c2016bcf23981f99a4a6aa0fe198 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 13 Apr 2016 12:35:50 -0400 Subject: phone_home: allow usage of fqdn This simply allows the phone_home template to pass the systems fully qualified domain name. LP: #1566824 --- cloudinit/config/cc_phone_home.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_phone_home.py b/cloudinit/config/cc_phone_home.py index 18a7ddad..3dcc9459 100644 --- a/cloudinit/config/cc_phone_home.py +++ b/cloudinit/config/cc_phone_home.py @@ -30,7 +30,8 @@ POST_LIST_ALL = [ 'pub_key_rsa', 'pub_key_ecdsa', 'instance_id', - 'hostname' + 'hostname', + 'fdqn' ] @@ -41,7 +42,8 @@ POST_LIST_ALL = [ # # phone_home: # url: http://my.foo.bar/$INSTANCE_ID/ -# post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id +# post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id, hostname, +# fqdn ] # def handle(name, cfg, cloud, log, args): if len(args) != 0: @@ -74,6 +76,7 @@ def handle(name, cfg, cloud, log, args): all_keys = {} all_keys['instance_id'] = cloud.get_instance_id() all_keys['hostname'] = cloud.get_hostname() + all_keys['fqdn'] = cloud.get_hostname(fqdn=True) pubkeys = { 'pub_key_dsa': '/etc/ssh/ssh_host_dsa_key.pub', -- cgit v1.2.3