Skip to content

Commit

Permalink
feat(provision): ensure list of dirs exist
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasnorrby committed Jan 21, 2021
1 parent 10e6e1a commit 80b82c8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions _provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
tags: ["never", "do_pacman", "bootstrap"]

tasks:
- include_tasks: tasks/directories.yml
- include_tasks: tasks/pacman.yml
tags: ["never", "do_pacman", "bootstrap"]
- include_tasks: tasks/homebrew.yml
Expand Down
6 changes: 6 additions & 0 deletions _provision/tasks/directories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: ensure directories are created
file:
path: "{{ item }}"
state: directory
loop: "{{ dirs_to_create }}"
10 changes: 10 additions & 0 deletions _provision/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ xdg_bin_home: "~/.local/bin"
dotfiles: "~/.dotfiles"
dotfiles_data: "{{ xdg_data_home }}/dotfiles"

dirs_to_create:
- "~/dev"
- "~/learn"
- "~/work"
- "~/tmp"
- "{{ xdg_config_home }}"
- "{{ xdg_cache_home }}"
- "{{ xdg_data_home }}"
- "{{ xdg_bin_home }}"

is_macos: "{{ ansible_distribution == 'MacOSX' }}"
is_arch: "{{ ansible_distribution == 'Archlinux' }}"
is_interactive: true
Expand Down

0 comments on commit 80b82c8

Please sign in to comment.