Skip to content

Commit

Permalink
Improved apt.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Cheney committed Mar 10, 2022
1 parent d2d1f92 commit b79674a
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions cloud_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand All @@ -23,8 +24,15 @@

apt:
conf: |
Acquire::Retries "60";
DPkg::Lock::Timeout "60";
Acquire {
Retries "60";
};
DPkg {
Lock {
Timeout "60";
};
};
sources:
azure-cli:
Expand Down Expand Up @@ -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: |
Expand All @@ -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"

0 comments on commit b79674a

Please sign in to comment.