From b79674a8cafd46271e65a3d130a8ca8259427971 Mon Sep 17 00:00:00 2001 From: Richard Cheney Date: Thu, 10 Mar 2022 15:53:23 +0000 Subject: [PATCH] Improved apt.conf --- cloud_init.yaml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/cloud_init.yaml b/cloud_init.yaml index 0793f42..c82671a 100644 --- a/cloud_init.yaml +++ b/cloud_init.yaml @@ -11,7 +11,8 @@ # sudo cat /var/lib/cloud/instance/scripts/runcmd # Cloud-init output: -# cat /var/log/cloud-init-output.log +# sudo cat /var/log/cloud-init-output.log +# less /var/log/cloud-init.log # APT config to avoid lock error # Reading package lists... @@ -23,8 +24,15 @@ apt: conf: | - Acquire::Retries "60"; - DPkg::Lock::Timeout "60"; + Acquire { + Retries "60"; + }; + + DPkg { + Lock { + Timeout "60"; + }; + }; sources: azure-cli: @@ -124,12 +132,6 @@ packages: package_upgrade: true -runcmd: - - echo "Starting runcmds at $(date +%H:%M:%S)" - - git config --system init.defaultBranch main - - git config --list - - echo "Finished runcmds at $(date +%H:%M:%S)" - write_files: - content: | @@ -139,4 +141,10 @@ write_files: append: true path: /etc/skel/.bashrc +runcmd: + - echo "Starting runcmd at $(date +%H:%M:%S)" + - /usr/bin/git config --system init.defaultBranch main + - /usr/bin/git config --list + - echo "Finished runcmd at $(date +%H:%M:%S)" + final_message: "The system is finally up, after $UPTIME seconds"