From 0b7969ad007654d8d4e8b42afac232918a8bb374 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:12:22 +0200 Subject: [PATCH] Switch `mkdir` from shell to file/directory Closes #21 Signed-off-by: Matej Focko --- playbooks/roles/haskell/tasks/main.yml | 4 +++- playbooks/roles/shell/tasks/nvim.yml | 4 +++- playbooks/roles/shell/tasks/tmux.yml | 4 +++- playbooks/roles/vscode/tasks/main.yml | 11 +++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/playbooks/roles/haskell/tasks/main.yml b/playbooks/roles/haskell/tasks/main.yml index 752e25d..3c4dcd5 100644 --- a/playbooks/roles/haskell/tasks/main.yml +++ b/playbooks/roles/haskell/tasks/main.yml @@ -1,6 +1,8 @@ --- - name: Create directories for configuration - shell: mkdir ~/.ghc + file: + path: ~/.ghc + state: directory - name: Install ghci.conf template: diff --git a/playbooks/roles/shell/tasks/nvim.yml b/playbooks/roles/shell/tasks/nvim.yml index 8cd285d..6a75288 100644 --- a/playbooks/roles/shell/tasks/nvim.yml +++ b/playbooks/roles/shell/tasks/nvim.yml @@ -1,7 +1,9 @@ --- - name: Create init.vim block: - - shell: mkdir -p ~/.config/nvim + - file: + path: ~/.config/nvim + state: directory - template: src: templates/init.vim.j2 dest: ~/.config/nvim/init.vim diff --git a/playbooks/roles/shell/tasks/tmux.yml b/playbooks/roles/shell/tasks/tmux.yml index c979a03..638da20 100644 --- a/playbooks/roles/shell/tasks/tmux.yml +++ b/playbooks/roles/shell/tasks/tmux.yml @@ -1,6 +1,8 @@ --- - name: Create .tmux - shell: mkdir -p ~/.tmux + file: + path: ~/.tmux + state: directory - name: Clone tpm git: diff --git a/playbooks/roles/vscode/tasks/main.yml b/playbooks/roles/vscode/tasks/main.yml index 9fbee25..23e19aa 100644 --- a/playbooks/roles/vscode/tasks/main.yml +++ b/playbooks/roles/vscode/tasks/main.yml @@ -1,9 +1,12 @@ --- - name: Create directories for VSCode - block: - - shell: mkdir -p ~/.local/bin - - shell: mkdir -p ~/.local/share - - shell: mkdir -p "$HOME/.config/Code - Insiders/User" + file: + path: {{ item }} + state: directory + loop: + - ~/.local/bin + - ~/.local/share + - "$HOME/.config/Code - Insiders/User" - name: Install VSCode script template: