fix(*): add loop control and loop var variables
This commit is contained in:
		
							parent
							
								
									c8dca4e168
								
							
						
					
					
						commit
						87526f3b4d
					
				
					 4 changed files with 15 additions and 7 deletions
				
			
		|  | @ -8,9 +8,11 @@ | |||
| 
 | ||||
| - name: Configuration | ||||
|   ansible.builtin.file: | ||||
|     src: "{{ role_path }}/files/{{ item }}" | ||||
|     dest: "{{ ansible_user_dir }}/{{ item }}" | ||||
|     src: "{{ role_path }}/files/{{ git_config_item }}" | ||||
|     dest: "{{ ansible_user_dir }}/{{ git_config_item }}" | ||||
|     state: link | ||||
|   loop_control: | ||||
|     loop_var: git_config_item | ||||
|   with_items: | ||||
|     - .gitconfig | ||||
|     - .gitignore-global | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| --- | ||||
| - name: Install | ||||
|   community.general.npm: | ||||
|     name: "{{ item }}" | ||||
|     name: "{{ npm_install_item }}" | ||||
|     state: latest | ||||
|     global: true | ||||
|   loop_control: | ||||
|     loop_var: npm_install_item | ||||
|   with_items: | ||||
|     - "@ansible/ansible-language-server" | ||||
|     - "@tailwindcss/language-server" | ||||
|  |  | |||
|  | @ -55,9 +55,11 @@ | |||
| 
 | ||||
| - name: Configuration files | ||||
|   ansible.builtin.file: | ||||
|     src: "{{ role_path }}/files/{{ item }}" | ||||
|     dest: "{{ ansible_user_dir }}/.config/nvim/{{ item }}" | ||||
|     src: "{{ role_path }}/files/{{ neovim_config_item }}" | ||||
|     dest: "{{ ansible_user_dir }}/.config/nvim/{{ neovim_config_item }}" | ||||
|     state: link | ||||
|   loop_control: | ||||
|     loop_var: neovim_config_item | ||||
|   with_items: | ||||
|     - after | ||||
|     - autoload | ||||
|  |  | |||
|  | @ -14,9 +14,11 @@ | |||
| 
 | ||||
| - name: Configuration | ||||
|   ansible.builtin.file: | ||||
|     src: "{{ role_path }}/files/{{ item }}" | ||||
|     dest: "{{ ansible_user_dir }}/{{ item }}" | ||||
|     src: "{{ role_path }}/files/{{ zsh_config_item }}" | ||||
|     dest: "{{ ansible_user_dir }}/{{ zsh_config_item }}" | ||||
|     state: link | ||||
|   loop_control: | ||||
|     loop_var: zsh_config_item | ||||
|   with_items: | ||||
|     - .zsh | ||||
|     - .zshenv | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue