Creating a playbook to deploy a new VM with kickstart

Creating playbooks for Ansible is a relatively easy task as most considerations are handled by the modules. All modules are made as "idempotently" as possible, meaning that a module first checks what it is supposed to do with what has been done on the system and only then applies the changes if they are different.

Getting ready

We don't need any additional facts for this recipe.

For this to work, we need to have a web server and a location to store the kickstart files, which will be served by the web server.

For the sake of convenience, our web server is called web.domain.tld, the location on this web server is /var/www/html/kickstart, and this directory can be accessed through http://web.domain.tld/kickstart ...

Get Red Hat Enterprise Linux Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.