i just tested it again and build a Host
The CloudInit Template is applied before the reboot, so theres the culprit
seems like i ran into the same issue as you
i had many issues setting this up also
i even created a new cloudInit Template with only the following
#cloud-config
hostname: <%= @host.name %>
fqdn: <%= @host %>
manage_etc_hosts: true
users: {}
# use runcmd to grow the VG, LV and root filesystem, as cloud-init
# doesn't handle LVM resizing natively
runcmd:
- cloud-init-per once grow_part growpart /dev/sda 3
- cloud-init-per once grow_lv lvextend -r -l +100%FREE /dev/mapper/vg_system-lv_root
- ssh-keygen -A
phone_home:
url: <%= foreman_url('built') %>
post: []
tries: 10
after that it’s contacting katello and applies all Ansible Roles which are attached to the Host Group ( after a delay )
Ansible is doing the registration and configuration