Fix: remove with_items

This commit is contained in:
Bertrand Benjamin 2020-07-17 06:36:08 +02:00
parent 79fe30654e
commit e678fb0dc2

View File

@ -2,10 +2,9 @@
- name: dotfiles -- Copy tmux.conf - name: dotfiles -- Copy tmux.conf
template: template:
src: files/dotfiles/tmux.conf src: files/dotfiles/tmux.conf
dest: /home/{{ item.username }}/.tmux.conf dest: /home/{{ me.username }}/.tmux.conf
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
# Zsh config # Zsh config
- name: dotfiles -- Download antibody - name: dotfiles -- Download antibody
@ -28,55 +27,49 @@
- name: dotfiles -- Copy local zshrc - name: dotfiles -- Copy local zshrc
template: template:
src: files/dotfiles/zshrc src: files/dotfiles/zshrc
dest: /home/{{ item.username }}/.zshrc dest: /home/{{ me.username }}/.zshrc
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh' when: prompt == 'zsh'
- name: dotfiles -- Copy local zshrc.local - name: dotfiles -- Copy local zshrc.local
template: template:
src: files/dotfiles/zshrc.local src: files/dotfiles/zshrc.local
dest: /home/{{ item.username }}/.zshrc.local dest: /home/{{ me.username }}/.zshrc.local
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh' when: prompt == 'zsh'
- name: dotfiles -- Copy local zsh_plugins.txt - name: dotfiles -- Copy local zsh_plugins.txt
template: template:
src: files/dotfiles/zsh_plugins.txt src: files/dotfiles/zsh_plugins.txt
dest: /home/{{ item.username }}/.zsh_plugins.txt dest: /home/{{ me.username }}/.zsh_plugins.txt
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh' when: prompt == 'zsh'
# Fish config # Fish config
- name: dotfiles -- Create fish config directory - name: dotfiles -- Create fish config directory
file: file:
dest: /home/{{ item.username }}/.config/fish/ dest: /home/{{ me.username }}/.config/fish/
state: directory state: directory
with_items: "{{ me }}"
when: prompt == 'fish' when: prompt == 'fish'
- name: dotfiles -- Copy config.fish - name: dotfiles -- Copy config.fish
template: template:
src: files/dotfiles/config.fish src: files/dotfiles/config.fish
dest: /home/{{ item.username }}/.config/fish/ dest: /home/{{ me.username }}/.config/fish/
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: prompt == 'fish' when: prompt == 'fish'
register: fishconfig register: fishconfig
- name: dotfiles -- Copy fisher plugin list - name: dotfiles -- Copy fisher plugin list
template: template:
src: files/dotfiles/fishfile src: files/dotfiles/fishfile
dest: /home/{{ item.username }}/.config/fish/ dest: /home/{{ me.username }}/.config/fish/
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: prompt == 'fish' when: prompt == 'fish'
register: fishplugin register: fishplugin
@ -85,95 +78,84 @@
- name: dotfiles -- Copy .vim/ - name: dotfiles -- Copy .vim/
copy: copy:
src: files/dotfiles/vim/ src: files/dotfiles/vim/
dest: /home/{{ item.username }}/.vim/ dest: /home/{{ me.username }}/.vim/
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
- name: dotfiles -- Creates .vim/autoload/ - name: dotfiles -- Creates .vim/autoload/
file: file:
path: /home/{{ item.username }}/.vim/autoload/ path: /home/{{ me.username }}/.vim/autoload/
state: directory state: directory
with_items: "{{ me }}"
- name: dotfiles -- Download plug.vim - name: dotfiles -- Download plug.vim
get_url: get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: /home/{{ item.username }}/.vim/autoload/plug.vim dest: /home/{{ me.username }}/.vim/autoload/plug.vim
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
- name: dotfiles -- Copy vimrc - name: dotfiles -- Copy vimrc
template: template:
src: files/dotfiles/vimrc src: files/dotfiles/vimrc
dest: /home/{{ item.username }}/.vimrc dest: /home/{{ me.username }}/.vimrc
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
# Neovim config # Neovim config
- name: dotfiles -- Copy nvim config - name: dotfiles -- Copy nvim config
copy: copy:
src: files/dotfiles/nvim src: files/dotfiles/nvim
dest: /home/{{ item.username }}/.config dest: /home/{{ me.username }}/.config
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: editor == 'nvim' when: editor == 'nvim'
- name: dotfiles -- Download plug.vim for nvim - name: dotfiles -- Download plug.vim for nvim
get_url: get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: /home/{{ item.username }}/.config/nvim/autoload/plug.vim dest: /home/{{ me.username }}/.config/nvim/autoload/plug.vim
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: editor == 'nvim' when: editor == 'nvim'
# Alacritty terminal # Alacritty terminal
- name: dotfiles -- Copy alacritty config - name: dotfiles -- Copy alacritty config
copy: copy:
src: files/dotfiles/alacritty src: files/dotfiles/alacritty
dest: /home/{{ item.username }}/.config dest: /home/{{ me.username }}/.config
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
# Ssh config # Ssh config
- name: dotfiles -- Creates .ssh - name: dotfiles -- Creates .ssh
file: file:
path: /home/{{ item.username }}/.ssh/ path: /home/{{ me.username }}/.ssh/
state: directory state: directory
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: not server when: not server
- name: dotfiles -- Copy ssh user config - name: dotfiles -- Copy ssh user config
template: template:
src: files/dotfiles/ssh/config_deploy src: files/dotfiles/ssh/config_deploy
dest: /home/{{ item.username }}/.ssh/config dest: /home/{{ admin.username }}/.ssh/config
owner: "{{ item.username }}" owner: "{{ admin.username }}"
group: "{{ item.group }}" group: "{{ admin.group }}"
with_items: "{{ deploy_users }}"
when: not server when: not server
- name: dotfiles -- Copy ssh user config - name: dotfiles -- Copy ssh user config
template: template:
src: files/dotfiles/ssh/config_me src: files/dotfiles/ssh/config_me
dest: /home/{{ item.username }}/.ssh/config dest: /home/{{ me.username }}/.ssh/config
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: not server when: not server
# Git config # Git config
- name: dotfiles -- Copy gitconfig - name: dotfiles -- Copy gitconfig
template: template:
src: files/dotfiles/gitconfig src: files/dotfiles/gitconfig
dest: /home/{{ item.username }}/.gitconfig dest: /home/{{ me.username }}/.gitconfig
owner: "{{ item.username }}" owner: "{{ me.username }}"
group: "{{ item.group }}" group: "{{ me.group }}"
with_items: "{{ me }}"
when: not server when: not server