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_version: "1.6.4"
antidote_mirror: "https://github.com/mattmc3/antidote/archive/refs/tags/" antidote_mirror: "https://github.com/mattmc3/antidote/archive/refs/tags/"
antidote_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}" 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 }}" name: "{{ user.username }}"
shell: /bin/zsh shell: /bin/zsh
when: user.antidote_plugins is defined when: user.antidote_plugins is defined
loop: "{{ users }}" loop: "{{ antidote_users }}"
loop_control: loop_control:
loop_var: user loop_var: user
label: "{{ user.username }}" label: "{{ user.username }}"
@ -18,7 +18,7 @@
dest: "~{{ user.username }}/.antidoterc" dest: "~{{ user.username }}/.antidoterc"
mode: "u=rw,go=r" mode: "u=rw,go=r"
when: user.antidote_plugins is defined when: user.antidote_plugins is defined
loop: "{{ users }}" loop: "{{ antidote_users }}"
loop_control: loop_control:
loop_var: user loop_var: user
label: "{{ user.username }}" label: "{{ user.username }}"
@ -31,7 +31,7 @@
dest: "~{{ user.username }}/.zsh_plugins.txt" dest: "~{{ user.username }}/.zsh_plugins.txt"
mode: "u=rw,go=r" mode: "u=rw,go=r"
when: user.antidote_plugins is defined when: user.antidote_plugins is defined
loop: "{{ users }}" loop: "{{ antidote_users }}"
loop_control: loop_control:
loop_var: user loop_var: user
label: "{{ user.username }}" label: "{{ user.username }}"
@ -42,10 +42,11 @@
lineinfile: lineinfile:
path: "~/.zshrc" path: "~/.zshrc"
line: "source ~/.antidoterc" line: "source ~/.antidoterc"
insertbefore: "source ~/.ansible_zshrc"
create: yes create: yes
mode: "u=rw,go=r" mode: "u=rw,go=r"
when: user.antidote_plugins is defined when: user.antidote_plugins is defined
loop: "{{ users }}" loop: "{{ antidote_users }}"
loop_control: loop_control:
loop_var: user loop_var: user
label: "{{ user.username }}" label: "{{ user.username }}"

View File

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

View File

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