The tasks under this role are used to install and configure common softwares.
Put all personal configuration files under roles/common/files/*
and modify the varible file group_vars/all/common.yml
.
- shell: update
.xxx
rc files and.xxx
folders for your favorite shell like bash, zsh. - bat: a syntax highlighting tool.
- fd: a simple, fast and user-friendly alternative to 'find'.
- fzf: a command-line fuzzy finder.
- git: install and config git global config.
- ripgrep a line-oriented search tool that recursively searches directories for a regex pattern
- ssh: update
sshd_config
and set up public key loging. - vim: install vim and update vim config.
- misc: simply install by package manager.
Files under roles/common/files/shell/
will be copied to $HOME
and appended at the end if files already exist. Directories will be rsync
ed to $HOME
.
For example, put .bashrc
file, .local
folder, etc. under roles/common/files/shell/
.
If shell_clear_existing=true
, current .xxx
file content will be backed up and cleared if it is the first time running this task.
Install a syntax highlighting tool sharkdp/bat.
install a simple, fast and user-friendly alternative to 'find'. sharkdp/fd.
Install a command-line fuzzy finder junegunn/fzf.
Change git_config
to your desired value.
A line-oriented search tool that recursively searches your current directory for a regex pattern. ripgrep is similar to other popular search tools like The Silver Searcher, ack and grep. BurntSushi/ripgrep.
Modify sshd_config
and put your public key in file. The following config will enable public key authentication and disable password login.
sshd_config:
PasswordAuthentication: 'no'
ChallengeResponseAuthentication: 'no'
PubkeyAuthentication: 'yes'
If you want to push your private key to remote server, place you private key and set ssh_push_keys=true
.
Put .vimrc
and other files under roles/common/files/vim/
. The following settings will install plug
plugin manager.
vim:
vundle: false
plug: true
This task is to install common packages by package manager. Just add package name under misc_packages
.
ansible-playbook -i hosts common.yml
ansible-playbook -i hosts --tags "ssh" common.yml
ansible-playbook -i hosts --tags "vim" --skip-tags "configuration" common.yml