Configuration Management Automation Tool – Ansible
Let’s learn how to automate various environments (Linux🐧, Windows📱, and network📶 systems) with Ansible. 🥇 This allows you to manage various systems consistently using Ansible. We’ll also explore how to enhance🧑🔧 the Ansible code you write—in other words, how to write code that runs more effectively and quickly🏃.
786 learners
Level Basic
Course period Unlimited
[Update] Revised Lab Code Due to Vagrant Service Discontinuation and CentOS 7 Repository Issues
Hello.
Two changes affecting the practice environment have occurred, so I’ve updated the three practice code repositories (_Lecture_Ansible.adv, _Lecture_Ansible.expert, and _Lecture_Ansible.Update1).
The first change is the shutdown of the HCP Vagrant service. Until now, if you simply specified a box name in the Vagrantfile, Vagrant would find and download the box from HCP Vagrant (formerly Vagrant Cloud). However, the service will shut down on December 31, 2026, and all registered boxes will be removed. After that, if you try to download a box for the first time, vagrant up will fail if your Vagrantfile only specifies the box name. So I moved the boxes elsewhere and added their new addresses to each Vagrantfile. This course also uses boxes I don’t manage myself (centos/7, ubuntu/trusty64), so I moved those too to a location where the same files as before can be downloaded. For example, for the centos/7 box, the line I added is as follows.
cfg.vm.box_url = "https://box.kuberneteslab.dev/centos/7"The second issue is the CentOS 7 repositories. In July 2024, we explained how to change the repository address to vault.centos.org, but on November 3, 2026, yum failed because vault.centos.org blocked some files, until they became available for download again the next day. So we created a script for configuring CentOS 7 repositories (vault_repo_4_CentOS.sh) that lists four mirrors containing the same archived files (Kakao, vault.centos.org, kernel.org, and Japan’s IIJ) and falls back to another mirror if one is unavailable. We also made this script run first when creating a CentOS VM.
Changes Made Together
Lesson on installing nginx
In [Application] Managing CentOS, Managing Ubuntu, and Managing Windows, as well as the corresponding lesson in [Advanced], I changed the URL for
get_url(win_get_urlon Windows) fromhttps://www.nginx.comin the video tohttp://nginx.org. This is because accessing www.nginx.com now redirects to another site (www.f5.com), which changes the name of the downloaded file, and the download fails on Ubuntu 14.04 nodes because the HTTPS connection is interrupted. If you are following along and entering it yourself while watching the video, please usehttp://nginx.org.[Advanced] Managing Windows
The original box (
sysnet4admin/Windows2016) is no longer available after HCP Vagrant was discontinued, so the Windows node’s box has been replaced withsysnet4admin/Windows2019(Windows Server 2019 Core evaluation version, without a GUI). Since the lessons use WinRM without a GUI, you can follow along using the same methods shown in the videos. However, for the nginx lesson, you’ll need to install Chocolatey 1.4.0 first. Please also note that this is an evaluation version and is valid for 180 days.[optional#1] What's New in Ansible 2.5
If you run
yum install ansibleon CentOS 7 now, Ansible will not be installed on the 2.4 server (ansible-server24), while version 2.9 will be installed on the 2.5 server (ansible-server25), causing some exercises to fail. Therefore, the versions are pinned so that 2.4 (2.4.2) and 2.5 (the final 2.5 release, 2.5.15) are installed, as in the course. Also, because this exercise retrieves the switch’s SSH key when creating the server, it is best to start the switch before starting the server. If you started the server first, runssh-keyscan <스위치 IP> >> ~/.ssh/known_hostson the server before doing the exercise.[optional#2] Setting Up an NX-OSv Lab for Network Exercises
After checking in VirtualBox 7.2, I found that NX-OSv 9 would not boot, so I changed the serial port setting to
--uart1 0x3F8 4. I also addedno shto the switch configuration commands to enable the interface. In addition, there was a configuration line that preventedvagrant upfrom starting if the vagrant-vbguest plugin was not installed, so I removed that line as well. The new address downloads version 9.2.3 of the NX-OSv 9 box, and I confirmed that the lab exercises work with this version. Since 9.2.3 uses more memory than the previously downloaded 9.3.5 (8 GB instead of 6 GB), I recommend running one switch at a time on PCs with 16 GB of memory. As before, you need to be connected to the serial pipe using PuTTY or a similar program while the switch is booting.
What to check
1. If you have already downloaded the repository
You can get the updated code with git pull. If you downloaded it as a ZIP file, please download it again.
2. If you are writing the Vagrantfile yourself
In the repository’s Vagrantfile, add both the box_url line and the line that runs vault_repo_4_CentOS.sh. This script must be in the same folder as the Vagrantfile, so be sure to copy the script file as well.
3. If you have already downloaded the box
You can continue using the boxes shown by vagrant box list. However, after December 31, you may see a warning that box updates could not be checked when you run vagrant up. It’s just a warning, and you can continue with the exercises. Since the Windows node’s box has changed, you’ll need to download the Windows2019 box.
Details about the Windows box and [optional#1] what’s new in Ansible 2.5 are documented in the README files of their respective repositories. We’ve also summarized on our blog where we moved the box and why we chose that location, so please take a look.
https://kuberneteslab.dev/ko/blog/vagrant-box-migration/
Thank you.
Best regards, Jo Hoon




