summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-13 12:35:50 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-13 12:35:50 -0400
commita551cb080388c2016bcf23981f99a4a6aa0fe198 (patch)
tree0b554024b3b96712bec2a93c7dd9ac8bf7a5777c /cloudinit/config
parentac50733f77fef296e4af46aa55311a295e964136 (diff)
downloadvyos-cloud-init-a551cb080388c2016bcf23981f99a4a6aa0fe198.tar.gz
vyos-cloud-init-a551cb080388c2016bcf23981f99a4a6aa0fe198.zip
phone_home: allow usage of fqdn
This simply allows the phone_home template to pass the systems fully qualified domain name. LP: #1566824
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_phone_home.py7
1 files changed, 5 insertions, 2 deletions
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',