From ee4c9fe127db8090b4ef89eb87da9e05583bfbb8 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:44:33 +0200 Subject: [PATCH] Update autoinstall format to --- .github/workflows/validate_autoinstall.yml | 4 ++-- .yamllint | 6 ++++++ iso/preseeds/ubuntu/autoinstall.yaml | 5 +++-- iso/preseeds/ubuntu/autoinstall_unattended.yaml | 8 +++++--- 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .yamllint diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index 5fadb0f..fbdda32 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -20,10 +20,10 @@ jobs: pip install check-jsonschema yamllint yq - name: Lint attended autoinstall.yaml - run: yamllint iso/preseeds/ubuntu/autoinstall.yaml + run: yamllint -c .yamllint iso/preseeds/ubuntu/autoinstall.yaml - name: Lint unattended autoinstall.yaml - run: yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml + run: yamllint -c .yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml - name: Download JSON schema run: curl -o schema.json https://raw.githubusercontent.com/canonical/subiquity/main/autoinstall-schema.json diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..c9b624e --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +# .yamllint +extends: default + +rules: + line-length: + max: 150 \ No newline at end of file diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 0e7bbd6..658698d 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -1,4 +1,5 @@ -#cloud-config +# cloud-config +--- autoinstall: version: 1 interactive-sections: @@ -26,5 +27,5 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index 71a2ce7..bb43891 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -1,4 +1,5 @@ -#cloud-config +# cloud-config +--- autoinstall: version: 1 @@ -28,6 +29,7 @@ autoinstall: - intel-microcode - iucode-tool - iptables + timezone: UTC late-commands: @@ -37,6 +39,6 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" -# TODO: Handle /etc/network/interfaces and /etc/network/devhotplug \ No newline at end of file + # TODO: Handle /etc/network/interfaces and /etc/network/devhotplug