templates follow dir tree

This commit is contained in:
f 2022-06-18 23:48:22 -03:00
parent cd6a30e9c4
commit aaee98f089
14 changed files with 8 additions and 8 deletions

View file

@ -1,7 +1,7 @@
---
- name: "Install syslinux bootloader"
template:
src: "templates/update-extlinux.conf.j2"
src: "templates/etc/update-extlinux.conf.j2"
dest: "/mnt/etc/update-extlinux.conf"
mode: "0644"
- name: "Install bootloader in MBR. This is how `setup-disk` does it."

View file

@ -9,7 +9,7 @@
creates: "/mnt/etc/apk/keys"
- name: "Enable repositories."
template:
src: "templates/repositories.j2"
src: "templates/etc/apk/repositories.j2"
dest: "/mnt/etc/apk/repositories"
mode: "0600"
- name: "Install packages with signature verification. Update if already present."
@ -17,14 +17,14 @@
loop: "{{ packages }}"
- name: "Tell Alpine how to mount partitions after boot."
template:
src: "templates/fstab.j2"
src: "templates/etc/fstab.j2"
dest: "/mnt/etc/fstab"
mode: "0755"
- name: "Load BTRFS module on boot"
shell: "grep -q btrfs /mnt/etc/modules || echo btrfs >> /mnt/etc/modules"
- name: "And which features to include into initramfs."
template:
src: "templates/mkinitfs.conf.j2"
src: "templates/etc/mkinitfs/mkinitfs.conf.j2"
dest: "/mnt/etc/mkinitfs/mkinitfs.conf"
mode: "0750"
- name: "Copy SSH host keys from the live system."
@ -44,11 +44,11 @@
creates: "/mnt/root/.ssh/authorized_keys"
- name: "Install network configuration."
template:
src: "templates/interfaces.j2"
src: "templates/etc/network/interfaces.j2"
dest: "/mnt/etc/network/interfaces"
- name: "And DNS resolvers."
template:
src: "templates/resolv.conf.j2"
src: "templates/etc/resolv.conf.j2"
dest: "/mnt/etc/resolv.conf"
- name: "Set hostname."
shell: "echo {{ inventory_hostname }} > /etc/hostname"

View file

@ -50,14 +50,14 @@
service: "swclock"
- name: "Install firewall rules."
template:
src: "templates/{{ item }}.j2"
src: "templates/etc/iptables/{{ item }}.j2"
dest: "/mnt/etc/iptables/{{ item }}"
loop:
- rules-save
- rules6-save
- name: "And blocklists."
template:
src: "templates/{{ item }}.j2"
src: "templates/etc/ipset.d/{{ item }}.j2"
dest: "/mnt/etc/ipset.d/{{ item }}"
loop:
- blocklist4