From 09519cfbc241b3a61334dc2a12fd9a84e97cf660 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 27 Nov 2022 12:07:51 +0100 Subject: [PATCH] Fixed comments in cloud-init's examples --- cloud-init/base.yaml | 22 ++++++++++++---------- cloud-init/docker.yum.yaml | 21 +++++++++++++-------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/cloud-init/base.yaml b/cloud-init/base.yaml index 2698f1c..6a5e257 100644 --- a/cloud-init/base.yaml +++ b/cloud-init/base.yaml @@ -1,19 +1,21 @@ #cloud-config +# Upgrade the instance. +# Deactivated, as this could take a long time if the image is old. +# # Sources: -# - https://github.com/trajano/terraform-docker-swarm-aws/blob/master/common.cloud-config - -# Upgrade the instance -# Deactivated as this could take a long time if the image is old -# https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install -# https://cloudinit.readthedocs.io/en/latest/topics/examples.html#run-apt-or-yum-upgrade +# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install +# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#run-apt-or-yum-upgrade package_upgrade: false package_reboot_if_required: false -# Install required packages -# This will always update the list of packages, regardless of package_update's value. -# https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install -# https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-arbitrary-packages +# Install required packages. +# This will *always* update the list of packages, regardless of the value of the +# 'package_update' setting. +# +# Sources: +# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install +# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-arbitrary-packages packages: - jq - nc diff --git a/cloud-init/docker.yum.yaml b/cloud-init/docker.yum.yaml index d905425..6816bce 100644 --- a/cloud-init/docker.yum.yaml +++ b/cloud-init/docker.yum.yaml @@ -3,9 +3,7 @@ # Sources: # - https://github.com/trajano/terraform-docker-swarm-aws/blob/master/common.cloud-config -# Add the Docker repository -# https://cloudinit.readthedocs.io/en/latest/topics/modules.html#yum-add-repo -# https://cloudinit.readthedocs.io/en/latest/topics/examples.html#adding-a-yum-repository +# Add the official Docker repository. # # Got from the official installation guide at # https://docs.docker.com/engine/install/rhel/#install-using-the-repository : @@ -13,6 +11,10 @@ # yum-config-manager --add-repo \ # https://download.docker.com/linux/rhel/docker-ce.repo && \ # cat /etc/yum.repos.d/docker-ce.repo +# +# Sources: +# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#yum-add-repo +# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#adding-a-yum-repository yum_repos: docker-ce: name: Docker CE Stable - $basearch @@ -22,12 +24,15 @@ yum_repos: gpgcheck: true gpgkey: https://download.docker.com/linux/rhel/gpg -# Install required packages -# This will always update the list of packages, regardless of package_update's value. -# https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install -# https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-arbitrary-packages +# Install required packages. +# This will *always* update the list of packages, regardless of the value of the +# 'package_update' setting. # -# docker-ce already depends on docker-ce-cli and containerd.io +# docker-ce already depends on 'docker-ce-cli' and 'containerd.io' +# +# Sources: +# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install +# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-arbitrary-packages packages: - docker-ce