incalculable-dream-27508
08/12/2020, 6:22 PMuser_data
as follows:
#cloud-config
fqdn: host.name.goes.here
which is simple enough... But I want to create multiple machines, and I have considerably more in user_data
. So far I'm defining PROVISION
which holds the string with a bunch of data, with the intention of using it in mine
INSTANCES = {
i: openstack.compute.Instance(f'instance-{i + 1}.test.instance',
flavor_name="1C-1G-20G",
image_name="Debian-Buster-amd64",
key_pair="my_key",
networks=[{
'name': 'test-net',
'accessNetwork': 'true'
}],
user_data=PROVISION,
security_groups=SECGROUPS_TEST)
for i in range(INSTANCE_COUNT)
}
Any suggestions how I can set / inject / template in PROVISION
passed here fqdn: instance-{i + 1}.test.instance
?