-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.yml
57 lines (49 loc) · 1.36 KB
/
setup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
- name: dotfiles - Setup
hosts: local
tasks:
- import_tasks: tasks/load_variables.yml
- include_vars: vars/main.yml
- name: set environment defaults
set_fact:
"{{item.env}}": "{{ lookup('env', item.env) | default(item.default, true) }}"
with_items:
- env: XDG_CONFIG_HOME
default: "{{ XDG_CONFIG_HOME_DEFAULT }}"
- env: XDG_CACHE_HOME
default: "{{ XDG_CACHE_HOME_DEFAULT }}"
- env: XDG_DATA_HOME
default: "{{ XDG_DATA_HOME_DEFAULT }}"
- name: install git
package:
name: git
state: present
become: yes
- name: clone dotfiles
git:
repo: '{{ dotfiles_repo }}'
dest: '{{ dotfiles_home }}'
force: no
update: no
- name: install programs
import_tasks: tasks/programs.yml
# - name: install packages
# package:
# name: '{{ item }}'
# state: present
# with_items: '{{ packages }}'
# become: yes
# - name: include subtasks from data directory
# include_tasks: '{{ data_dir }}'
# vars:
# data_dirname: '{{ data_dir.split("/")[1] }}'
# with_items: '{{ "data/**/tasks.yml" | fileglob }}'
# loop_control:
# loop_var: data_dir
# - name: create symlinks
# file:
# src: '~/.dotfiles/data/{{ item.src }}'
# dest: '{{ item.dest }}'
# state: link
# force: yes
# with_items: '{{ symlinks }}'