ansible-roles/system/base/user/tasks/main.yml

33 lines
985 B
YAML
Raw Normal View History

2022-12-20 19:47:11 +01:00
---
- name: "get user home directory"
ansible.builtin.getent:
database: "passwd"
key: "{{ system_base_user_become_user }}"
2022-12-20 19:47:11 +01:00
- block:
- name: "clone tmux dotfiles"
ansible.builtin.git:
repo: "https://git.wojciechkozlowski.eu/config/tmux.git"
dest: "{{ system_base_user_become_user_home_directory }}/.tmux"
2022-12-20 19:47:11 +01:00
recursive: true
2023-07-22 23:50:58 +02:00
ignore_errors: true
2022-12-20 19:47:11 +01:00
# On first tmux launch install plugins with <Ctrl + a + I>
- name: "configure tmux"
ansible.builtin.copy:
src: "./tmux.conf"
dest: "{{ system_base_user_become_user_home_directory }}/.tmux.conf"
2022-12-20 19:47:11 +01:00
mode: 0644
- name: "configure bashrc"
ansible.builtin.copy:
src: "./bashrc"
dest: "{{ system_base_user_become_user_home_directory }}/.bashrc"
2022-12-20 19:47:11 +01:00
mode: 0644
become_user: "{{ system_base_user_become_user }}"
vars:
system_base_user_become_user_home_directory: "\
{{ getent_passwd[system_base_user_become_user].4 }}"