Manage and tweak Fedora with Ansible (and apply Korora settings by default)

Korora Project is a Linux distro I created over 13 years ago, which (since 2010) takes Fedora and applies dozens of tweaks in an effort to make it more usable “out of the box” for every day users.

Even with one or two others helping, it has been a lot of work so I’ve taken a break from the project for the last year to focus on other things. There has been no release of Korora since and so lately I’ve been running stock Fedora 29 Workstation (GNOME) on my laptop.

I enjoy the Korora defaults though and given that my family also runs Korora, I wanted a way to be able to move them to stock Fedora while keeping the same packages as well as the look and feel.

So, I created a Korora Ansible Role (it’s also on Ansible Galaxy) to apply the same Korora tweaks for stock Fedora Workstation (GNOME) plus an example playbook which uses it.

I tried to make it flexible by using variables so that users can change default package lists and settings for each machine, as required.

Running it on your local machine is pretty trivial, there’s a shell script with a sample inventory for localhost.

$ git clone --recursive https://github.com/csmart/korora-ansible ~/korora-ansible
$ cd ~/korora-ansible
$ ./run.sh

The end result is something like this!

Fedora after running Korora Ansible Role.

Customising it for particular machines is pretty easy thanks to Ansible, especially when using a YAML inventory.

For example, the following inventory for localhost at ~/korora-ansible/inventory/hosts-custom.yml will override defaults and add a few extras.

  • Remove totem
  • Install kodi
  • Change GNOME favourites (links in the dash)
  • Install nginx webserver, enable it and open the firewall for web traffic
  • Install Adapta theme and set GTK and GNOME shell themes
  • Set fonts for the system
  • You can do more!

cd ~/korora-ansible
cat > ./inventory/hosts-custom.yml<<EOF
all:
hosts:
localhost:
ansible_connection: local
korora_packages_custom:
remove:
- totem
korora_shell_favourites:
install:
- kodi
apps:
- firefox.desktop
- vlc.desktop
- kodi.desktop
- shotwell.desktop
- org.gnome.Nautilus.desktop
- org.gnome.Software.desktop
- org.gnome.Terminal.desktop
korora_services_custom:
install:
- nginx
enable:
- nginx
korora_firewall_custom:
allow:
- http
korora_gtk_theme:
name: Adapta
install:
- adapta-gtk-theme
korora_shell_theme:
name: Adapta
korora_desktop_font:
name: "Droid Sans Regular 11"
install:
- google-droid-sans-fonts
korora_desktop_document_font:
name: "Droid Sans Regular 11"
korora_desktop_titlebar_font:
name: "Droid Sans Bold 11"
korora_terminal_font:
name: "Droid Sans Mono Regular 11"
install:
- google-droid-sans-mono-fonts
vars:
ansible_python_interpreter: /usr/bin/python3
EOF

You would run the playbook with that custom inventory file by passing it in as the first argument.

$ ./run.sh ./inventory/hosts-custom.yml

7 Responses to “Manage and tweak Fedora with Ansible (and apply Korora settings by default)”

  1. Andre Gompel says:

    Used (and liked) Korora, several versions.
    Like the idea of an update of Fedora (29 and after).
    Need (for the beginner) to add : “sudo dnf install git”
    Need to be able to undo the changes (nor sure it is the case).
    Would prefer the changes to be implemented as an RPM package (so undo is easy); my guess it is what you are planning, correct ?
    Hope there is room for the MATE users (I am one).
    Thanks a lot, this is good !

    Andre Gompel

  2. Chris says:

    Hey Andre,

    Git is included in the base Fedora Workstation image (not sure about Mate), so no need to install it first. The run.sh script will check for ansible and if it’s not there, will prompt to install it.

    So those three lines should be all that’s needed to get it all going. I have no plans to do Mate at this point in time, hopefully it’s something that others can contribute if they want to use it.

    I’ll probably work in undo at some point.

    Cheers,
    -c

  3. Linux3D says:

    Hello
    Thankyou for your work its amazing

    for Cinnamon its possible install?

    Cumps
    Linux3D

  4. Chris says:

    Thanks, I haven’t done any work for cinnamon yet. You could still run it for the other things, but the desktop won’t be configured.

    -c

  5. Linux3D says:

    Thankyou for your work

    I installed and did not give an error, it seems everything is working fine

    “Fedora should have this Korora theme in the repos” xD

    https://imgur.com/HvapaH3

    Cumps
    Linux3D

  6. theport says:

    Very nice. I just hope that you would be able to get Korora back up and running. Your distro is much more polished than plain vanilla Fedora. Thanks for your hard work and God bless you.

Leave a Reply