Skip to content
Snippets Groups Projects
Verified Commit e82d5cc8 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

install_arch: Only do hcloud-init stuff if this is an hcloud machine

This used to also needlessly and confusingly run on non-cloud boxes.
parent e06a7c08
No related branches found
No related tags found
No related merge requests found
......@@ -194,9 +194,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"
- 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"
- 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"
- name: provide default mount options (btrfs)
lineinfile:
......@@ -218,7 +226,7 @@
changed_when: "chroot_grub_mkconfig.rc == 0"
- name: enable services inside chroot
command: chroot /mnt systemctl enable sshd systemd-networkd systemd-resolved fstrim.timer hcloud-init
command: chroot /mnt systemctl enable sshd systemd-networkd systemd-resolved fstrim.timer
register: chroot_systemd_services
changed_when: "chroot_systemd_services.rc == 0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment