From c3cd4a20671b5a1313b5eb8e534fd8d1cf67db9f Mon Sep 17 00:00:00 2001 From: zsdc Date: Thu, 18 Mar 2021 17:51:00 +0200 Subject: Multiple build improvements - Removed `empty_config` option. The config should be now always empty because Cloud-init adds required parts dynamically at the first boot. - Added ability to include any additional packages to the image, from list or deb files. - Moved common resources for multiple tasks from tasks folder to `files` and `templates` on the root folder. - Make `trim` actually works. Before this, it actually was a no-op, because RAW image mounted without the `discard` option cannot be trimmed. This significantly reduced the size of images with any additional packages inside, for example with Cloud-init. - Fixed APT repository paths, according to the new structure of `dev.packages.vyos.net`. - Added proper build repository for VyOS 1.3. It used the wrong `current` repo when should be `equuleus` now. - Removed unused `boot/grub/device.map.j2` template. - Deleted a secondary console option from the `grub.cfg.j2` template. According to testing an active console is only the latest listed, so it seems that there is no sense to keep there two items. --- roles/install-config/templates/config.boot.j2 | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'roles/install-config/templates/config.boot.j2') diff --git a/roles/install-config/templates/config.boot.j2 b/roles/install-config/templates/config.boot.j2 index 30506f8..852905e 100644 --- a/roles/install-config/templates/config.boot.j2 +++ b/roles/install-config/templates/config.boot.j2 @@ -10,7 +10,9 @@ system { {% endif %} plaintext-password "" } +{% if vyos_version | regex_search('(^1\.2)') %} level admin +{% endif %} } } syslog { @@ -33,18 +35,6 @@ system { } } interfaces { -{% if cloud_init == "true" and not ( empty_config is defined and empty_config == "true" ) %} - ethernet eth0 { - address dhcp - } -{% endif %} loopback lo { } } -{% if cloud_init == "true" and not ( empty_config is defined and empty_config == "true" ) %} -service { - ssh { - port 22 - } -} -{% endif %} -- cgit v1.2.3