Skip main navigation

Deployment with Puppet and Configuration Management by Ansible


Deploying a virtual machine (VM) managed by Puppet and managing configuration with Ansible should be no challenge to you now that you can configure a VM with Chef.

Although the language and frameworks are different, the principle is still based on DSC.

Deploying a VM Managed by Puppet

Puppet is another open-source tool that allows you to apply DevOps Infrastructure as Code practices to manage your cloud apps.

You can install puppet via the Azure Marketplace (search for Puppet Enterprise 2016.1 Template). Then, create the template by using the Azure dashboard to set the parameters of the VM.

After you designate the parameters, a preconfigured system will run and test Puppet. Many settings will be preset but can be changed as needed. The VM will then be created and Puppet will run install scripts.

When you create a Windows Server 2012 R2 Datacentre or Windows Server 2016 VM through Azure Resource Manager, install the Puppet extension to configure a Puppet master for each VM.

You can connect hundreds of agents to one Puppet master. The Azure Resource Manager Template Visualiser tool can help you to visualise your network.

After configuring and deploying the network, you can manage it like a Puppet cluster. For more details, see the Puppet white paper: Getting Started: Deploying Puppet Enterprise in Microsoft Azure.

(Content was adapted from the Puppet site.)

Configuration Management with Ansible

Ansible is an open-source platform that automates cloud provisioning, configuration management, and app deployment, amongst other tasks.

Configuration management tools use declarative language to configure a machine or group of machines by using playbooks, and then assuring that the machines are configured correctly. Playbooks are the language of Ansible’s configurations, deployments, and orchestrations.

They can be used to manage configurations of and deployments to remote machines. Playbooks are structured with YAML (a data serialisation language) and support variables.

Ansible is designed for multitier deployments and is agent-less, unlike Puppet or Chef, so you don’t have to install any software on the managed machines. To manage Linux machines, Ansible uses Secure Shell (SSH) and, for Windows machines, remote PowerShell is used. Ansible uses modules to interact with the Azure portal. For Azure, Ansible supports dynamic inventories (it supports host inventories for other managed hosts), which means that the host inventory is dynamically generated at runtime.


(Diagram is taken from github repository of user erjosito)


The following sections describe Ansible architecture and how Ansible represents machines.

  • Modules: Small programs that are pushed out by Ansible after connecting to your nodes. They represent the desired state of the system (declarative) and are executed over SSH by default and removed when finished.

  • Plug-ins: Code that supplements Ansible’s core functionality.

  • Playbooks: Ansible uses simple orchestration methods to manage the configuration of your infrastructure. Playbooks include detailed information regarding the number of machines to configure at a time. Simplicity is the goal.

  • Inventory: Ansible represents the machines it’s managing by default with an INI file, where all of your managed machines are located in groups that you choose. When adding new machines, you don’t have to use additional Secure Sockets Layer (SSL) signing servers, thus avoiding NTP and DNS issues.

NOTE: There’s a lab at the end of this activity for Creating VMs and Configuration Management with Ansible which you can complete for further insight.

Join the discussion

In this section, we explored automation resources for IaC. Which resource would you use to deploy and manage your VMs with, and why?

Use the Discussion section below and let us know your thoughts. Try to respond to at least one other post and once you’re happy with your contribution, click the Mark as complete button to move on to the next step.

This article is from the free online

Microsoft Future Ready: DevOps Development, Implementation and Azure Automation

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now