Prerequisite : Ansible installed. Inventory configured. Step-1)Retreive the distro. First, we need to retrieve the distribution from ansible facts after use it. After we retrieve the distro, now we need to make the files respective to the distro, like — RedHat-8.yml, Ubuntu-16.yml, etc. Step-2)Writing Playbook First, we need to make the playbook for the distro.