1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
cc_phone_home:
description: |
This module can be used to post data to a remote host after boot is
complete.
Either all data can be posted, or a list of keys to post.
Available keys are:
- ``pub_key_rsa``
- ``pub_key_ecdsa``
- ``pub_key_ed25519``
- ``instance_id``
- ``hostname``
- ``fdqn``
Data is sent as ``x-www-form-urlencoded`` arguments.
**Example HTTP POST**:
.. code-block:: http
POST / HTTP/1.1
Content-Length: 1337
User-Agent: Cloud-Init/21.4
Accept-Encoding: gzip, deflate
Accept: */*
Content-Type: application/x-www-form-urlencoded
pub_key_rsa=rsa_contents&pub_key_ecdsa=ecdsa_contents&pub_key_ed25519=ed25519_contents&instance_id=i-87018aed&hostname=myhost&fqdn=myhost.internal
.. warning::
Use of ``INSTANCE_ID`` variable within this module is deprecated.
Use :ref:`jinja templates<user_data_formats-jinja>` with
:ref:`v1.instance_id<v1_instance_id>` instead.
examples:
- comment: |
Example 1:
file: cc_phone_home/example1.yaml
- comment: |
Example 2:
file: cc_phone_home/example2.yaml
name: Phone Home
title: Post data to URL
|