3 options, all of which require you to have a different dsidentify config file
as you are asking for behavior different than xenial will ever have.
The behavior on xenial is
a.) configure cloud-init to have strict_id for Ec2.
This changes the return of DS_MAYBE in ec2 to be DS_NOT_FOUND.
cat > /etc/cloud/cloud.cfg.d/Ec2-nostrict.cfg <<EOF
datasource:
Ec2:
strict_id: true
EOF
The filename can also be /etc/cloud/cloud.cfg.
b.) change your ds-identify config to not allow maybe.
/etc/cloud/ds-identify.cfg should then have:
policy=search,found=first,maybe=none,notfound=disable
c.) we can explicitly allow configuration of ds-identify (ds-identify.cfg)
that would affect its default setting for strict_id. As it is, by
design i only allowed for setting that in cloud-init config files
as duplicating settings like that doesn't seem like a good idea.