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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.