Ubuntu Pastebin

Paste from smoser at Wed, 1 Feb 2017 17:27:17 +0000

Download as text
 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
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/316033

In the ec2 datasource warning message I wanted to provide a way for the
user to:
 a.) indicate in system config inside the image that EC2 should be searched
     even though the instance will run somewhere that is not strictly EC2
 b.) provide user-data that changes the default from WARN (and possibly sleep)
     to not be so annoying.

It seemed like setting this in the EC2 datasource config made the most sense:
  datasource:
    Ec2:
      look_alike:
         platform: Unknown (user|GenuineAWS|AliYun)
         behavior: warn (warn|skip|accept)

The goal was to make that config work just as well if provided by user-data.  

The issue i'm having is how to handle the case where ds-identify is configured
with 'not_found_behavior: disabled'.

Thats because the above config says effectively "maybe".

I do not want to have to tell the user for in 'a' above that, depending
on the configuration of ds-identify, they might also have to do add
/etc/ds-identify.cfg:
   datasource=Ec2

Best case it seems like thats 2 places to configure something.
Download as text