Make the user role more flexible for users
This commit is contained in:
parent
483780a828
commit
e91babde35
7
system/base/user/meta/argument_specs.yml
Normal file
7
system/base/user/meta/argument_specs.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
argument_specs:
|
||||||
|
main:
|
||||||
|
options:
|
||||||
|
system_base_user_become_user:
|
||||||
|
type: "str"
|
||||||
|
required: true
|
@ -1,23 +1,31 @@
|
|||||||
---
|
---
|
||||||
|
- name: "get user home directory"
|
||||||
|
ansible.builtin.getent:
|
||||||
|
database: "passwd"
|
||||||
|
key: "{{ system_base_user_become_user }}"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
- name: "clone tmux dotfiles"
|
- name: "clone tmux dotfiles"
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "https://git.wojciechkozlowski.eu/config/tmux.git"
|
repo: "https://git.wojciechkozlowski.eu/config/tmux.git"
|
||||||
dest: ".tmux"
|
dest: "{{ system_base_user_become_user_home_directory }}/.tmux"
|
||||||
recursive: true
|
recursive: true
|
||||||
|
|
||||||
# On first tmux launch install plugins with <Ctrl + a + I>
|
# On first tmux launch install plugins with <Ctrl + a + I>
|
||||||
- name: "configure tmux"
|
- name: "configure tmux"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "./tmux.conf"
|
src: "./tmux.conf"
|
||||||
dest: ".tmux.conf"
|
dest: "{{ system_base_user_become_user_home_directory }}/.tmux.conf"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: "configure bashrc"
|
- name: "configure bashrc"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "./bashrc"
|
src: "./bashrc"
|
||||||
dest: ".bashrc"
|
dest: "{{ system_base_user_become_user_home_directory }}/.bashrc"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
become: false
|
become_user: "{{ system_base_user_become_user }}"
|
||||||
|
vars:
|
||||||
|
system_base_user_become_user_home_directory: "\
|
||||||
|
{{ getent_passwd[system_base_user_become_user].4 }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user