Start of zsh role, per-user section not yet implemented.
This commit is contained in:
parent
b1532c38cc
commit
d51770a4b4
@ -1,7 +1,6 @@
|
||||
os_flavor: "linux"
|
||||
users:
|
||||
talexander:
|
||||
per_user: true
|
||||
initialize: true
|
||||
uid: 11235
|
||||
gid: 1000
|
||||
|
@ -5,3 +5,4 @@
|
||||
- sudo
|
||||
- users
|
||||
- zrepl
|
||||
- zsh
|
||||
|
@ -1,6 +1,5 @@
|
||||
users:
|
||||
talexander:
|
||||
per_user: true
|
||||
initialize: true
|
||||
uid: 11235
|
||||
gid: 11235
|
||||
|
4
ansible/roles/zsh/handlers/main.yml
Normal file
4
ansible/roles/zsh/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: restart zrepl
|
||||
service:
|
||||
name: zrepl
|
||||
state: restarted
|
2
ansible/roles/zsh/meta/main.yaml
Normal file
2
ansible/roles/zsh/meta/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- users
|
17
ansible/roles/zsh/tasks/freebsd.yaml
Normal file
17
ansible/roles/zsh/tasks/freebsd.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- zsh
|
||||
- sqlite3
|
||||
- git
|
||||
- py39-jmespath # Needed on machine running ansible for json_query
|
||||
state: present
|
||||
|
||||
- include_tasks:
|
||||
file: tasks/peruser.yaml
|
||||
apply:
|
||||
become: yes
|
||||
become_user: "{{ initialize_user }}"
|
||||
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
|
||||
loop_control:
|
||||
loop_var: initialize_user
|
8
ansible/roles/zsh/tasks/linux.yaml
Normal file
8
ansible/roles/zsh/tasks/linux.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- zsh
|
||||
- sqlite
|
||||
- git
|
||||
- python-jmespath # Needed on machine running ansible for json_query
|
||||
state: present
|
5
ansible/roles/zsh/tasks/main.yaml
Normal file
5
ansible/roles/zsh/tasks/main.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
- include: tasks/freebsd.yaml
|
||||
when: 'os_flavor == "freebsd"'
|
||||
|
||||
- include: tasks/linux.yaml
|
||||
when: 'os_flavor == "linux"'
|
33
ansible/roles/zsh/tasks/peruser.yaml
Normal file
33
ansible/roles/zsh/tasks/peruser.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
- include_role:
|
||||
name: per_user
|
||||
# - name: clone zsh-histdb repo
|
||||
# git:
|
||||
# repo: "https://github.com/larkery/zsh-histdb.git"
|
||||
# dest: "{{ account_homedir.stdout }}/.ansible_deploy/zsh-histdb"
|
||||
# version: "6c7159be9de8586ac2f19d179d562cf5d10a2bab"
|
||||
# diff: false
|
||||
|
||||
# - name: Create zshrc additional imports directory
|
||||
# file:
|
||||
# name: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc"
|
||||
# state: directory
|
||||
# mode: 0700
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
|
||||
# - name: Configure zshrc additional imports
|
||||
# copy:
|
||||
# src: "files/zshrc_{{ item }}"
|
||||
# dest: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc/{{ item }}.zsh"
|
||||
# mode: 0600
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
# with_items: "{{ additional_zshrc_files }}"
|
||||
|
||||
# - name: Configure zshrc
|
||||
# copy:
|
||||
# src: files/zshrc
|
||||
# dest: "{{ account_homedir.stdout }}/.zshrc"
|
||||
# mode: 0600
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
Loading…
x
Reference in New Issue
Block a user