Git Product home page Git Product logo

rolr's Introduction

rolr

GitHub License GitHub last commit

asciicast

rolr is a convenience tool to manage your local host with ansible. You define roles as ansible playbooks, then select the roles you want on a given system. Commit your config to a dotfiles repository and you have an automatic solution for setting up and keeping your various systems up to date.
See this excellent Youtube video by Jeff Geerling to find out why you want this. Though the video primarily focuses on MacOS, the concept works on Linux just as well.

The author uses this in conjunction with a dotfiles repo and a few bootstrapping scripts to manage various servers, desktops, laptops and WSL installations on multiple distros, keeping their configuration in sync.

This project is considered feature-complete.

Features

  • Simple, local architecture-as-code
  • Powered by ansible
  • Simple CLI for picking roles to install
  • Write idempotent playbooks to keep your systems in sync

Installation

Binaries are available for the following platforms:

Platform x86-64 aarch64
Arch Package
Debian Package Package
Linux Binaries Binaries

Note: The executable is fully statically linked and should therefore run basically anywhere, provided the architecture matches. Just unpack and go!

Usage

Place ansible playbooks in ~/.config/rolr/roles, separated by archicture and distro, e.g. x86_64/ubuntu/10-base.yml.
rolr will only use playbooks from the matching arch+distro folder, so you can use the same config across systems.

Now run rolr list to view your roles, and rolr add ROLE to add them to the current system. Added roles can be re-run with rolr update.

Also see rolr --help.

Tips

  • Write idempotent playbooks to ensure updates work as expected. To quote ansible's documentation:

    An operation is idempotent if the result of performing it once is exactly the same as the result of performing it repeatedly without any intervening actions.

  • Run rolr select to quickly view and add roles in a TUI menu.

  • Run individual roles quickly with rolr run ROLE. This will only run that role, without adding to the list of active roles.

  • Place an ansible config file in ~/.config/rolr/ansible.cfg with these contents to quiet ansible down a bit:

    [defaults]
    display_skipped_hosts = false
    display_ok_hosts = false
  • Playbooks will be run in the order they appear in the filesystem, use numbered prefixes to influence this. If a role's name occurs multiple times, all instances will be run. Use this to split roles into multiple chunks and control the timing of their execution.

  • A comment on the first line of the playbook will be interpreted as the description.

  • Use symlinks for playbook re-use across distros and architectures.

  • Store your dotfiles in a bare git repo to easily share and synchronize them across all your systems.
    For this, add active.txt and playbook.yml to your gitignore.

Development

Using the devcontainer is highly encouraged to get up and running ASAP, otherwise:

rolr's People

Contributors

thorio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.