Wednesday, November 23, 2016

Customize Fedora 25 in a few minutes using Ansible

Instead of spending a few hours after installing Fedora 25 on adding the software you want and tweaking the options you prefer, why not use Ansible to get you up and running in minutes?

I assume you have already downloaded Fedora 25 Workstation from the official site at https://getfedora.org/, and that you have installed it, and that your personal user is allowed to run sudo (hint: being a member of the wheel group).


After logon to Fedora 25, download my Ansible playbook sample from https://github.com/avnes/blogsamples/blob/master/fedora.yml 

The rest of this article assumes you saved the file to ~/fedora.yml

Open ~/fedora.yml in a text editor (for instance vi or Gedit) and have look at what software it is installing, and what software it removes. Change it if you like.

When you are ready to play, run the following commands as your personal user:
sudo dnf install -y ansible
ansible-playbook ~/fedora.yml --connection=local --ask-become-pass

When promoted for a password, type in your personal password, and the playbook will then be executed with sudo rights. Both the sudo command and the ansible.playbook command will prompt you for your personal password.

Afterwards you should see a similar output as below, though changed would be higher than 0. In my case of is 0 because I have already run the playbook a few times already, so no changes.




1 comment: