226 lines
7.0 KiB
YAML
226 lines
7.0 KiB
YAML
- name: users | super_user | install git
|
|
tags: dev,development,packages,python,ruby
|
|
package:
|
|
name:
|
|
- git
|
|
state: latest
|
|
|
|
- name: users | super_user | create group
|
|
tags: groups,super_user,users
|
|
group:
|
|
name: super_user
|
|
state: present
|
|
|
|
- name: users | super_user | create user
|
|
tags: super_user,sudo,users
|
|
user:
|
|
name: super_user
|
|
group: super_user
|
|
groups: "{{ sudo_group }}"
|
|
state: present
|
|
comment: "super_user"
|
|
password: "{{ super_user_passwd }}"
|
|
shell: /bin/bash
|
|
|
|
- name: users | super_user | super_user | add sudoers file
|
|
tags: super_user,settings,sudo,system,users
|
|
copy:
|
|
src: users/sudoers_super_user
|
|
dest: /etc/sudoers.d/super_user
|
|
owner: root
|
|
group: root
|
|
mode: 0440
|
|
|
|
- name: users | super_user | create .ssh directory
|
|
tags: dotfiles,super_user,ssh,users
|
|
file:
|
|
path: "{{ item.dir }}"
|
|
state: directory
|
|
owner: super_user
|
|
group: super_user
|
|
mode: 0700
|
|
with_items:
|
|
- { dir: '/home/super_user/.ssh' }
|
|
|
|
- name: "users | super_user | add public key"
|
|
tags: dotfiles,super_user,ssh,ssh-keys,users
|
|
ansible.posix.authorized_key:
|
|
user: super_user
|
|
key: "{{ item }}"
|
|
with_file:
|
|
- users/super_user/ssh/authorized_keys
|
|
|
|
- name: users | super_user | create config directories
|
|
tags: dotfiles,super_user,tmux,users,vim,zsh
|
|
file:
|
|
path: /home/super_user/{{ item.dir }}
|
|
state: directory
|
|
owner: super_user
|
|
group: super_user
|
|
|
|
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 | super_user | copy tmux config (server version)
|
|
tags: dotfiles,users,super_user,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/super_user/tmux/tmux.conf.server
|
|
dest: /home/super_user/.tmux.conf
|
|
owner: super_user
|
|
group: super_user
|
|
mode: 0600
|
|
when: "'server' not in group_names"
|
|
|
|
- name: users | super_user | copy tmux config (workstation version)
|
|
tags: dotfiles,users,super_user,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/super_user/tmux/tmux.conf.workstation
|
|
dest: /home/super_user/.tmux.conf
|
|
owner: super_user
|
|
group: super_user
|
|
mode: 0600
|
|
when: "'server' in group_names"
|
|
|
|
- name: users | super_user| copy dotfiles
|
|
tags: dotfiles,users,super_user,tmux,users,vim,zsh
|
|
copy:
|
|
src: users/super_user/{{ item.src }}
|
|
dest: /home/super_user/{{ item.dest }}
|
|
owner: super_user
|
|
group: super_user
|
|
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 | super_user| clone tmux-completion plugin repository
|
|
# tags: dotfiles,super_user,users,tmux
|
|
# git:
|
|
# repo: https://github.com/srsudar/tmux-completion.git
|
|
# dest: /home/super_user/.tmux/plugins/completion
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
# - name: users | super_user| clone tmux-continuum plugin repository
|
|
# tags: dotfiles,super_user,users,tmux
|
|
# git:
|
|
# repo: https://github.com/tmux-plugins/tmux-continuum
|
|
# dest: /home/super_user/.tmux/plugins/continuum
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
# - name: users | super_user| clone tmux-resurrect plugin repository
|
|
# tags: dotfiles,super_user,users,tmux
|
|
# git:
|
|
# repo: https://github.com/tmux-plugins/tmux-resurrect
|
|
# dest: /home/super_user/.tmux/plugins/resurrect
|
|
# force: yes
|
|
# notify: update_tmux_plugin_perms
|
|
|
|
- name: users | super_user| copy individual zsh config files
|
|
tags: dotfiles,super_user,users,zsh
|
|
copy:
|
|
src: users/super_user/zsh/{{ item.src }}
|
|
dest: /home/super_user/.zsh/{{ item.src }}
|
|
owner: super_user
|
|
group: super_user
|
|
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 | super_user | copy vim ftype files
|
|
tags: dotfiles,super_user,users,vim
|
|
copy:
|
|
src: users/super_user/vim/{{ item.src }}
|
|
dest: /home/super_user/.vim/ftplugin/{{ item.src }}
|
|
owner: super_user
|
|
group: super_user
|
|
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 | super_user | copy vim color files
|
|
tags: dotfiles,super_user,users,vim
|
|
copy:
|
|
src: users/super_user/vim/{{ item.src }}
|
|
dest: /home/super_user/.vim/colors/{{ item.src }}
|
|
owner: super_user
|
|
group: super_user
|
|
mode: 0600
|
|
with_items:
|
|
- { src: 'bubblegum-256-dark.vim' }
|
|
- { src: 'darktango.vim' }
|
|
- { src: 'jellybeans.vim' }
|
|
- { src: 'xoria256.vim' }
|
|
- { src: 'zenburn.vim' }
|
|
|
|
- name: users | super_user | install pathogen
|
|
tags: dotfiles,super_user,users,vim
|
|
copy:
|
|
src: users/super_user/vim/{{ item.src }}
|
|
dest: "{{ item.dest }}"
|
|
owner: super_user
|
|
group: super_user
|
|
mode: 0700
|
|
with_items:
|
|
- { src: 'pathogen.vim', dest: '/home/super_user/.vim/autoload/pathogen.vim' }
|
|
|
|
- name: users | super_user | checkout git repositories
|
|
tags: git,users,super_user
|
|
|
|
become: yes
|
|
git:
|
|
repo: "{{ item.repo }}"
|
|
dest: "{{ item.dest }}"
|
|
force: yes
|
|
with_items:
|
|
- { repo: 'https://github.com/ctrlpvim/ctrlp.vim.git', dest: '/home/super_user/.vim/bundle/ctrlp.vim' }
|
|
- { repo: 'https://github.com/davidhalter/jedi-vim.git', dest: '/home/super_user/.vim/bundle/jedi-vim' }
|
|
- { repo: 'https://github.com/pearofducks/ansible-vim', dest: '/home/super_user/.vim/bundle/ansible-vim' }
|
|
- { repo: 'https://github.com/rhysd/vim-grammarous.git', dest: '/home/super_user/.vim/bundle/vim-grammarous' }
|
|
- { repo: 'https://github.com/ron89/thesaurus_query.vim', dest: '/home/super_user/.vim/bundle/thesaurus_query' }
|
|
- { repo: 'https://github.com/scrooloose/nerdtree.git', dest: '/home/super_user/.vim/bundle/nerdtree' }
|
|
- { repo: 'https://github.com/tpope/vim-obsession.git', dest: '/home/super_user/.vim/bundle/vim-obsession' }
|
|
- { repo: 'https://github.com/vim-syntastic/syntastic.git', dest: '/home/super_user/.vim/bundle/syntastic' }
|
|
notify: update_vim_bundle_perms
|