Change users to antidote_users

This commit is contained in:
SebClem 2022-11-20 18:59:29 +01:00
parent 4ea6ee162b
commit af5afd83c6
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
4 changed files with 10 additions and 10 deletions

View File

@ -4,4 +4,4 @@
antidote_version: "1.6.4"
antidote_mirror: "https://github.com/mattmc3/antidote/archive/refs/tags/"
antidote_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"
users: []
antidote_users: []

View File

@ -5,7 +5,7 @@
name: "{{ user.username }}"
shell: /bin/zsh
when: user.antidote_plugins is defined
loop: "{{ users }}"
loop: "{{ antidote_users }}"
loop_control:
loop_var: user
label: "{{ user.username }}"
@ -18,7 +18,7 @@
dest: "~{{ user.username }}/.antidoterc"
mode: "u=rw,go=r"
when: user.antidote_plugins is defined
loop: "{{ users }}"
loop: "{{ antidote_users }}"
loop_control:
loop_var: user
label: "{{ user.username }}"
@ -31,7 +31,7 @@
dest: "~{{ user.username }}/.zsh_plugins.txt"
mode: "u=rw,go=r"
when: user.antidote_plugins is defined
loop: "{{ users }}"
loop: "{{ antidote_users }}"
loop_control:
loop_var: user
label: "{{ user.username }}"
@ -42,10 +42,11 @@
lineinfile:
path: "~/.zshrc"
line: "source ~/.antidoterc"
insertbefore: "source ~/.ansible_zshrc"
create: yes
mode: "u=rw,go=r"
when: user.antidote_plugins is defined
loop: "{{ users }}"
loop: "{{ antidote_users }}"
loop_control:
loop_var: user
label: "{{ user.username }}"

View File

@ -28,7 +28,7 @@
path: "~{{ username }}/.antidote"
state: directory
mode: "u=rwx,go=rx"
loop: "{{ users | map(attribute='username') | list }}"
loop: "{{ antidote_users | map(attribute='username') | list }}"
loop_control:
loop_var: username
@ -40,9 +40,8 @@
dest: "~{{ username }}/.antidote"
extra_opts:
- "--strip-components=1"
creates: "~{{ username }}/.antidote/antidote.zsh"
owner: "{{ username }}"
mode: "go-w"
loop: "{{ users | map(attribute='username') | list }}"
loop: "{{ antidote_users | map(attribute='username') | list }}"
loop_control:
loop_var: username

View File

@ -3,7 +3,7 @@
remote_user: root
roles:
- role: ansible-antidote-role
users:
antidote_users:
- username: root
antidote_plugins:
- name: zsh-users/zsh-autosuggestions
@ -12,5 +12,5 @@
kind: defer
- name: zsh-users/zsh-completions
- name: ohmyzsh/ohmyzsh
path: lib/git.zsh
path: lib
- name: romkatv/powerlevel10k