48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
---
|
|
- name: Install cli utilities
|
|
package:
|
|
name:
|
|
- bash
|
|
- bash-completion
|
|
- bat
|
|
- bind-tools
|
|
- git
|
|
- man
|
|
- "{% if ansible_os_family == 'Archlinux' %}mtr{% else %}mtr-tiny{% endif %}"
|
|
- sl
|
|
- htop
|
|
- patch
|
|
- tmux
|
|
- traceroute
|
|
- tree
|
|
register: pkg_result
|
|
retries: 3
|
|
until: pkg_result is succeeded
|
|
|
|
- name: Create directory hierarchy
|
|
file:
|
|
path: '.config/{{ item }}'
|
|
state: directory
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0755
|
|
with_items:
|
|
- 'git/'
|
|
- 'bash/'
|
|
become_user: "{{ user.name }}"
|
|
|
|
- name: Deploying config files
|
|
template:
|
|
src: '{{ item.src }}'
|
|
dest: '{{ item.dest }}'
|
|
owner: '{{ user.name }}'
|
|
group: '{{ user.name }}'
|
|
mode: 0644
|
|
with_items:
|
|
- { src: bashrc.j2, dest: .bashrc }
|
|
- { src: inputrc.j2, dest: .inputrc }
|
|
- { src: bash_aliases.j2, dest: .config/bash/bash_aliases }
|
|
- { src: gitconfig.j2, dest: .config/git/config }
|
|
- { src: tmux.conf.j2, dest: .tmux.conf }
|
|
become_user: '{{ user.name }}'
|