l3d.dotfiles

Dotfiles

========== MIT License Galaxy

Purpose

This role is for managing Linux computers and mainly focuses on setting up dotfiles. The creator, @DO1JLR, believes these dotfiles should be on all Ansible-managed hosts.

Other roles can help with tasks like distributing SSH keys, configuring SSH settings, creating users, managing sudo permissions, and installing useful software.

Here are some recommended roles to manage your Linux system:

Important Notes

The roles listed here share the same settings for creating accounts and managing users, but they must run in the correct order. For example, you cannot add an SSH public key for a user who hasn't been created yet.

Installation

You can install this role directly from Ansible Galaxy with this command:

$ ansible-galaxy install do1jlr.dotfiles

Role Function

This Ansible role helps to set up useful dotfiles.

Files Affected:

/etc/bash.bashrc
~/.bashrc
~/.vimrc

(and possibly more, if configured)

Variables:

The accounts variable is crucial because it determines which user accounts will be set up.

# Enable basic version check for this role. Recommended to set to true.
submodules_versioncheck: false

# For some Ansible features, this package is required on Fedora. Disable if you don't need it.
dotfiles__install_python_selinux: true

# Modify bashrc
dotfiles__modify_bashrc: true

# List of aliases for bashrc
dotfiles__aliases:
  - { alias: "ls", command: "ls ", color: True }
  - { alias: "grep", command: "grep", color: True }
  - { alias: "ll", command: "ls -alF", color: False }
  - { alias: "la", command: "ls -A", color: False }
  - { alias: "l", command: "ls -CF", color: False }
  - { alias: "lz", command: "ls -Z", color: False }
  - { alias: "EDITOR", command: "/usr/bin/vim", color: False }
  - { alias: "VISUAL", command: "/usr/bin/gedit", color: False }
  - { alias: "gitsubpull", command: "git submodule foreach '(git checkout \\$(git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@'); git pull)'", color: False }
  - { alias: "pwgen", command: "/usr/bin/pwgen --num-passwords=3000 --numerals --capitalize --secure --no-vowels --ambiguous --symbols 95 1", color: false }

# Enable bash completion
dotfiles__bash_completion_enabled: true

# Custom user prompt
dotfiles__user_prompt: ... # (formatted string for prompt)
dotfiles__root_prompt: ... # (formatted string for root prompt)

# Modify bash history
dotfiles__history_control: 'ignoreboth'
dotfiles__history_size: '-1'
dotfiles__history_file_size: '-1'

# Optional additional entries for /etc/bash.bashrc
dotfiles__additional_bashrc_lines: []
# - eval `foo`
# - tmux new-session

# Optional additional entries for ~/.bashrc
dotfiles__additional_user_bashrc_lines: []
#  - eval $(keychain --eval --quiet id_ed25519)

# Option to allow custom bashrc for root
dotfiles__allow_own_root_bashrc: false

Please check defaults/main.yml for more configuration options!

Testing

To learn more about our tests, visit the GitHub marketplace.

Test Status GitHub Marketplace
Ansible Lint check ansible-lint action
Ansible check debian:stable ansible test with debian stable
Ansible check debian:latest ansible test with debian latest
Additional testing information available upon request.

Feel free to explore the details and tailor the configuration to fit your needs!

Informazioni sul progetto

Deploy some dotfiles like .vimrc and .bashrc for all defined users

Installa
ansible-galaxy install l3d.dotfiles
Licenza
mit
Download
516
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy