GithubHelp home page GithubHelp logo

marauderxtreme / ansible-role-local-system Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 97 KB

Ansible Role to setup my workstation and make it configurable. Includes my .dotfiles.

Home Page: https://galaxy.ansible.com/marauderxtreme/local_system

License: MIT License

Shell 99.40% Vim Script 0.60%
dotfiles ansible ansible-role oh-my-zsh p10k bat vimrc fzf rambox powerline

ansible-role-local-system's Introduction

@MarauderXtreme local_system

This is a "small" ansible role to help me, set up my local system and make it configurable.

There are some configs and files baked (a.k.a hard-coded) into this role that I consider useful. Please use this at your own discretion. It is currently used for a KDE Neon system but should be usable against any debian-based system and easily adoptable for other distributions.

Requirements

There is a chicken'n'egg flaw in the role. The role prepares the system with become: yes but only in those tasks writes sudoers with NOPASSWD:. You should prevent errors by editing sudoers or copying sudoers to /etc/sudoers.

Role Variables

For all variables there are a defaults/main/* defined. All variables are prefixed with the role name local_system to prevent overlaps in naming. With overriding them in group or host vars it's possible to define own setups.

  • main.yml

    • nodejs_install_npm_user
      • needed by geerlingguy.nodejs
      • set to root
    • local_system_uppercase_folders
      • list of uppercase folder names under ~ that need to be translated to lower-case
    • local_system_projects_paths
      • list of various project paths/directories
    • local_system_paths_unshorten
      • list of directories that should not be shortened by p10k path prompt
  • packages.yml

    • local_system_general_packages
      • list of packages that should be on every system
    • local_system_debian_packages
      • list of packages only relevant on debian-based systems
    • local_system_ppa_packages
      • list of useful packages that come from launchpad ppas only
  • ppas.yml

    • local_system_ppa
      • list of launchpad ppas in the schema of ppa:USER/PPA
  • extra_software.yml

    • local_system_ubuntu_keyserver: keyserver.ubuntu.com
      • configurable ubuntu keyserver
    • local_system_extra_software.ubuntu
      • list of configuration for ppas not located at launchpad
      • Everything needs to be done manually
      • Two ways of setup
        • example entry for key from url

          - name: signal
            url: https://updates.signal.org/desktop/apt/keys.asc
            id: DBA36B5181D0C816F630E889D980A17457F6FB06
            repo: deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main
            package: signal-desktop
        • example entry key from keyserver

          - name: teamviewer
            keyserver: "{{ local_system_ubuntu_keyserver }}"
            id: 8CAE012EBFAC38B17A937CD8C5E224500C1289C0
            repo: deb http://linux.teamviewer.com/deb
            package: teamviewer
  • git.yml

    • local_system_gitconfig
      • list of useful general gitconfig
    • local_system_diff_so_fancy_gitconfig
      • list of gitconfig for diff-so-fancy
  • pip.yml

    • local_system_pip
      • list of pip packages that are installed to the user dir
      • currently thefuck and powerline-status
  • versions.yml

    • nearly all those variables act as control mechanism
    • set them to false if you don't want to install/use certain things
    • I'm watching all those repos via gitpunch to update them
    • local_system_omz
    • local_system_omz_p10k
    • local_system_omz_autosuggests
    • local_system_bat
      • bat branch/tag/version
    • local_system_dsf
    • local_system_fzf
      • fzf branch/tag/version
    • local_system_genact
    • local_system_prettyping
    • local_system_firacode
      • firacode branch/tag/version or "package" for distro release
    • local_system_iosevka
    • local_system_unifraktur
    • local_system_nerdfonts
    • local_system_rambox
      • either pro or ce depending what you want
    • local_system_ramboxce
    • local_system_ramboxpro

Example Playbook

- hosts: localhost
  roles:
      - local_system

License

MIT

Author Information

Christoph Kepler [email protected]

Is it any good

Yes

ansible-role-local-system's People

Contributors

lodifice avatar marauderxtreme avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lodifice

ansible-role-local-system's Issues

Add tags to each subgroup of tasks

Currently there is no control mechanism what is done when running this role.
It would be great to control if onyl certain things are applied. (new version of a shell-helper, new .zshrc, new .aliases)

Test non-defaut config

Currently only one setup, the default one, is tested against focal.
There should be tests with various parts of this role activated or deactivated.

Add test coverage for various distributions

Currently everything is only tested against focal.

I assume that the current state to far will build/run against xenial, bionic and buster.
But this needs verification.

Probably a good idea to have #5 fixed prior.

Add test coverage with molecule verify

Currently the is no real verification run with molecule.
That should be addressed.

As the size of this role is pretty significant it should be verified that everything works as expected.

Speed improvement

Any current initial run has a hefty time-frame and even every "warmed up" subsequent run has a pretty significant time.
I probably left some time where a few early checks etc. could speed up things with skipping.

This is more of a explorative issue.

Add screencaps of terminal for visualisation

As this role heavily modifies zsh, oh-my-zsh and p10k there should be screencaps of various states and configs of the terminal prompt.
This should help people to understand what this role does.

Ensure that every subtask has all it's dependencies

Sometime certain shell-helpers or ansible modules need certain libraries or so to be installed to properly function.

The current state should work so far but I am not sure if everything is in it's place.

This also but not entirely relates to #5

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.