/srv/irclogs.ubuntu.com/2023/11/12/#cloud-init.txt

=== EugenMayer5964 is now known as EugenMayer596
slawomirHi all!22:07
slawomirI have a question. Is it possible to set a hostname containing static and random part like host-13543?22:07
slawomirI'm using AWS cloud.22:07
slawomirI try constructions like: hostname: host-$(shuf -i 1000-9999 -n 1) but it is not working (hostname: "host-$(shuf -i 1000-9999 -n 1)" also does not work).22:07
slawomirI try to set a hostname via bootcmd: hostnamectl set-hostname "host-$(shuf -i 1000-9999 -n 1)" but it is impossible cause of "Failed to connect to bus: No such file or directory" -> "to early"22:07
slawomirI try to setup a hostname via runcmd but it is "to late" for manage_etc_hosts functionality and proper values are not in /etc/hosts file.22:07
slawomirMaybe you guys have an idea how to deal with this?22:07
slawomirPS. Are where other then bootcmd and runcmd configuration directives that could run some command at other stages of cloud init process?22:07

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!