Refactored examples

This commit is contained in:
Michele Cereda
2023-01-14 12:11:10 +01:00
parent 639930bed8
commit 3e0e3d2b79
17 changed files with 2 additions and 16 deletions

View File

@@ -1,23 +0,0 @@
#cloud-config
# Upgrade the instance.
# Deactivated, as this could take a long time if the image is old.
#
# Sources:
# - 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 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
- traceroute
- unzip

View File

@@ -1,42 +0,0 @@
#cloud-config
# Sources:
# - https://github.com/trajano/terraform-docker-swarm-aws/blob/master/common.cloud-config
# Add the official Docker repository.
#
# Got from the official installation guide at
# https://docs.docker.com/engine/install/rhel/#install-using-the-repository :
# yum install -y yum-utils && \
# 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
enabled: true
baseurl: https://download.docker.com/linux/rhel/$releasever/$basearch/stable
priority: 1
gpgcheck: true
gpgkey: https://download.docker.com/linux/rhel/gpg
# 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'
#
# 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
# Enable and start the service after installation
runcmd:
- systemctl daemon-reload
- systemctl enable --now docker.service