Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Azure icon
Labs

Manage Hybrid Environments with Azure Arc

Azure Arc enables cloud-centric deployment and management capabilities for hybrid and multi-cloud servers. In this hands-on lab, you will onboard Linux servers at scale with Ansible and deploy extensions to Arc-enabled servers using Infrastructure as Code with Azure Bicep.

Azure icon
Lab platform
Lab Info
Level
Advanced
Last updated
Oct 12, 2025
Duration
1h 0m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use.
Table of Contents
  1. Challenge

    Onboard Linux Servers into Azure Arc at Scale Using Ansible
    1. Connect to LinuxVM1 using SSH.

    2. Log in to the Azure CLI from within LinuxVM1

    3. Download the Ansible playbook template by running the following command:

      wget https://raw.githubusercontent.com/pluralsight-cloud/azure-arc-hybrid-management-implementing/refs/heads/main/LAB-Manage%20hybrid%20environments%20with%20Azure%20Arc/arc-server-onboard-playbook.yaml

    4. Update the following placeholder values in the playbook: service_principal_id, service_principal_secret, resource_group, tenant_id, subscription_id, and location. The following sed commands can be used to update the resource_group, tenant_id, subscription_id, and location values:

      sed -i "s/RESOURCE-GROUP/$(az group list --query '[].name' --output tsv)/" arc-server-onboard-playbook.yaml

      sed -i "s/TENANT-ID/$(az account show --query tenantId --output tsv)/" arc-server-onboard-playbook.yaml

      sed -i "s/SUBSCRIPTION-ID/$(az account show --query id --output tsv)/" arc-server-onboard-playbook.yaml

      sed -i "s/LOCATION/$(az group list --query [].location --output tsv)/" arc-server-onboard-playbook.yaml

    5. The service_principal_id and service_principal_secret values can be updated using the provided Service Principal in the lab details.

    6. Create an inventory of target machines for the Ansible playbook:

      az vm list -d --query [].publicIps -o tsv > hosts

    7. Add the SSH host keys to the ~/.ssh/known_hosts file to establish trust:

      az vm list -d --query "[].publicIps" -o tsv | xargs -n 1 ssh-keyscan -H >> ~/.ssh/known_hosts

    8. Run the Ansible playbook:

      ansible-playbook arc-server-onboard-playbook.yaml -u cloud_user -i hosts --ask-pass

  2. Challenge

    Configure Arc-enabled Servers Using Azure Bicep
    1. Download the provided Bicep file:

      wget https://raw.githubusercontent.com/pluralsight-cloud/azure-arc-hybrid-management-implementing/refs/heads/main/LAB-Manage%20hybrid%20environments%20with%20Azure%20Arc/main.bicep

    2. Deploy the Bicep template by running the following commands:

      RG=$(az group list --query [].name --output tsv)

      az deployment group create --resource-group $RG --template-file main.bicep

  3. Challenge

    Review the Resources Created by the Bicep Template
    1. Confirm the following resources have been deployed:
    • A Data collection rule named MSVMI-VMInsights that is associated with the Arc-enabled machines named LinuxVM1 and LinuxVM2
    • Two extensions on each Arc-enabled Machine, the AzureMonitorLinuxAgent and the CustomScript extension
    • An Arc-enabled Kubernetes cluster named Arc-Cluster-LinuxVM2
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight