Lab automation with Ansible

Ansible is a simple but powerful automation tool that can simplify the management of lab environments in IT education and training, whether in the private or public cloud.

Ansible automates complex and/or repetitive tasks, and operations can be applied in parallel to entire suites of networked server and client machines. Tasks like operating system installation and configuration, server builds, updates, powering on/off/reboot, test machine deployments, data collection, practical lab assessments … the possibilities are almost endless.

Ansible belongs to a class of network-scale automation software that also includes offerings such as Puppet, Salt, Chef and CFEngine. It’s single biggest advantage over all these products is probably the fact that it is entirely agentless, meaning that no software at all needs to be installed on machines managed by Ansible.

All Ansible requires to manage any Unix machine (including VMWare ESX hosts) is that normal SSH infrastructure is in place. Remote agentless management of Windows machines is also supported using Windows PowerShell.

Ansible uses a simple plain text configuration layout known as YAML (YAML Ain’t Markup Language), a human-readable structured data format which enables the definition of powerful configuration settings without the need for complex configuration formats like XML or JSON.

An overview of How Ansible works.

Ansible is an open source project sponsored by RedHat and can be deployed at no cost whatsoever on CentOS Linux management machines (and no doubt many others). Although it is in wide use by leading enterprises including NASA, Juniper Networks, Cisco, HP, Rackspace and Apple, Ansible is simple enough to deploy and use that its use in Diploma and Cert IV TAFE labs is entirely feasible.

In addition to providing IT teachers and lab technicians with a powerful day-to-day management tool, Ansible could also prove very useful to students in a range of network-scale TAFE units including:

  • ICTNWK511 Manage network security
  • ICTNWK525 Configure an enterprise virtual computing environment
  • ICTNWK527 Manage an enterprise virtual computing environment
  • ICTNWK529 Install and manage complex ICT networks
  • ICTNWK533 Configure and manage advanced virtual computing environments
  • ICTNWK534 Monitor and troubleshoot virtual computing environments
  • ICTNWK535 Install an enterprise virtual computing environment

Given that all network installation and configuration options and operations are captured or accounted for, Ansible could be a valuable assessment tool. Ansible playbooks (integrated sets of instructions) can provide a plain text, human readable and 100% reproducible record of every step in a complex series of operations, and would be a very valuable addition to a student portfolio.

Ansible could also prove useful in a similar fashion for many system-scale units including for example:

  • ICTNWK501 Plan, implement and test enterprise communication solutions
  • ICTNWK504 Design and implement an integrated server solution
  • ICTNWK505 Design, build and test a network server
  • ICTNWK513 Manage system security
  • ICTNWK524 Install and configure network access storage devices
  • ICTNWK531 Configure an internet gateway

To a lesser extent, Ansible could also prove useful in many Cert IV level units which involve system and network configuration:

  • ICTNWK401 Install and manage a server
  • ICTNWK402 Install and configure virtual machines for sustainable ICT
  • ICTNWK403 Manage network and data integrity
  • ICTNWK404 Install, operate and troubleshoot a small enterprise branch network
  • ICTNWK406 Install, configure and test network security
  • ICTNWK407 Install and configure client-server applications and services
  • ICTTEN416 Install, configure and test an internet protocol network
  • ICTNWK411 Deploy software to networked computers

Stay tuned for plenty more Ansible news. I have been very impressed by early experimental deployments at SuniTAFE for tasks ranging from powering on/off multiple guests on multiple VMWare ESX hosts through to creating virtual machines, configuring DNS and installing and configuring servers at cloud provider Digital Ocean.

Finally, Ansible is one more example of how open source technologies can deliver powerful, exciting, cutting edge and industry-leading technology to the TAFE IT lab at absolutely zero cost! Ansible is exactly the kind of technology we would introduce our students to if we were oriented to the current and future needs of a global, cloud-based IT industry.