Verified Commit 28e1c1cb authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

install_arch: Make sure hcloud-init is installed during packer run

Apparently before if we ran a packer build to generate the arch base image, the problem was that it wouldn't pick up the fact that the machine was an hcloud server as that would only be checked after the first boot due to an ordering issue.
Now we manually make sure that packer builds (which are always on hcloud anyway) will always have the hcloud-init files installed properly.
parent b6b054ea
Pipeline #544 passed with stage
in 45 seconds
......@@ -170,17 +170,17 @@
- name: install hcloud-init
copy: src=hcloud-init dest=/mnt/usr/local/bin/hcloud-init owner=root group=root mode=0755
when: "'hcloud' in group_names"
when: "'hcloud' in group_names or inventory_hostname == 'packer-base-image'"
- name: install hcloud-init.service
copy: src=hcloud-init.service dest=/mnt/etc/systemd/system/hcloud-init.service owner=root group=root mode=0644
when: "'hcloud' in group_names"
when: "'hcloud' in group_names or inventory_hostname == 'packer-base-image'"
- name: enable hcloud-init inside chroot
command: chroot /mnt systemctl enable hcloud-init
register: chroot_systemd_services
changed_when: "chroot_systemd_services.rc == 0"
when: "'hcloud' in group_names"
when: "'hcloud' in group_names or inventory_hostname == 'packer-base-image'"
- name: provide default mount options (btrfs)
lineinfile:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment