1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_dotfiles.git synced 2024-08-16 16:09:49 +02:00
Ansible role to deploy some dotfiles
Find a file
2020-11-25 15:16:33 +01:00
.github change to travis-ci.com 2020-11-13 14:38:52 +01:00
defaults Improve pwgen mechanism 2020-11-25 15:16:33 +01:00
meta Update meta information 2019-06-11 13:32:22 +02:00
tasks BREAKING: change variable names to dotfiles__ 2020-11-13 14:28:57 +01:00
templates BREAKING: change variable names to dotfiles__ 2020-11-13 14:28:57 +01:00
travis Test new test 2019-02-01 14:49:10 +01:00
vars improve role behavior (#2) 2020-11-13 11:30:51 +01:00
.ansible-lint Update ansible version controll. 2019-05-17 15:55:28 +02:00
.travis.yml no jessie check 2020-09-18 15:20:37 +02:00
LICENSE Update LICENSE Information 2019-06-07 11:44:00 +02:00
README.md change icon 2020-11-13 14:40:09 +01:00

dotfiles

MIT License Build Status Galaxy

Get it directly from Ansible Galaxy

$ ansible-galaxy install do1jlr.dotfiles

Function of this role

Ansible role to deploy some dotfiles which may be useful

Affected files:

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

our variables:

# enable basic version check for this role
# set it to true to use it (recomended)
submodules_versioncheck: false

# for some ansible features we need the python selinux package at fedora
# disable it, if you don't want it
dotfiles__install_python_selinux: true

# modify bashrc
dotfiles__modify_bashrc: true

# list of aliases used in 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  --symbols 42 | grep -v '0' | grep -v 'o' | grep -v 'O' | grep -v '\"' | grep -v 'I' | grep -v 'l' | grep -v '1' | grep -v '´' | grep -v '@'  | tail -1 ", color: false }


# enable bash completion
dotfiles__bash_completion_enabled: true

# fancy promt
dotfiles__user_promt: '\[\033[01;33m\] $(printf "\xE2\x9D\xA4") \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '
dotfiles__root_prompt: '\[\033[01;31m\] $(printf "\xE2\x9D\xA4") \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] '

# log terminal to syslog
dotfiles__log_to_syslog: true

# modify bash history
history_control: 'ignoreboth'
history_size: '-1'
history_file_size: '-1'

# optional additional entries to bashrc
dotfiles__additional_bashrc_lines: []
# - eval `foo`
# - tmux new-session

# optionally allow custom bashrc for root
dotfiles__allow_own_root_bashrc: false

# otional custom commands
dotfiles__additional_bashrc_lines: []
# - eval `foo`
# - tmux new-session

# optionally allow custom bashrc for root
dotfiles__allow_own_root_bashrc: false

# otional custom commands
dotfiles__custom_config: []
#  - { user: "l3d", cmd: "eval $(keychain --eval --quiet id_ed25519)"

# show hidden files in ranger
dotfiles__ranger_hidden_files: true

accounts:
  - "{{ ansible_user_id }}"

Please have a look into defaults/main.yml for more configuration options!

testing

This role is tested with these github-action tests for different versions of differen linux systems. Linting is tested via travis-ci and the ansible-lint action. If you want to find out more about our tests, please have a look at the github marketplace.

test status Github Marketplace
Travis Build Status .travis.yml
Ansible Lint check ansible-lint action
Ansible check debian:stable ansible test with debian stable
Ansible check debian:latest ansible test with debian latest
Ansible check debian:sid ansible test with debian sid
Ansible check debian:buster ansible test with debian buster
Ansible check debian:stretch ansible test with debian stretch
Ansible check archlinux:latest ansible test with archlinux latest
Ansible check ubuntu:latest ansible test with ubuntu latest
Ansible check ubuntu:bionic ansible test with ubuntu bionic
Ansible check ubuntu:eoan ansible test with ubuntu eoan
Ansible check ubuntu:trusty ansible test with ubuntu trusty
Ansible check ubuntu:xenial ansible test with ubuntu xenial
Ansible check fedora:latest ansible test with fedora latest
Ansible check fedora:33 ansible test with fedora 33
Ansible check fedora:32 ansible test with fedora 32
Ansible check fedora:31 ansible test with fedora 31
Ansible check centos:latest ansible test with centos latest
Ansible check centos:centos8 ansible test with centos centos8
Ansible check centos:centos7 ansible test with centos centos7