224 lines
6.7 KiB
YAML
224 lines
6.7 KiB
YAML
- name: users | bzoicas | install git
|
|
tags: dev,development,packages,python,ruby
|
|
package:
|
|
name:
|
|
- git
|
|
state: latest
|
|
|
|
- name: users | bzoicas | create group
|
|
tags: groups,bzoicas,users
|
|
group:
|
|
name: bzoicas
|
|
state: present
|
|
|
|
- name: users | bzoicas | create user
|
|
tags: bzoicas,sudo,users
|
|
user:
|
|
name: bzoicas
|
|
group: bzoicas
|
|
groups: vboxsf,adm,{{ sudo_group }}
|
|
state: present
|
|
comment: "BZo"
|
|
password: "{{ bzoicas_passwd }}"
|
|
shell: /bin/bash
|
|
|
|
- name: users | bzoicas | bzoicas | add sudoers file
|
|
tags: bzoicas,settings,sudo,system,users
|
|
copy:
|
|
src: users/sudoers_bzoicas
|
|
dest: /etc/sudoers.d/bzoicas
|
|
owner: root
|
|
group: root
|
|
mode: 0440
|
|
|
|
- name: users | bzoicas | create .ssh directory
|
|
tags: dotfiles,bzoicas,ssh,users
|
|
file:
|
|
path: "{{ item.dir }}"
|
|
state: directory
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0700
|
|
with_items:
|
|
- { dir: '/home/bzoicas/.ssh' }
|
|
|
|
- name: users | bzoicas | add public key
|
|
tags: dotfiles,bzoicas,ssh,ssh-keys,users
|
|
authorized_key:
|
|
user: bzoicas
|
|
key: "{{ item }}"
|
|
with_file:
|
|
- users/bzoicas/ssh/bzoicas_id_rsa.pub
|
|
|
|
- name: users | bzoicas | create config directories
|
|
tags: dotfiles,bzoicas,tmux,users,vim,zsh
|
|
file:
|
|
path: /home/bzoicas/{{ item.dir }}
|
|
state: directory
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0700
|
|
with_items:
|
|
- { dir: '.bash' }
|
|
- { dir: '.config' }
|
|
- { dir: '.config/htop' }
|
|
- { dir: '.config/mc' }
|
|
- { dir: '.tmux' }
|
|
- { dir: '.tmux/config' }
|
|
- { dir: '.tmux/plugins' }
|
|
- { dir: '.vim' }
|
|
- { dir: '.vim/autoload' }
|
|
- { dir: '.vim/bundle' }
|
|
- { dir: '.vim/colors' }
|
|
- { dir: '.vim/ftplugin' }
|
|
- { dir: '.zsh' }
|
|
|
|
- name: users | bzoicas | copy tmux config (server version)
|
|
tags: dotfiles,users,bzoicas,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/bzoicas/tmux/tmux.conf.server
|
|
dest: /home/bzoicas/.tmux.conf
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
when: "'server' not in group_names"
|
|
|
|
- name: users | bzoicas | copy tmux config (workstation version)
|
|
tags: dotfiles,users,bzoicas,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/bzoicas/tmux/tmux.conf.workstation
|
|
dest: /home/bzoicas/.tmux.conf
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
when: "'server' in group_names"
|
|
|
|
- name: users | bzoicas | copy dotfiles
|
|
tags: dotfiles,users,bzoicas,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/bzoicas/{{ item.src }}
|
|
dest: /home/bzoicas/{{ item.dest }}
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
with_items:
|
|
- { src: 'bash/bash_aliases', dest: '.bash/bash_aliases' }
|
|
- { src: 'bash/bash_profile', dest: '.bash_profile' }
|
|
- { src: 'bash/bash_prompt', dest: '.bash/bash_prompt' }
|
|
- { src: 'bash/bash_functions', dest: '.bash/bash_functions' }
|
|
- { src: 'bash/bashrc', dest: '.bashrc' }
|
|
- { src: 'bash/profile', dest: '.profile' }
|
|
- { src: 'git/gitconfig', dest: '.gitconfig' }
|
|
- { src: 'htop/htoprc', dest: '.config/htop/htoprc' }
|
|
- { src: 'inputrc', dest: '.inputrc' }
|
|
- { src: 'mc/mc.ini', dest: '.config/mc/ini' }
|
|
- { src: 'vim/vimrc', dest: '.vimrc' }
|
|
- { src: 'zsh/zshrc', dest: '.zshrc' }
|
|
|
|
# - name: users | bzoicas | clone tmux-completion plugin repository
|
|
# tags: dotfiles,bzoicas,users,tmux
|
|
# git:
|
|
# repo: https://github.com/srsudar/tmux-completion.git
|
|
# dest: /home/bzoicas/.tmux/plugins/completion
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
# - name: users | bzoicas | clone tmux-continuum plugin repository
|
|
# tags: dotfiles,bzoicas,users,tmux
|
|
# git:
|
|
# repo: https://github.com/tmux-plugins/tmux-continuum
|
|
# dest: /home/bzoicas/.tmux/plugins/continuum
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
# - name: users | bzoicas | clone tmux-resurrect plugin repository
|
|
# tags: dotfiles,bzoicas,users,tmux
|
|
# git:
|
|
# repo: https://github.com/tmux-plugins/tmux-resurrect
|
|
# dest: /home/bzoicas/.tmux/plugins/resurrect
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
- name: users | bzoicas | copy individual zsh config files
|
|
tags: dotfiles,bzoicas,users,zsh
|
|
copy:
|
|
src: users/bzoicas/zsh/{{ item.src }}
|
|
dest: /home/bzoicas/.zsh/{{ item.src }}
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
with_items:
|
|
- { src: 'aliases.zsh' }
|
|
- { src: 'bindkey.zsh' }
|
|
- { src: 'completion.zsh' }
|
|
- { src: 'exports.zsh' }
|
|
- { src: 'functions.zsh' }
|
|
- { src: 'history.zsh' }
|
|
- { src: 'path.zsh' }
|
|
- { src: 'plugins.zsh' }
|
|
- { src: 'prompt.zsh' }
|
|
- { src: 'setopt.zsh' }
|
|
- { src: 'theming.zsh' }
|
|
|
|
- name: users | bzoicas | copy vim ftype files
|
|
tags: dotfiles,bzoicas,users,vim
|
|
copy:
|
|
src: users/bzoicas/vim/{{ item.src }}
|
|
dest: /home/bzoicas/.vim/ftplugin/{{ item.src }}
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
with_items:
|
|
- { src: 'cmake.vim' }
|
|
- { src: 'cpp.vim' }
|
|
- { src: 'html.vim' }
|
|
- { src: 'perl.vim' }
|
|
- { src: 'python.vim' }
|
|
- { src: 'ruby.vim' }
|
|
- { src: 'sql.vim' }
|
|
- { src: 'xml.vim' }
|
|
|
|
- name: users | bzoicas | copy vim color files
|
|
tags: dotfiles,bzoicas,users,vim
|
|
copy:
|
|
src: users/bzoicas/vim/{{ item.src }}
|
|
dest: /home/bzoicas/.vim/colors/{{ item.src }}
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0600
|
|
with_items:
|
|
- { src: 'bubblegum-256-dark.vim' }
|
|
- { src: 'darktango.vim' }
|
|
- { src: 'jellybeans.vim' }
|
|
- { src: 'xoria256.vim' }
|
|
- { src: 'zenburn.vim' }
|
|
|
|
- name: users | bzoicas | install pathogen
|
|
tags: dotfiles,bzoicas,users,vim
|
|
copy:
|
|
src: users/bzoicas/vim/{{ item.src }}
|
|
dest: "{{ item.dest }}"
|
|
owner: bzoicas
|
|
group: bzoicas
|
|
mode: 0700
|
|
with_items:
|
|
- { src: 'pathogen.vim', dest: '/home/bzoicas/.vim/autoload/pathogen.vim' }
|
|
|
|
- name: users | bzoicas | checkout git repositories
|
|
tags: git,users,bzoicas
|
|
become: yes
|
|
git:
|
|
repo: "{{ item.repo }}"
|
|
dest: "{{ item.dest }}"
|
|
force: yes
|
|
with_items:
|
|
- { repo: 'https://github.com/ctrlpvim/ctrlp.vim.git', dest: '/home/bzoicas/.vim/bundle/ctrlp.vim' }
|
|
- { repo: 'https://github.com/davidhalter/jedi-vim.git', dest: '/home/bzoicas/.vim/bundle/jedi-vim' }
|
|
- { repo: 'https://github.com/pearofducks/ansible-vim', dest: '/home/bzoicas/.vim/bundle/ansible-vim' }
|
|
- { repo: 'https://github.com/rhysd/vim-grammarous.git', dest: '/home/bzoicas/.vim/bundle/vim-grammarous' }
|
|
- { repo: 'https://github.com/ron89/thesaurus_query.vim', dest: '/home/bzoicas/.vim/bundle/thesaurus_query' }
|
|
- { repo: 'https://github.com/scrooloose/nerdtree.git', dest: '/home/bzoicas/.vim/bundle/nerdtree' }
|
|
- { repo: 'https://github.com/tpope/vim-obsession.git', dest: '/home/bzoicas/.vim/bundle/vim-obsession' }
|
|
- { repo: 'https://github.com/vim-syntastic/syntastic.git', dest: '/home/bzoicas/.vim/bundle/syntastic' }
|
|
notify: update_vim_bundle_perms
|