From 587b6dd6d2d3a63ad28455003c0c2c5f58afdecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 11 Nov 2018 21:35:01 +0100 Subject: Add dir creation --- roles/contexts/fretlink/tasks/main.yml | 18 +++++++++++++----- roles/git/tasks/main.yml | 7 +++++++ roles/gnupg/tasks/main.yml | 14 +++++++++----- roles/graphical/tasks/main.yml | 7 +++++++ roles/lxde/tasks/main.yml | 13 +++++++++++++ roles/programming/haskell/tasks/main.yml | 7 +++++++ roles/programming/nodejs/tasks/main.yml | 6 ++++++ roles/programming/python/tasks/main.yml | 6 ++++++ roles/tools/tasks/main.yml | 17 +++++++++++++++++ site.yml | 1 - 10 files changed, 85 insertions(+), 11 deletions(-) diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml index 78f733a..085da83 100644 --- a/roles/contexts/fretlink/tasks/main.yml +++ b/roles/contexts/fretlink/tasks/main.yml @@ -6,12 +6,20 @@ - programming/python - programming/haskell - programming/nodejs +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - autostart + - Zeal + - pm2 - name: Config files copy: src: "config_files/{{ item }}" dest: "$XDG_CONFIG_HOME/{{ item }}" loop: - - "autostart/zeal.desktop" + - autostart/zeal.desktop - name: zeal configuration ini_file: path: "$XDG_CONFIG_HOME/Zeal/Zeal.conf" @@ -47,12 +55,12 @@ args: creates: "$XDG_DATA_HOME/Zeal/Zeal/docsets/{{ item }}.docset" loop: "{{ zeal_missing_docsets.stdout.split('\n') }}" -- name: Create pm2 config dir - file: - path: $XDG_CONFIG_HOME/pm2 - state: directory - name: workdir block: + - name: Workdir + file: + state: directory + path: $HOME/workdir - name: workdir scripts copy: mode: 0755 diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml index e2a5bbf..853ecb2 100644 --- a/roles/git/tasks/main.yml +++ b/roles/git/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - tig + - git/templates_fretlink/hooks - name: Config files copy: mode: preserve diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml index 183dd7d..117ebf2 100644 --- a/roles/gnupg/tasks/main.yml +++ b/roles/gnupg/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ gnupg_config_item }}" + mode: 0700 + loop: + - gnupg + loop_control: + loop_var: gnupg_config_item - name: Config files copy: src: "gnupg/{{ gnupg_config_item }}" @@ -8,11 +17,6 @@ - gpg.conf loop_control: loop_var: gnupg_config_item -- name: Protect directory - file: - path: $XDG_CONFIG_HOME/gnupg - state: directory - mode: 0700 - name: Get gnupg runtime folder name shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"' register: gnupg_runtime_dir_cmd diff --git a/roles/graphical/tasks/main.yml b/roles/graphical/tasks/main.yml index ad45024..f73623e 100644 --- a/roles/graphical/tasks/main.yml +++ b/roles/graphical/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - autostart + - dunst - name: Config files copy: src: "config_files/{{ item }}" diff --git a/roles/lxde/tasks/main.yml b/roles/lxde/tasks/main.yml index 8bf27af..e7de759 100644 --- a/roles/lxde/tasks/main.yml +++ b/roles/lxde/tasks/main.yml @@ -2,6 +2,19 @@ - name: Import graphical include_role: name: graphical +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - libfm + - pcmanfm/LXDE + - lxterminal + - openbox + - lxpanel/LXDE/panels + - lxsession-default-apps + - lxsession/LXDE + - gpicview - name: Config files copy: mode: preserve diff --git a/roles/programming/haskell/tasks/main.yml b/roles/programming/haskell/tasks/main.yml index fe37787..a3ed2a0 100644 --- a/roles/programming/haskell/tasks/main.yml +++ b/roles/programming/haskell/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: Config dirs + file: + state: directory + path: "{{ item }}" + loop: + - "$HOME/.ghc" + - "$XDG_DATA_HOME/stack/global-project" - name: GHC config file copy: src: ghci.conf diff --git a/roles/programming/nodejs/tasks/main.yml b/roles/programming/nodejs/tasks/main.yml index fcf7421..eef4d2f 100644 --- a/roles/programming/nodejs/tasks/main.yml +++ b/roles/programming/nodejs/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - npm - name: config file copy: src: npmrc diff --git a/roles/programming/python/tasks/main.yml b/roles/programming/python/tasks/main.yml index db67584..e3a840b 100644 --- a/roles/programming/python/tasks/main.yml +++ b/roles/programming/python/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - python - name: Config file copy: src: startup_script.py diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml index 9c540d5..94324fc 100644 --- a/roles/tools/tasks/main.yml +++ b/roles/tools/tasks/main.yml @@ -5,6 +5,19 @@ loop: - git - gnupg +- name: Config dirs + file: + state: directory + path: "$XDG_CONFIG_HOME/{{ item }}" + loop: + - htop + - mplayer + - psql + - vim + - tmux + - youtube-viewer + - remind + - systemd/user - name: config files copy: src: "{{ item }}" @@ -102,6 +115,10 @@ - [ "sinkType", "0" ] - [ "sourceType", "0" ] - [ "showVolumeMeters", "1" ] +- name: ssh config dirs + file: + state: directory + path: "$HOME/.ssh" - name: ssh files copy: src: "ssh/{{ item }}" diff --git a/site.yml b/site.yml index 28a64ed..c022b97 100644 --- a/site.yml +++ b/site.yml @@ -20,7 +20,6 @@ - shell/bash - lxde - tools - - gnupg - cron - role: contexts/fretlink tags: ["fretlink"] -- cgit v1.2.3