49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
- hosts: localhost
|
|
|
|
vars:
|
|
package_become: true
|
|
repos:
|
|
# - repo: git@code.infektor.net:config/kitty.git
|
|
# path: ~/.config/kitty
|
|
- repo: git@code.infektor.net:config/zsh.git
|
|
path: ~/.config/zsh
|
|
- repo: git@code.infektor.net:config/tmux.git
|
|
path: ~/.config/tmux
|
|
- repo: git@code.infektor.net:config/vim.git
|
|
path: ~/.config/nvim
|
|
- repo: git@code.infektor.net:config/git.git
|
|
path: ~/.config/git
|
|
- repo: git@code.infektor.net:config/python.git
|
|
path: ~/.config/python
|
|
|
|
tasks:
|
|
- name: Clone config repos
|
|
git:
|
|
repo: '{{item.repo}}'
|
|
dest: '{{item.path}}'
|
|
version: master
|
|
with_items: '{{repos}}'
|
|
|
|
- name: Set config repos user.email
|
|
git_config:
|
|
repo: '{{item.path}}'
|
|
scope: local
|
|
name: user.email
|
|
value: '{{item.email | default("benie@infektor.net")}}'
|
|
with_items: '{{repos}}'
|
|
|
|
- block:
|
|
- name: Dynamically include tasks from config repos
|
|
include_tasks:
|
|
file: '{{config}}/tasks.yaml'
|
|
loop_control:
|
|
loop_var: config
|
|
with_items: '{{repos | map(attribute="path") | list}}'
|
|
tags: tasks
|
|
|
|
- import_playbook: local/base-dirs.yaml
|
|
- import_playbook: local/fonts.yaml
|
|
- import_playbook: local/ferdi.yaml
|
|
- import_playbook: local/distrobox.yaml
|